Download node_modules/three/src/cameras/Camera.js from SimWorld-AI/industrial-harbor-viewer: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/cameras/Camera.js
- Command line
-
hf download hf://spaces/SimWorld-AI/industrial-harbor-viewer/node_modules/three/src/cameras/Camera.js
-
curl -L -o Camera.js https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/cameras/Camera.js
1.27 kB
| import { WebGLCoordinateSystem } from '../constants.js'; | |
| import { Matrix4 } from '../math/Matrix4.js'; | |
| import { Object3D } from '../core/Object3D.js'; | |
| class Camera extends Object3D { | |
| constructor() { | |
| super(); | |
| this.isCamera = true; | |
| this.type = 'Camera'; | |
| this.matrixWorldInverse = new Matrix4(); | |
| this.projectionMatrix = new Matrix4(); | |
| this.projectionMatrixInverse = new Matrix4(); | |
| this.coordinateSystem = WebGLCoordinateSystem; | |
| } | |
| copy( source, recursive ) { | |
| super.copy( source, recursive ); | |
| this.matrixWorldInverse.copy( source.matrixWorldInverse ); | |
| this.projectionMatrix.copy( source.projectionMatrix ); | |
| this.projectionMatrixInverse.copy( source.projectionMatrixInverse ); | |
| this.coordinateSystem = source.coordinateSystem; | |
| return this; | |
| } | |
| getWorldDirection( target ) { | |
| return super.getWorldDirection( target ).negate(); | |
| } | |
| updateMatrixWorld( force ) { | |
| super.updateMatrixWorld( force ); | |
| this.matrixWorldInverse.copy( this.matrixWorld ).invert(); | |
| } | |
| updateWorldMatrix( updateParents, updateChildren ) { | |
| super.updateWorldMatrix( updateParents, updateChildren ); | |
| this.matrixWorldInverse.copy( this.matrixWorld ).invert(); | |
| } | |
| clone() { | |
| return new this.constructor().copy( this ); | |
| } | |
| } | |
| export { Camera }; | |