Skip to content

Commit

Permalink
fix: bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
gong9 committed Oct 19, 2023
1 parent a6a92da commit 37b211a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Editor/canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ const Center: FC<EditorProps> = () => {
const [isRenderCanvas, setIsRenderCanvas] = useState(false)
const { drawline } = useModeStore(state => state)

// const { initialMainCameraPosition } = store.schemaStore(state => ({
// initialMainCameraPosition: state.initialMainCameraPosition,
// }))
const { initialMainCameraPosition } = store.schemaStore(state => ({
initialMainCameraPosition: state.initialMainCameraPosition,
}))

const { angleOfView } = store.settingStore(state => ({
angleOfView: state.angleOfView,
Expand All @@ -100,7 +100,7 @@ const Center: FC<EditorProps> = () => {
<div className={classnames('h-screen absolute w-full editor', { drawline })} ref={canvasRef}>
{isRenderCanvas
&& <Suspense fallback={<ReactLoading />}>
<Canvas camera={getMainCamera(canvasRef, angleOfView)! as (PerspectiveCamera) } style={{ backgroundColor: '#222' }}>
<Canvas camera={{ position: initialMainCameraPosition }} style={{ backgroundColor: '#222' }}>
<CanvasContent/>
</Canvas>
</Suspense>
Expand Down

0 comments on commit 37b211a

Please sign in to comment.