瀏覽代碼

Another update.

Simon 1 年之前
父節點
當前提交
62fd091edf

+ 8 - 8
index.html

@@ -7,7 +7,7 @@
 </head>
 </head>
 <body>
 <body>
   <script src="https://cdn.jsdelivr.net/gh/kripken/ammo.js@HEAD/builds/ammo.js"></script>
   <script src="https://cdn.jsdelivr.net/gh/kripken/ammo.js@HEAD/builds/ammo.js"></script>
-  <script src="./src/main.js" type="module">
+  <script src="src/main.js" type="module">
   </script>
   </script>
   <div class="container" id="container">
   <div class="container" id="container">
     <div class="ui" id="game-ui">
     <div class="ui" id="game-ui">
@@ -55,22 +55,22 @@
       <div class="top-right-ui">
       <div class="top-right-ui">
         <div class="ui-area ui-glow top-right-ui-area" id="top-right-ui-area">
         <div class="ui-area ui-glow top-right-ui-area" id="top-right-ui-area">
           <div class="ammo-area row">
           <div class="ammo-area row">
-            <img class="ammo-icon" src="./resources/ui/ev_shadow_FILL0_wght700_GRAD0_opsz48.svg"></img>
-            <img class="ammo-icon" src="./resources/ui/tenancy_FILL0_wght700_GRAD0_opsz48.svg"></img>
-            <img class="ammo-icon" src="./resources/ui/fluorescent_FILL0_wght700_GRAD0_opsz48.svg"></img>
-            <img class="ammo-icon" src="./resources/ui/database_FILL0_wght700_GRAD0_opsz48.svg"></img>
-            <img class="ammo-icon" src="./resources/ui/barcode_scanner_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="ammo-icon" src="resources/ui/ev_shadow_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="ammo-icon" src="resources/ui/tenancy_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="ammo-icon" src="resources/ui/fluorescent_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="ammo-icon" src="resources/ui/database_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="ammo-icon" src="resources/ui/barcode_scanner_FILL0_wght700_GRAD0_opsz48.svg"></img>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
       <div class="top-left-ui">
       <div class="top-left-ui">
         <div class="top-left-ui-area" id="top-left-ui-area">
         <div class="top-left-ui-area" id="top-left-ui-area">
           <div class="row">
           <div class="row">
-            <img class="objective-title-icon" src="./resources/ui/double_arrow_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="objective-title-icon" src="resources/ui/double_arrow_FILL0_wght700_GRAD0_opsz48.svg"></img>
             <div class="objective-title">Kill'm all</div>  
             <div class="objective-title">Kill'm all</div>  
           </div>
           </div>
           <div class="row objective-text-background">
           <div class="row objective-text-background">
-            <img class="objective-text-icon" src="./resources/ui/token_FILL0_wght700_GRAD0_opsz48.svg"></img>
+            <img class="objective-text-icon" src="resources/ui/token_FILL0_wght700_GRAD0_opsz48.svg"></img>
             <div class="objective-text">Jump around and stuff</div>  
             <div class="objective-text">Jump around and stuff</div>  
           </div>
           </div>
         </div>
         </div>

+ 5 - 5
public/base.css

