Refactor pass 1

This commit is contained in:
2026-04-29 14:53:35 -05:00
parent bd248ee91c
commit 61f69af35a
38 changed files with 1007 additions and 1541 deletions
+4 -2
View File
@@ -7,7 +7,10 @@ var Cube = {
e.position.z = 0;
e.add(COMPONENT_TYPE_MESH);
e.add(COMPONENT_TYPE_MATERIAL);
e.material.setColor(colorRed());
// e.material.setColor(Color.black());
print(Color);
print(Color.prototype);
return {
_e: e,
@@ -22,7 +25,6 @@ var Cube = {
var dz = inputAxis(INPUT_ACTION_UP, INPUT_ACTION_DOWN);
this._e.position.x += dx * speed * TIME.delta;
this._e.position.z += dz * speed * TIME.delta;
this._e.material.setColor(colorRainbow());
},
dispose: function() {
-3
View File
@@ -1,7 +1,5 @@
var Cube = include('entities/cube.js');
print('Screen.aspect in JavaScript: ' + Screen.aspect);
var cam;
var cube;
@@ -14,7 +12,6 @@ var SceneCube = {
cam.position.z = 3;
cam.position.lookAt(0, 0, 0);
cam.add(COMPONENT_TYPE_CAMERA);
cube = Cube.create();
},