Removed cam.aspect from the props

This commit is contained in:
Aria Minaei 2021-07-30 16:31:40 +02:00
parent 65463dfdc6
commit 274022100a

View file

@ -27,7 +27,6 @@ const camConf = types.compound({
lens: types.compound({ lens: types.compound({
zoom: types.number(1, {range: [0.0001, 10]}), zoom: types.number(1, {range: [0.0001, 10]}),
fov: types.number(50, {range: [1, 1000]}), fov: types.number(50, {range: [1, 1000]}),
aspect: types.number(1, {range: [0, 1000]}),
near: types.number(0.1, {range: [0, Infinity]}), near: types.number(0.1, {range: [0, Infinity]}),
far: types.number(2000, {range: [0, Infinity]}), far: types.number(2000, {range: [0, Infinity]}),
focus: types.number(10, {range: [0, Infinity]}), focus: types.number(10, {range: [0, Infinity]}),
@ -148,15 +147,14 @@ function usePassValuesFromTheatreToCamera(
const obj = objRef.current! const obj = objRef.current!
const setFromTheatre = (props: typeof camConf['valueType']): void => { const setFromTheatre = (props: typeof camConf['valueType']): void => {
const {position, target} = props.transform const {position, target} = props.transform
cam.position.set(position.x, position.y, position.z)
cam.zoom = props.lens.zoom cam.zoom = props.lens.zoom
cam.fov = props.lens.fov cam.fov = props.lens.fov
cam.aspect = props.lens.aspect
cam.near = props.lens.near cam.near = props.lens.near
cam.far = props.lens.far cam.far = props.lens.far
cam.focus = props.lens.focus cam.focus = props.lens.focus
cam.filmGauge = props.lens.filmGauge cam.filmGauge = props.lens.filmGauge
cam.filmOffset = props.lens.filmOffset cam.filmOffset = props.lens.filmOffset
cam.position.set(position.x, position.y, position.z)
cam.updateProjectionMatrix() cam.updateProjectionMatrix()
orbitControls.target.set(target.x, target.y, target.z) orbitControls.target.set(target.x, target.y, target.z)
orbitControls.update() orbitControls.update()