@@ -193,7 +193,7 @@ body {
 }
 }
 
 
 .weapon-icon {
 .weapon-icon {
-  background-image: url('./resources/ui/paintball.png');
+  background-image: url('resources/ui/paintball.png');
   background-repeat: no-repeat;
   background-repeat: no-repeat;
   background-size: contain;
   background-size: contain;
   width: 110px;
   width: 110px;
@@ -230,7 +230,7 @@ body {
 }
 }
 
 
 .weapon-text-icon {
 .weapon-text-icon {
-  background-image: url('./resources/ui/currency_yuan_FILL0_wght700_GRAD0_opsz48.svg');
+  background-image: url('resources/ui/currency_yuan_FILL0_wght700_GRAD0_opsz48.svg');
   background-repeat: no-repeat;
   background-repeat: no-repeat;
   background-size: cover;
   background-size: cover;
   height: 24px;
   height: 24px;
@@ -240,7 +240,7 @@ body {
 }
 }
 
 
 .weapon-pic-icon {
 .weapon-pic-icon {
-  background-image: url('./resources/ui/safety_check_FILL0_wght700_GRAD0_opsz48.svg');
+  background-image: url('resources/ui/safety_check_FILL0_wght700_GRAD0_opsz48.svg');
   background-size: contain;
   background-size: contain;
   height: 40px;
   height: 40px;
   width: 40px;
   width: 40px;
@@ -258,7 +258,7 @@ body {
 }
 }
 
 
 .charge-icon {
 .charge-icon {
-  background-image: url('./resources/ui/flash_on_FILL0_wght700_GRAD0_opsz48.svg');
+  background-image: url('resources/ui/flash_on_FILL0_wght700_GRAD0_opsz48.svg');
   background-size: contain;
   background-size: contain;
   height: 24px;
   height: 24px;
   width: 24px;
   width: 24px;
@@ -290,7 +290,7 @@ body {
 }
 }
 
 
 .health-icon {
 .health-icon {
-  background-image: url('./resources/ui/add_box_FILL0_wght700_GRAD0_opsz48.svg');
+  background-image: url('resources/ui/add_box_FILL0_wght700_GRAD0_opsz48.svg');
   background-size: contain;
   background-size: contain;
   height: 48px;
   height: 48px;
   width: 48px;
   width: 48px;

+ 6 - 0
src/ammojs-component.js

@@ -181,6 +181,12 @@ export const ammojs_component = (() => {
   }
   }
 
 
   class AmmoJSController extends entity.Component {
   class AmmoJSController extends entity.Component {
+    static CLASS_NAME = 'AmmoJSController';
+
+    get NAME() {
+      return AmmoJSController.CLASS_NAME;
+    }
+
     constructor() {
     constructor() {
       super();
       super();
     }
     }

+ 6 - 0
src/attack-controller.js

@@ -7,6 +7,12 @@ import {math} from './math.js';
 export const attack_controller = (() => {
 export const attack_controller = (() => {
 
 
   class AttackController extends entity.Component {
   class AttackController extends entity.Component {
+    static CLASS_NAME = 'AttackController';
+
+    get NAME() {
+      return AttackController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 0
src/basic-rigid-body.js

@@ -6,6 +6,12 @@ import {entity} from './entity.js';
 export const basic_rigid_body = (() => {
 export const basic_rigid_body = (() => {
 
 
   class BasicRigidBody extends entity.Component {
   class BasicRigidBody extends entity.Component {
+    static CLASS_NAME = 'BasicRigidBody';
+
+    get NAME() {
+      return BasicRigidBody.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 0
src/crosshair.js

@@ -5,6 +5,12 @@ import {entity} from './entity.js';
 export const crosshair = (() => {
 export const crosshair = (() => {
 
 
   class Crosshair extends entity.Component {
   class Crosshair extends entity.Component {
+    static CLASS_NAME = 'Crosshair';
+
+    get NAME() {
+      return Crosshair.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 1
src/entity.js

@@ -75,7 +75,7 @@ export const entity = (() => {
 
 
     AddComponent(c) {
     AddComponent(c) {
       c.SetParent(this);
       c.SetParent(this);
-      this.components_[c.constructor.name] = c;
+      this.components_[c.NAME] = c;
 
 
       c.InitComponent();
       c.InitComponent();
     }
     }
@@ -160,6 +160,11 @@ export const entity = (() => {
   };
   };
 
 
   class Component {
   class Component {
+    get NAME() {
+      console.error('Unnamed Component: ' + this.constructor.name);
+      return '__UNNAMED__';
+    }
+  
     constructor() {
     constructor() {
       this.parent_ = null;
       this.parent_ = null;
       this.pass_ = 0;
       this.pass_ = 0;

+ 6 - 0
src/first-person-camera.js

@@ -13,6 +13,12 @@ export const first_person_camera = (() => {
   const POWER_RECHARGE = 10;
   const POWER_RECHARGE = 10;
 
 
   class FirstPersonCamera extends entity.Component {
   class FirstPersonCamera extends entity.Component {
+    static CLASS_NAME = 'FirstPersonCamera';
+
+    get NAME() {
+      return FirstPersonCamera.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
 
 

+ 6 - 0
src/fx/blaster.js

@@ -31,6 +31,12 @@ void main() {
 `;
 `;
 
 
   class BlasterSystem extends entity.Component {
   class BlasterSystem extends entity.Component {
+    static CLASS_NAME = 'BlasterSystem';
+
+    get NAME() {
+      return BlasterSystem.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 11 - 5
src/gun-controller.js

@@ -19,6 +19,12 @@ export const gun_controller = (() => {
   }
   }
 
 
   class GunController extends entity.Component {
   class GunController extends entity.Component {
+    static CLASS_NAME = 'GunController';
+
+    get NAME() {
+      return GunController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
 
 
@@ -71,7 +77,7 @@ export const gun_controller = (() => {
     InitEntity() {
     InitEntity() {
       const threejs = this.FindEntity('threejs').GetComponent('ThreeJSController');
       const threejs = this.FindEntity('threejs').GetComponent('ThreeJSController');
       const textureLoader = new THREE.TextureLoader();
       const textureLoader = new THREE.TextureLoader();
-      const whitesquare = textureLoader.load('./resources/textures/whitesquare.png');
+      const whitesquare = textureLoader.load('resources/textures/whitesquare.png');
       whitesquare.anisotropy = threejs.getMaxAnisotropy();
       whitesquare.anisotropy = threejs.getMaxAnisotropy();
       whitesquare.wrapS = THREE.RepeatWrapping;
       whitesquare.wrapS = THREE.RepeatWrapping;
       whitesquare.wrapT = THREE.RepeatWrapping;
       whitesquare.wrapT = THREE.RepeatWrapping;
@@ -102,7 +108,7 @@ export const gun_controller = (() => {
       e.AddComponent(new render_component.RenderComponent({
       e.AddComponent(new render_component.RenderComponent({
         scene: this.Parent.Attributes.FPSCamera.group,
         scene: this.Parent.Attributes.FPSCamera.group,
         // scene: poopgroup,
         // scene: poopgroup,
-        resourcePath: './resources/rifle/',
+        resourcePath: 'resources/rifle/',
         resourceName: 'scene.gltf',
         resourceName: 'scene.gltf',
         scale: new THREE.Vector3(1, 1, 1),
         scale: new THREE.Vector3(1, 1, 1),
         emissive: new THREE.Color(0x000000),
         emissive: new THREE.Color(0x000000),
@@ -166,7 +172,7 @@ export const gun_controller = (() => {
 
 
       //       const decalMaterial = new THREE.MeshStandardMaterial( {
       //       const decalMaterial = new THREE.MeshStandardMaterial( {
       //         color: 0xFFFFFF,
       //         color: 0xFFFFFF,
-      //         map: textureLoader.load('./resources/footprint' + footIndex + '.png'),
+      //         map: textureLoader.load('resources/footprint' + footIndex + '.png'),
       //         transparent: true,
       //         transparent: true,
       //         depthTest: true,
       //         depthTest: true,
       //         depthWrite: false,
       //         depthWrite: false,
@@ -345,8 +351,8 @@ export const gun_controller = (() => {
   
   
                 const decalMaterial = new THREE.MeshStandardMaterial( {
                 const decalMaterial = new THREE.MeshStandardMaterial( {
                   color: 0xFFFFFF,
                   color: 0xFFFFFF,
-                  // map: textureLoader.load('./resources/textures/bullet-albedo.png'),
-                  // normalMap: textureLoader.load('./resources/textures/bullet2-normal.jpg'),
+                  // map: textureLoader.load('resources/textures/bullet-albedo.png'),
+                  // normalMap: textureLoader.load('resources/textures/bullet2-normal.jpg'),
                   // normalScale: new THREE.Vector2(1, -1),
                   // normalScale: new THREE.Vector2(1, -1),
                   transparent: true,
                   transparent: true,
                   depthTest: true,
                   depthTest: true,

+ 6 - 0
src/health-component.js

@@ -4,6 +4,12 @@ import {entity} from "./entity.js";
 export const health_component = (() => {
 export const health_component = (() => {
 
 
   class HealthComponent extends entity.Component {
   class HealthComponent extends entity.Component {
+    static CLASS_NAME = 'HealthComponent';
+
+    get NAME() {
+      return HealthComponent.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.stats_ = {...params};
       this.stats_ = {...params};

+ 6 - 0
src/kinematic-character-controller.js

@@ -7,6 +7,12 @@ import {entity} from './entity.js';
 export const kinematic_character_controller = (() => {
 export const kinematic_character_controller = (() => {
 
 
   class KinematicCharacterController extends entity.Component {
   class KinematicCharacterController extends entity.Component {
+    static CLASS_NAME = 'KinematicCharacterController';
+
+    get NAME() {
+      return KinematicCharacterController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 11 - 5
src/level-1-builder.js

@@ -11,6 +11,12 @@ import {mesh_rigid_body} from './mesh-rigid-body.js';
 export const level_1_builder = (() => {
 export const level_1_builder = (() => {
 
 
   class Level1Builder extends entity.Component {
   class Level1Builder extends entity.Component {
+    static CLASS_NAME = 'Level1Builder';
+
+    get NAME() {
+      return Level1Builder.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
 
 
@@ -21,23 +27,23 @@ export const level_1_builder = (() => {
 
 
     LoadMaterial_(albedoName, normalName, roughnessName, metalnessName) {
     LoadMaterial_(albedoName, normalName, roughnessName, metalnessName) {
       const textureLoader = new THREE.TextureLoader();
       const textureLoader = new THREE.TextureLoader();
-      const albedo = textureLoader.load('./resources/textures/' + albedoName);
+      const albedo = textureLoader.load('resources/textures/' + albedoName);
       albedo.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       albedo.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       albedo.wrapS = THREE.RepeatWrapping;
       albedo.wrapS = THREE.RepeatWrapping;
       albedo.wrapT = THREE.RepeatWrapping;
       albedo.wrapT = THREE.RepeatWrapping;
       albedo.encoding = THREE.sRGBEncoding;
       albedo.encoding = THREE.sRGBEncoding;
 
 
-      const metalness = textureLoader.load('./resources/textures/' + metalnessName);
+      const metalness = textureLoader.load('resources/textures/' + metalnessName);
       metalness.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       metalness.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       metalness.wrapS = THREE.RepeatWrapping;
       metalness.wrapS = THREE.RepeatWrapping;
       metalness.wrapT = THREE.RepeatWrapping;
       metalness.wrapT = THREE.RepeatWrapping;
 
 
-      const normal = textureLoader.load('./resources/textures/' + normalName);
+      const normal = textureLoader.load('resources/textures/' + normalName);
       normal.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       normal.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       normal.wrapS = THREE.RepeatWrapping;
       normal.wrapS = THREE.RepeatWrapping;
       normal.wrapT = THREE.RepeatWrapping;
       normal.wrapT = THREE.RepeatWrapping;
 
 
-      const roughness = textureLoader.load('./resources/textures/' + roughnessName);
+      const roughness = textureLoader.load('resources/textures/' + roughnessName);
       roughness.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       roughness.anisotropy = this.FindEntity('threejs').GetComponent('ThreeJSController').getMaxAnisotropy();
       roughness.wrapS = THREE.RepeatWrapping;
       roughness.wrapS = THREE.RepeatWrapping;
       roughness.wrapT = THREE.RepeatWrapping;
       roughness.wrapT = THREE.RepeatWrapping;
@@ -305,7 +311,7 @@ vec3 pal( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
         const e = new entity.Entity();
         const e = new entity.Entity();
         e.AddComponent(new render_component.RenderComponent({
         e.AddComponent(new render_component.RenderComponent({
           scene: this.params_.scene,
           scene: this.params_.scene,
-          resourcePath: './resources/models/' + models[i][0] + '/',
+          resourcePath: 'resources/models/' + models[i][0] + '/',
           resourceName: 'scene.glb',
           resourceName: 'scene.glb',
           scale: new THREE.Vector3(models[i][1], models[i][1], models[i][1]),
           scale: new THREE.Vector3(models[i][1], models[i][1], models[i][1]),
           emissive: new THREE.Color(0x000000),
           emissive: new THREE.Color(0x000000),

+ 6 - 0
src/load-controller.js

@@ -6,6 +6,12 @@ import {entity} from "./entity.js";
 export const load_controller = (() => {
 export const load_controller = (() => {
 
 
   class LoadController extends entity.Component {
   class LoadController extends entity.Component {
+    static CLASS_NAME = 'LoadController';
+
+    get NAME() {
+      return LoadController.CLASS_NAME;
+    }
+
     constructor() {
     constructor() {
       super();
       super();
 
 

+ 1 - 1
src/main.js

@@ -52,7 +52,7 @@ class QuickFPS1 {
     fx.AddComponent(new blaster.BlasterSystem({
     fx.AddComponent(new blaster.BlasterSystem({
         scene: this.scene_,
         scene: this.scene_,
         camera: this.camera_,
         camera: this.camera_,
-        texture: './resources/textures/fx/tracer.png',
+        texture: 'resources/textures/fx/tracer.png',
     }));
     }));
     this.entityManager_.Add(fx, 'fx');
     this.entityManager_.Add(fx, 'fx');
 
 

+ 6 - 0
src/mesh-rigid-body.js

@@ -6,6 +6,12 @@ import {entity} from './entity.js';
 export const mesh_rigid_body = (() => {
 export const mesh_rigid_body = (() => {
 
 
   class MeshRigidBody extends entity.Component {
   class MeshRigidBody extends entity.Component {
+    static CLASS_NAME = 'MeshRigidBody';
+
+    get NAME() {
+      return MeshRigidBody.CLASS_NAME;
+    }
+    
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.group_ = new THREE.Group();
       this.group_ = new THREE.Group();

+ 6 - 0
src/player-controller.js

@@ -7,6 +7,12 @@ import {math} from './math.js';
 export const player_controller = (() => {
 export const player_controller = (() => {
 
 
   class PlayerController extends entity.Component {
   class PlayerController extends entity.Component {
+    static CLASS_NAME = 'PlayerController';
+
+    get NAME() {
+      return PlayerController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 0
src/player-input.js

@@ -15,6 +15,12 @@ export const player_input = (() => {
   };
   };
 
 
   class PlayerInput extends entity.Component {
   class PlayerInput extends entity.Component {
+    static CLASS_NAME = 'PlayerInput';
+
+    get NAME() {
+      return PlayerInput.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 0
src/render-component.js

@@ -6,6 +6,12 @@ import {entity} from './entity.js';
 export const render_component = (() => {
 export const render_component = (() => {
 
 
   class RenderComponent extends entity.Component {
   class RenderComponent extends entity.Component {
+    static CLASS_NAME = 'RenderComponent';
+
+    get NAME() {
+      return RenderComponent.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.group_ = new THREE.Group();
       this.group_ = new THREE.Group();

+ 6 - 0
src/shield-component.js

@@ -309,6 +309,12 @@ vec2 voronoiBorder(vec3 uv){
   }`;
   }`;
 
 
   class ShieldComponent extends entity.Component {
   class ShieldComponent extends entity.Component {
+    static CLASS_NAME = 'ShieldComponent';
+
+    get NAME() {
+      return ShieldComponent.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 6 - 0
src/spatial-grid-controller.js

@@ -4,6 +4,12 @@ import {entity} from './entity.js';
 export const spatial_grid_controller = (() => {
 export const spatial_grid_controller = (() => {
 
 
   class SpatialGridController extends entity.Component {
   class SpatialGridController extends entity.Component {
+    static CLASS_NAME = 'SpatialGridController';
+
+    get NAME() {
+      return SpatialGridController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
 
 

+ 19 - 1
src/spawners.js

@@ -20,6 +20,12 @@ import {attack_controller} from './attack-controller.js';
 export const spawners = (() => {
 export const spawners = (() => {
 
 
   class PlayerSpawner extends entity.Component {
   class PlayerSpawner extends entity.Component {
+    static CLASS_NAME = 'PlayerSpawner';
+
+    get NAME() {
+      return PlayerSpawner.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;
@@ -42,6 +48,12 @@ export const spawners = (() => {
   };
   };
 
 
   class Level1Spawner extends entity.Component {
   class Level1Spawner extends entity.Component {
+    static CLASS_NAME = 'Level1Spawner';
+
+    get NAME() {
+      return Level1Spawner.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;
@@ -59,6 +71,12 @@ export const spawners = (() => {
   };
   };
 
 
   class TargetSpawner extends entity.Component {
   class TargetSpawner extends entity.Component {
+    static CLASS_NAME = 'TargetSpawner';
+
+    get NAME() {
+      return TargetSpawner.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;
@@ -69,7 +87,7 @@ export const spawners = (() => {
       e.AddComponent(new target_entity.TargetCharacterController({
       e.AddComponent(new target_entity.TargetCharacterController({
         scene: this.params_.scene,
         scene: this.params_.scene,
         model: {
         model: {
-          path: './resources/quaternius/Enemies/',
+          path: 'resources/quaternius/Enemies/',
           name: 'Enemy_Large_Gun.glb',
           name: 'Enemy_Large_Gun.glb',
           scale: 2,
           scale: 2,
         },
         },

+ 6 - 0
src/target-controller.js

@@ -35,6 +35,12 @@ export const target_entity = (() => {
   };
   };
 
 
   class TargetCharacterController extends entity.Component {
   class TargetCharacterController extends entity.Component {
+    static CLASS_NAME = 'TargetCharacterController';
+
+    get NAME() {
+      return TargetCharacterController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
       this.params_ = params;
       this.params_ = params;

+ 18 - 12
src/threejs-component.js

@@ -73,6 +73,12 @@ export const threejs_component = (() => {
 
 
 
 
   class ThreeJSController extends entity.Component {
   class ThreeJSController extends entity.Component {
+    static CLASS_NAME = 'ThreeJSController';
+
+    get NAME() {
+      return ThreeJSController.CLASS_NAME;
+    }
+
     constructor() {
     constructor() {
       super();
       super();
     }
     }
@@ -249,22 +255,22 @@ export const threejs_component = (() => {
     LoadBackground_() {
     LoadBackground_() {
       const loader = new THREE.CubeTextureLoader();
       const loader = new THREE.CubeTextureLoader();
       const texture = loader.load([
       const texture = loader.load([
-          './resources/sky/Cold_Sunset__Cam_2_Left+X.png',
-          './resources/sky/Cold_Sunset__Cam_3_Right-X.png',
-          './resources/sky/Cold_Sunset__Cam_4_Up+Y.png',
-          './resources/sky/Cold_Sunset__Cam_5_Down-Y.png',
-          './resources/sky/Cold_Sunset__Cam_0_Front+Z.png',
-          './resources/sky/Cold_Sunset__Cam_1_Back-Z.png',
+          'resources/sky/Cold_Sunset__Cam_2_Left+X.png',
+          'resources/sky/Cold_Sunset__Cam_3_Right-X.png',
+          'resources/sky/Cold_Sunset__Cam_4_Up+Y.png',
+          'resources/sky/Cold_Sunset__Cam_5_Down-Y.png',
+          'resources/sky/Cold_Sunset__Cam_0_Front+Z.png',
+          'resources/sky/Cold_Sunset__Cam_1_Back-Z.png',
       ]);
       ]);
       texture.encoding = THREE.sRGBEncoding;
       texture.encoding = THREE.sRGBEncoding;
 
 
       const starTexture = loader.load([
       const starTexture = loader.load([
-          './resources/sky/space-posx.jpg',
-          './resources/sky/space-negx.jpg',
-          './resources/sky/space-posy.jpg',
-          './resources/sky/space-negy.jpg',
-          './resources/sky/space-posz.jpg',
-          './resources/sky/space-negz.jpg',
+          'resources/sky/space-posx.jpg',
+          'resources/sky/space-negx.jpg',
+          'resources/sky/space-posy.jpg',
+          'resources/sky/space-negy.jpg',
+          'resources/sky/space-posz.jpg',
+          'resources/sky/space-negz.jpg',
       ]);
       ]);
       starTexture.encoding = THREE.sRGBEncoding;
       starTexture.encoding = THREE.sRGBEncoding;
   
   

+ 6 - 0
src/ui-controller.js

@@ -5,6 +5,12 @@ import {THREE} from "./three-defs.js";
 export const ui_controller = (() => {
 export const ui_controller = (() => {
 
 
   class UIController extends entity.Component {
   class UIController extends entity.Component {
+    static CLASS_NAME = 'UIController';
+
+    get NAME() {
+      return UIController.CLASS_NAME;
+    }
+
     constructor(params) {
     constructor(params) {
       super();
       super();
     }
     }