forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor variable names (no logic changes)
This commit is contained in:
@@ -14,15 +14,12 @@ import { createControls } from "./systems/controls.js";
|
||||
import { createRenderer } from "./systems/renderer.js";
|
||||
import { AppString } from "@/constants/app";
|
||||
|
||||
// These variables are module-scoped: we cannot access them
|
||||
// from outside the module
|
||||
|
||||
const color = "#42b883";
|
||||
const color2 = "#0055aa";
|
||||
const PLATFORM_SIZE = 100;
|
||||
const BASE32 = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
||||
const COLOR1 = "#42b883";
|
||||
const COLOR2 = "#0055aa";
|
||||
const PLATFORM_BORDER = 10;
|
||||
const PLATFORM_EDGE_FOR_UNKNOWNS = 10;
|
||||
const BASE32 = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
||||
const PLATFORM_SIZE = 100;
|
||||
|
||||
function createLight() {
|
||||
const light = new SpotLight(0xffffff, 100, 0, Math.PI / 8, 0.5, 0);
|
||||
@@ -37,7 +34,7 @@ class World {
|
||||
|
||||
// Instances of camera, scene, and renderer
|
||||
this.camera = createCamera();
|
||||
this.scene = createScene(color2);
|
||||
this.scene = createScene(COLOR2);
|
||||
this.renderer = createRenderer();
|
||||
|
||||
this.light = null;
|
||||
@@ -52,11 +49,11 @@ class World {
|
||||
const controls = createControls(this.camera, this.renderer.domElement);
|
||||
|
||||
// Light Instance, with optional light helper
|
||||
const { light } = createLights(color);
|
||||
const { light } = createLights(COLOR1);
|
||||
|
||||
// Terrain Instance
|
||||
const terrain = createTerrain({
|
||||
color: color,
|
||||
color: COLOR1,
|
||||
height: PLATFORM_SIZE + PLATFORM_BORDER,
|
||||
width: PLATFORM_SIZE + PLATFORM_BORDER + PLATFORM_EDGE_FOR_UNKNOWNS,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user