Browse Source

remove test cube from stats-world

world-fix
Trent Larson 2 years ago
parent
commit
7160aa3cc5
  1. 7
      src/components/World/World.js
  2. 10
      src/components/World/components/objects/terrain.js

7
src/components/World/World.js

@ -8,7 +8,7 @@ import { AppString } from "@/constants/app";
import { createCamera } from "./components/camera.js";
import { createLights } from "./components/lights.js";
import { createScene } from "./components/scene.js";
import { createCube, createTerrain } from "./components/objects/terrain.js";
import { createTerrain } from "./components/objects/terrain.js";
import { Loop } from "./systems/Loop.js";
import { Resizer } from "./systems/Resizer.js";
import { createControls } from "./systems/controls.js";
@ -65,11 +65,6 @@ class World {
this.scene.add(light, terrain);
const cube = createCube(-10, 5, 0, 1, 1, 1);
this.loop.updatables.push(cube);
this.scene.add(cube);
new TWEEN.Tween(cube.position).to({ x: 10 }, 5000).start();
this.loadClaims();
requestAnimationFrame(this.update);

10
src/components/World/components/objects/terrain.js

@ -33,13 +33,3 @@ export function createTerrain(props) {
return plane;
}
export function createCube(xPos, yPos, zPos, x, y, z) {
const geometry = new BoxGeometry(x, y, z);
const material = new MeshLambertMaterial({ color: 0xff0000 });
const cube = new Mesh(geometry, material);
cube.position.set(xPos, yPos, zPos);
// eslint-disable-next-line @typescript-eslint/no-empty-function
cube.tick = () => {};
return cube;
}

Loading…
Cancel
Save