forked from trent_larson/crowd-funder-for-time-pwa
modify some things to remove warnings on server and in browser console
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
|
||||
@@ -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 } =
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user