(canvasId)
| 4 | |
| 5 | export default class SceneInit { |
| 6 | constructor(canvasId) { |
| 7 | // NOTE: Core components to initialize Three.js app. |
| 8 | this.scene = undefined; |
| 9 | this.camera = undefined; |
| 10 | this.renderer = undefined; |
| 11 | |
| 12 | // NOTE: Camera params; |
| 13 | this.fov = 45; |
| 14 | this.nearPlane = 1; |
| 15 | this.farPlane = 1000; |
| 16 | this.canvasId = canvasId; |
| 17 | |
| 18 | // NOTE: Additional components. |
| 19 | this.clock = undefined; |
| 20 | this.stats = undefined; |
| 21 | this.controls = undefined; |
| 22 | |
| 23 | // NOTE: Lighting is basically required. |
| 24 | this.ambientLight = undefined; |
| 25 | this.directionalLight = undefined; |
| 26 | } |
| 27 | |
| 28 | initialize() { |
| 29 | this.scene = new THREE.Scene(); |
nothing calls this directly
no outgoing calls
no test coverage detected