Fix canvas jumping on screen cap
This commit is contained in:
@@ -60,7 +60,6 @@ const CaptureButton = ({ canEdit, TheButton, shouldUpdateImage }) => {
|
||||
})
|
||||
updateCanvasSize(oldSize)
|
||||
} else {
|
||||
console.log(project?.title)
|
||||
imgBlob = state.objectData.data
|
||||
}
|
||||
const config = {
|
||||
|
||||
@@ -36,14 +36,13 @@ function Controls({ onCameraChange, onDragStart, onInit }) {
|
||||
const { camera, gl } = threeInstance
|
||||
useEffect(() => {
|
||||
onInit(threeInstance)
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
// init camera position
|
||||
camera.position.x = 200
|
||||
camera.position.y = 140
|
||||
camera.position.z = 20
|
||||
camera.far = 10000
|
||||
camera.fov = 22.5 // matches default openscad fov
|
||||
camera.updateProjectionMatrix()
|
||||
|
||||
// Order matters with Euler rotations
|
||||
// We want it to rotate around the z or vertical axis first then the x axis to match openscad
|
||||
|
||||
Reference in New Issue
Block a user