Delete JS assets

This commit is contained in:
2026-05-22 00:00:23 -05:00
parent 31ba3fe127
commit 130fe4ca5d
13 changed files with 0 additions and 337 deletions
-30
View File
@@ -1,30 +0,0 @@
function MoveCubeCutscene(params) {
Cutscene.call(this);
this.cube = params.cube;
var SPEED = 3.0;
var DURATION = 2.0;
this.anim = new Animation([
[
{ time: 0.0, value: 0, easing: Easing.inOutQuad },
{ time: DURATION, value: -(SPEED * DURATION), easing: Easing.inOutQuad },
{ time: DURATION * 2, value: 0 }
]
]);
this.anim.onComplete = function() {
Cutscene.finish();
};
}
MoveCubeCutscene.prototype = Object.create(Cutscene.prototype);
MoveCubeCutscene.prototype.constructor = MoveCubeCutscene;
MoveCubeCutscene.prototype.update = function() {
this.anim.update(TIME.delta);
this.cube.position.position.x = this.anim.properties[0].value;
};
module = MoveCubeCutscene;
-24
View File
@@ -1,24 +0,0 @@
var OverworldEntity = include('entities/OverworldEntity.js');
function CubeEntity() {
OverworldEntity.call(this);
this.add(RENDERABLE);
this.cubeMesh = Mesh.createCube();
this.renderable.mesh = this.cubeMesh;
}
CubeEntity.prototype = Object.create(OverworldEntity.prototype);
CubeEntity.prototype.constructor = CubeEntity;
CubeEntity.prototype.update = function() {
OverworldEntity.prototype.update.call(this);
var speed = 5.0;
var move = Input.axis2D(INPUT_ACTION_LEFT, INPUT_ACTION_RIGHT, INPUT_ACTION_UP, INPUT_ACTION_DOWN);
this.position.position.x += move.x * speed * TIME.delta;
this.position.position.z += move.y * speed * TIME.delta;
this.renderable.color = Color.rainbow();
};
module = CubeEntity;
-21
View File
@@ -1,21 +0,0 @@
function OverworldEntity() {
Entity.call(this);
this.add(POSITION);
}
OverworldEntity.prototype = Object.create(Entity.prototype);
OverworldEntity.prototype.constructor = OverworldEntity;
OverworldEntity.prototype.update = function() {
// var speed = 3.0;
// var move = Input.axis2D(INPUT_ACTION_LEFT, INPUT_ACTION_RIGHT, INPUT_ACTION_UP, INPUT_ACTION_DOWN);
// this.position.position.x += move.x * speed * TIME.delta;
// this.position.position.z += move.y * speed * TIME.delta;
}
OverworldEntity.prototype.dispose = function() {
Entity.prototype.dispose.call(this);
}
module = OverworldEntity;
-93
View File
@@ -1,93 +0,0 @@
Console.visible = true;
// Default input bindings.
if (typeof PSP !== 'undefined') {
Input.bind("up", INPUT_ACTION_UP);
Input.bind("down", INPUT_ACTION_DOWN);
Input.bind("left", INPUT_ACTION_LEFT);
Input.bind("right", INPUT_ACTION_RIGHT);
Input.bind("accept", INPUT_ACTION_ACCEPT);
Input.bind("cancel", INPUT_ACTION_CANCEL);
Input.bind("select", INPUT_ACTION_RAGEQUIT);
Input.bind("lstick_up", INPUT_ACTION_UP);
Input.bind("lstick_down", INPUT_ACTION_DOWN);
Input.bind("lstick_left", INPUT_ACTION_LEFT);
Input.bind("lstick_right", INPUT_ACTION_RIGHT);
Input.bind("triangle", INPUT_ACTION_CONSOLE);
} else if (typeof DOLPHIN !== 'undefined') {
Input.bind("up", INPUT_ACTION_UP);
Input.bind("down", INPUT_ACTION_DOWN);
Input.bind("left", INPUT_ACTION_LEFT);
Input.bind("right", INPUT_ACTION_RIGHT);
Input.bind("b", INPUT_ACTION_CANCEL);
Input.bind("a", INPUT_ACTION_ACCEPT);
Input.bind("z", INPUT_ACTION_CONSOLE);
Input.bind("lstick_up", INPUT_ACTION_UP);
Input.bind("lstick_down", INPUT_ACTION_DOWN);
Input.bind("lstick_left", INPUT_ACTION_LEFT);
Input.bind("lstick_right", INPUT_ACTION_RIGHT);
} else if (typeof LINUX !== 'undefined') {
if (typeof INPUT_KEYBOARD !== 'undefined') {
Input.bind("w", INPUT_ACTION_UP);
Input.bind("s", INPUT_ACTION_DOWN);
Input.bind("a", INPUT_ACTION_LEFT);
Input.bind("d", INPUT_ACTION_RIGHT);
Input.bind("left", INPUT_ACTION_LEFT);
Input.bind("right", INPUT_ACTION_RIGHT);
Input.bind("up", INPUT_ACTION_UP);
Input.bind("down", INPUT_ACTION_DOWN);
Input.bind("enter", INPUT_ACTION_ACCEPT);
Input.bind("e", INPUT_ACTION_ACCEPT);
Input.bind("q", INPUT_ACTION_CANCEL);
Input.bind("escape", INPUT_ACTION_RAGEQUIT);
Input.bind("`", INPUT_ACTION_CONSOLE);
}
if (typeof INPUT_GAMEPAD !== 'undefined') {
Input.bind("gamepad_up", INPUT_ACTION_UP);
Input.bind("gamepad_down", INPUT_ACTION_DOWN);
Input.bind("gamepad_left", INPUT_ACTION_LEFT);
Input.bind("gamepad_right", INPUT_ACTION_RIGHT);
Input.bind("gamepad_a", INPUT_ACTION_ACCEPT);
Input.bind("gamepad_b", INPUT_ACTION_CANCEL);
Input.bind("gamepad_back", INPUT_ACTION_RAGEQUIT);
Input.bind("gamepad_lstick_up", INPUT_ACTION_UP);
Input.bind("gamepad_lstick_down", INPUT_ACTION_DOWN);
Input.bind("gamepad_lstick_left", INPUT_ACTION_LEFT);
Input.bind("gamepad_lstick_right", INPUT_ACTION_RIGHT);
}
if (typeof INPUT_POINTER !== 'undefined') {
Input.bind("mouse_x", INPUT_ACTION_POINTERX);
Input.bind("mouse_y", INPUT_ACTION_POINTERY);
}
} else {
print("Unknown platform, no default input bindings set.");
}
Scene.set('scenes/cube.js');
// Console.print("Testing save stuff;");
// Console.print("Save Count: " + Save.count);
// Console.print("Save 0 exists? " + Save.exists(0));
// try {
// Save.load(0);
// Console.print("Successfully loaded save 0.");
// } catch (e) {
// Console.print("Error loading save 0: " + e);
// Save.delete(0);
// }
// Console.print("Save 0 exists? " + Save.exists(0));
// Console.print("Writing...");
// Save.write(0);
// Console.print("Save 0 exists? " + Save.exists(0));
// Console.print("Save 0 data: " + Save.load(0));
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunkN100(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(-16, 0, 0);
}
TestChunkN100.prototype = Object.create(MapChunk.prototype);
TestChunkN100.prototype.constructor = TestChunkN100;
TestChunkN100.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunkN100;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk000(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(0, 0, 0);
}
TestChunk000.prototype = Object.create(MapChunk.prototype);
TestChunk000.prototype.constructor = TestChunk000;
TestChunk000.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk000;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk001(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(0, 0, 16);
}
TestChunk001.prototype = Object.create(MapChunk.prototype);
TestChunk001.prototype.constructor = TestChunk001;
TestChunk001.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk001;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk010(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(0, 16, 0);
}
TestChunk010.prototype = Object.create(MapChunk.prototype);
TestChunk010.prototype.constructor = TestChunk010;
TestChunk010.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk010;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk100(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(16, 0, 0);
}
TestChunk100.prototype = Object.create(MapChunk.prototype);
TestChunk100.prototype.constructor = TestChunk100;
TestChunk100.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk100;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk200(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(32, 0, 0);
}
TestChunk200.prototype = Object.create(MapChunk.prototype);
TestChunk200.prototype.constructor = TestChunk200;
TestChunk200.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk200;
-17
View File
@@ -1,17 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function TestChunk300(x, y, z) {
MapChunk.call(this, x, y, z);
this.cube = new CubeEntity();
this.cube.position.position = new Vec3(48, 0, 0);
}
TestChunk300.prototype = Object.create(MapChunk.prototype);
TestChunk300.prototype.constructor = TestChunk300;
TestChunk300.prototype.dispose = function() {
this.cube.dispose();
};
module = TestChunk300;
-17
View File
@@ -1,17 +0,0 @@
function TestMap() {
Map.call(this);
Map.setChunkSize(16, 16, 16);
Map.setPosition(0, 0, 0);
}
TestMap.prototype = Object.create(Map.prototype);
TestMap.prototype.constructor = TestMap;
TestMap.prototype.update = function() {
};
TestMap.prototype.dispose = function() {
};
module = TestMap;
-33
View File
@@ -1,33 +0,0 @@
var CubeEntity = include('entities/CubeEntity.js');
function CubeScene() {
Map.load('test');
this.cam = new Entity();
this.cam.add(POSITION);
this.cam.add(CAMERA);
this.player = new CubeEntity();
this.player.position.position = new Vec3(0, 0, 0);
}
CubeScene.prototype = Object.create(Scene.prototype);
CubeScene.prototype.constructor = CubeScene;
CubeScene.prototype.update = function() {
this.player.update();
var pos = this.player.position.position;
this.cam.position.position = new Vec3(pos.x, pos.y + 8, pos.z + 8);
this.cam.position.lookAt(pos);
Map.setPosition(Math.floor(pos.x), Math.floor(pos.y), Math.floor(pos.z));
};
CubeScene.prototype.dispose = function() {
this.cam.dispose();
this.player.dispose();
Map.dispose();
};
module = CubeScene;