Skip to content

Commit 2d2055c

Browse files
committed
GEP-200 Rename cameraOptions to controlsOptions
1 parent 1458853 commit 2d2055c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/vite-3DCanvas-react-app/src/components/toolbar/Toolbar3D.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
Canvas3DRootState,
55
useFiber,
66
} from "@metacell/geppetto-meta-ui/3d-canvas/Canvas3D";
7-
import { RootState } from "@react-three/fiber";
87

98
const toolbarBaseStyles: SxProps<Theme> = {
109
display: "flex",

examples/vite-3DCanvas-react-app/src/components/viewers/Canvas3DExample.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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>

geppetto.js/geppetto-ui/src/3d-canvas/Canvas3D.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Canvas3DBaseProps = {
1414
ref?;
1515
defaultLightOff?: boolean;
1616
nonInteractive?: boolean;
17-
cameraOptions?: CameraControlsProps;
17+
controlsOption?: CameraControlsProps;
1818
};
1919

2020
type 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
}

0 commit comments

Comments
 (0)