From f603882d423f84e00b0e265e006da4e4fc50487e Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 16 May 2023 06:39:36 -0600 Subject: [PATCH] modify some things to remove warnings on server and in browser console --- src/components/World/World.js | 2 +- src/components/World/components/camera.js | 2 +- src/components/World/components/lights.js | 2 +- src/components/World/components/objects/terrain.js | 6 +++--- src/components/World/systems/renderer.js | 1 + vue.config.js | 5 +++++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/World/World.js b/src/components/World/World.js index 43ec31e7..6377f7b0 100644 --- a/src/components/World/World.js +++ b/src/components/World/World.js @@ -37,7 +37,7 @@ class World { const controls = createControls(camera, renderer.domElement); // Light Instance, with optional light helper - const { light, lightHelper } = createLights(color); + const { light } = createLights(color); // Random values for terrain vertices // We could do this on the terrain.js file, diff --git a/src/components/World/components/camera.js b/src/components/World/components/camera.js index fe21c1d4..c8a290ff 100644 --- a/src/components/World/components/camera.js +++ b/src/components/World/components/camera.js @@ -11,7 +11,7 @@ function createCamera() { // move the camera back so we can view the scene camera.position.set(0, 10, 30); // eslint-disable-next-line @typescript-eslint/no-empty-function - camera.tick = (delta) => {}; + camera.tick = () => {}; return camera; } diff --git a/src/components/World/components/lights.js b/src/components/World/components/lights.js index d1716735..1628448e 100644 --- a/src/components/World/components/lights.js +++ b/src/components/World/components/lights.js @@ -6,7 +6,7 @@ function createLights(color) { light.position.set(0, 30, 30); // eslint-disable-next-line @typescript-eslint/no-empty-function - light.tick = (delta) => {}; + light.tick = () => {}; return { light, lightHelper }; } diff --git a/src/components/World/components/objects/terrain.js b/src/components/World/components/objects/terrain.js index ff7c0deb..8aa36cea 100644 --- a/src/components/World/components/objects/terrain.js +++ b/src/components/World/components/objects/terrain.js @@ -1,5 +1,5 @@ import { - PlaneBufferGeometry, + PlaneGeometry, MeshStandardMaterial, Mesh, TextureLoader, @@ -9,7 +9,7 @@ export default function createTerrain(props) { const loader = new TextureLoader(); const height = loader.load("img/textures/height.png"); // w h - const geometry = new PlaneBufferGeometry(150, 150, 64, 64); + const geometry = new PlaneGeometry(150, 150, 64, 64); const material = new MeshStandardMaterial({ color: props.color, @@ -35,7 +35,7 @@ export default function createTerrain(props) { plane.geometry.attributes.position.randomValues = props.randVertexArr; let frame = 0; - plane.tick = (delta) => { + plane.tick = () => { frame += 0.01; // destructuring of the random values, the original position and the current vertex position const { array, originalPosition, randomValues } = diff --git a/src/components/World/systems/renderer.js b/src/components/World/systems/renderer.js index cc918a34..ea423fce 100644 --- a/src/components/World/systems/renderer.js +++ b/src/components/World/systems/renderer.js @@ -4,6 +4,7 @@ function createRenderer() { const renderer = new WebGLRenderer({ antialias: true }); // turn on the physically correct lighting model + // (The browser complains: "THREE.WebGLRenderer: .physicallyCorrectLights has been removed. Set enderer.useLegacyLights instead." However, that changes the lighting in a way that doesn't look better.) renderer.physicallyCorrectLights = true; return renderer; diff --git a/vue.config.js b/vue.config.js index c38a5949..26772193 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,4 +7,9 @@ module.exports = defineConfig({ topLevelAwait: true, }, }, + pwa: { + iconPaths: { + faviconSVG: 'img/icons/safari-pinned-tab.svg', + } + } });