diff --git a/src/components/World/components/objects/terrain.js b/src/components/World/components/objects/terrain.js index 8aa36ce..97c6970 100644 --- a/src/components/World/components/objects/terrain.js +++ b/src/components/World/components/objects/terrain.js @@ -34,6 +34,11 @@ export default function createTerrain(props) { plane.geometry.attributes.position.randomValues = props.randVertexArr; + // eslint-disable-next-line @typescript-eslint/no-empty-function + plane.tick = () => {}; + /** + * This makes the terrain bob up and down. + * let frame = 0; plane.tick = () => { frame += 0.01; @@ -55,6 +60,7 @@ export default function createTerrain(props) { } plane.geometry.attributes.position.needsUpdate = true; }; + **/ return plane; } diff --git a/src/components/World/systems/Resizer.js b/src/components/World/systems/Resizer.js index bf41d66..3ffe3e4 100644 --- a/src/components/World/systems/Resizer.js +++ b/src/components/World/systems/Resizer.js @@ -1,8 +1,15 @@ const setSize = (container, camera, renderer) => { - camera.aspect = window.innerWidth / window.innerHeight; + // These are great for full-screen, which adjusts to a window. + const height = window.innerHeight; + const width = window.innerWidth - 50; + // These are better for fitting in a container, which stays that size. + //const height = container.scrollHeight; + //const width = container.scrollWidth; + + camera.aspect = width / height; camera.updateProjectionMatrix(); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setSize(width, height); renderer.setPixelRatio(window.devicePixelRatio); }; diff --git a/src/components/World/systems/controls.js b/src/components/World/systems/controls.js index d8f05e1..cd901f4 100644 --- a/src/components/World/systems/controls.js +++ b/src/components/World/systems/controls.js @@ -6,8 +6,8 @@ function createControls(camera, canvas) { //enable controls? controls.enabled = true; - controls.autoRotate = true; - controls.autoRotateSpeed = 0.2; + controls.autoRotate = false; + //controls.autoRotateSpeed = 0.2; // control limits // It's recommended to set some control boundaries, diff --git a/src/views/StatisticsView.vue b/src/views/StatisticsView.vue index 6b02fe0..34c41fb 100644 --- a/src/views/StatisticsView.vue +++ b/src/views/StatisticsView.vue @@ -53,8 +53,9 @@