File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
examples/vite-3DCanvas-react-app/src/components
geppetto.js/geppetto-ui/src/3d-canvas Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44 Canvas3DRootState ,
55 useFiber ,
66} from "@metacell/geppetto-meta-ui/3d-canvas/Canvas3D" ;
7- import { RootState } from "@react-three/fiber" ;
87
98const toolbarBaseStyles : SxProps < Theme > = {
109 display : "flex" ,
Original file line number Diff line number Diff line change @@ -127,13 +127,14 @@ const Canvas3DExample: React.FC = () => {
127127 < Box sx = { classes . canvasContainer } >
128128 < Canvas3D
129129 frameloop = { "always" }
130- cameraOptions = { {
130+ controlsOption = { {
131131 minDistance : 2 ,
132132 maxDistance : 20 ,
133133 enablePan : true ,
134134 enableZoom : true ,
135135 enableRotate : true ,
136136 } }
137+ defaultLightOff
137138 >
138139 < Scene />
139140 </ Canvas3D >
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type Canvas3DBaseProps = {
1414 ref ?;
1515 defaultLightOff ?: boolean ;
1616 nonInteractive ?: boolean ;
17- cameraOptions ?: CameraControlsProps ;
17+ controlsOption ?: CameraControlsProps ;
1818} ;
1919
2020type Canvas3DProps = Canvas3DBaseProps &
@@ -154,7 +154,7 @@ export const Canvas3D: React.FC<Canvas3DProps> = forwardRef<
154154 children,
155155 defaultLightOff = false ,
156156 nonInteractive = false ,
157- cameraOptions ,
157+ controlsOption ,
158158 ...canvasProps
159159 } ,
160160 ref
@@ -169,7 +169,7 @@ export const Canvas3D: React.FC<Canvas3DProps> = forwardRef<
169169 </ >
170170 ) }
171171 { children }
172- { ! nonInteractive && < CameraControls makeDefault { ...cameraOptions } /> }
172+ { ! nonInteractive && < CameraControls makeDefault { ...controlsOption } /> }
173173 </ Canvas >
174174 ) ;
175175 }
You can’t perform that action at this time.
0 commit comments