From 130fe4ca5d709bf9e4073e4eecc7fbbde63151fd Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 22 May 2026 00:00:23 -0500 Subject: [PATCH] Delete JS assets --- assets/cutscenes/MoveCubeCutscene.js | 30 --------- assets/entities/CubeEntity.js | 24 ------- assets/entities/OverworldEntity.js | 21 ------- assets/init.js | 93 ---------------------------- assets/maps/test/chunks/-1_0_0.js | 17 ----- assets/maps/test/chunks/0_0_0.js | 17 ----- assets/maps/test/chunks/0_0_1.js | 17 ----- assets/maps/test/chunks/0_1_0.js | 17 ----- assets/maps/test/chunks/1_0_0.js | 17 ----- assets/maps/test/chunks/2_0_0.js | 17 ----- assets/maps/test/chunks/3_0_0.js | 17 ----- assets/maps/test/init.js | 17 ----- assets/scenes/cube.js | 33 ---------- 13 files changed, 337 deletions(-) delete mode 100644 assets/cutscenes/MoveCubeCutscene.js delete mode 100644 assets/entities/CubeEntity.js delete mode 100644 assets/entities/OverworldEntity.js delete mode 100644 assets/init.js delete mode 100644 assets/maps/test/chunks/-1_0_0.js delete mode 100644 assets/maps/test/chunks/0_0_0.js delete mode 100644 assets/maps/test/chunks/0_0_1.js delete mode 100644 assets/maps/test/chunks/0_1_0.js delete mode 100644 assets/maps/test/chunks/1_0_0.js delete mode 100644 assets/maps/test/chunks/2_0_0.js delete mode 100644 assets/maps/test/chunks/3_0_0.js delete mode 100644 assets/maps/test/init.js delete mode 100644 assets/scenes/cube.js diff --git a/assets/cutscenes/MoveCubeCutscene.js b/assets/cutscenes/MoveCubeCutscene.js deleted file mode 100644 index 64d9debb..00000000 --- a/assets/cutscenes/MoveCubeCutscene.js +++ /dev/null @@ -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; diff --git a/assets/entities/CubeEntity.js b/assets/entities/CubeEntity.js deleted file mode 100644 index bc6ece92..00000000 --- a/assets/entities/CubeEntity.js +++ /dev/null @@ -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; diff --git a/assets/entities/OverworldEntity.js b/assets/entities/OverworldEntity.js deleted file mode 100644 index 2d4d6d5e..00000000 --- a/assets/entities/OverworldEntity.js +++ /dev/null @@ -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; \ No newline at end of file diff --git a/assets/init.js b/assets/init.js deleted file mode 100644 index 26e4c743..00000000 --- a/assets/init.js +++ /dev/null @@ -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)); \ No newline at end of file diff --git a/assets/maps/test/chunks/-1_0_0.js b/assets/maps/test/chunks/-1_0_0.js deleted file mode 100644 index e3c60752..00000000 --- a/assets/maps/test/chunks/-1_0_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/0_0_0.js b/assets/maps/test/chunks/0_0_0.js deleted file mode 100644 index c0dae0e7..00000000 --- a/assets/maps/test/chunks/0_0_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/0_0_1.js b/assets/maps/test/chunks/0_0_1.js deleted file mode 100644 index 1a1614e9..00000000 --- a/assets/maps/test/chunks/0_0_1.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/0_1_0.js b/assets/maps/test/chunks/0_1_0.js deleted file mode 100644 index 5c78e046..00000000 --- a/assets/maps/test/chunks/0_1_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/1_0_0.js b/assets/maps/test/chunks/1_0_0.js deleted file mode 100644 index ec7fafcc..00000000 --- a/assets/maps/test/chunks/1_0_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/2_0_0.js b/assets/maps/test/chunks/2_0_0.js deleted file mode 100644 index 4c1c1db5..00000000 --- a/assets/maps/test/chunks/2_0_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/chunks/3_0_0.js b/assets/maps/test/chunks/3_0_0.js deleted file mode 100644 index 91cca6c8..00000000 --- a/assets/maps/test/chunks/3_0_0.js +++ /dev/null @@ -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; diff --git a/assets/maps/test/init.js b/assets/maps/test/init.js deleted file mode 100644 index 5ce0a9bc..00000000 --- a/assets/maps/test/init.js +++ /dev/null @@ -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; diff --git a/assets/scenes/cube.js b/assets/scenes/cube.js deleted file mode 100644 index bc745355..00000000 --- a/assets/scenes/cube.js +++ /dev/null @@ -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;