in stats-world, fix the location computations to be based on Give attributes

This commit is contained in:
2023-05-18 20:33:26 -06:00
parent beb7821f58
commit 8f3a11bb98
2 changed files with 126 additions and 24 deletions

View File

@@ -15,12 +15,13 @@ import { createRenderer } from "./systems/renderer.js";
const COLOR1 = "#dddddd";
const COLOR2 = "#0055aa";
const PLATFORM_BORDER = 10;
const PLATFORM_EDGE_FOR_UNKNOWNS = 10;
const PLATFORM_SIZE = 100; // note that the loadLandmarks calculations may still assume 100
class World {
constructor(container, vue) {
this.PLATFORM_BORDER = 5;
this.PLATFORM_EDGE_FOR_UNKNOWNS = 10;
this.PLATFORM_SIZE = 100; // note that the loadLandmarks calculations may still assume 100
this.update = this.update.bind(this);
// Instances of camera, scene, and renderer
@@ -49,9 +50,11 @@ class World {
// Terrain Instance
const terrain = createTerrain({
color: COLOR1,
height: PLATFORM_SIZE + PLATFORM_BORDER * 2,
height: this.PLATFORM_SIZE + this.PLATFORM_BORDER * 2,
width:
PLATFORM_SIZE + PLATFORM_BORDER * 2 + PLATFORM_EDGE_FOR_UNKNOWNS * 2,
this.PLATFORM_SIZE +
this.PLATFORM_BORDER * 2 +
this.PLATFORM_EDGE_FOR_UNKNOWNS * 2,
});
this.loop.updatables.push(controls);