(time)
| 57 | const state = { x: 0, y: 0 }; |
| 58 | |
| 59 | function render(time) { |
| 60 | time *= 0.001; // convert to seconds |
| 61 | |
| 62 | if (resizeRendererToDisplaySize(renderer)) { |
| 63 | const canvas = renderer.domElement; |
| 64 | camera.right = canvas.clientWidth / canvas.clientHeight; |
| 65 | camera.left = -camera.right; |
| 66 | camera.updateProjectionMatrix(); |
| 67 | } |
| 68 | |
| 69 | base.position.set(state.x, state.y, 0); |
| 70 | base.rotation.x = time; |
| 71 | base.rotation.y = time * 1.11; |
| 72 | |
| 73 | renderer.render(scene, camera); |
| 74 | |
| 75 | requestAnimationFrame(render); |
| 76 | } |
| 77 | requestAnimationFrame(render); |
| 78 | |
| 79 | function getCanvasRelativePosition(event) { |
nothing calls this directly
no test coverage detected