player-react
缩放控制栏

缩放工具栏

缩放工具栏,用于放大、缩小场景,重置视角

如何使用

  • 通过配置 addons={["ZoomBar"]} 快捷启用缩放工具栏
  • 或通过手动引用 import { ZoomBar } from "@icraft/player-react" 手动启用缩放工具栏,手动启用可以更灵活的控制缩放工具栏的样式
import { ICraftPlayer } from "@icraft/player-react";
 
const style = {
  width: "100%",
  height: "100%",
  position: "relative" as const,
  overflow: "hidden" as const,
};
 
export default () => {
  return (
    <div style={style}>
      <ICraftPlayer
        src='/templates/NetworkArchitectureSpecial.iplayer'
        addons={["ZoomBar"]}
      />
    </div>
  );
};
 
 

API

Namedescriptiontypedefaultrequired
style样式React.CSSPropertiesfalse
className类名stringfalse