Add strided memory pushing and improved spritebatching

This commit is contained in:
2026-05-08 20:53:05 -05:00
parent 73e73d8772
commit 1ff990ff44
14 changed files with 355 additions and 126 deletions
+17 -16
View File
@@ -7,29 +7,30 @@ function MoveCubeCutscene(params) {
var startX = this.cube.position.position.x;
this.animLeft = new Animation([
{ time: 0.0, value: startX, easing: Easing.outQuad },
{ time: DURATION, value: startX - SPEED * DURATION }
]);
// this.animLeft = new Animation([
// { time: 0.0, value: startX, easing: Easing.outQuad },
// { time: DURATION, value: startX - SPEED * DURATION }
// ]);
this.animRight = new Animation([
{ time: 0.0, value: startX - SPEED * DURATION, easing: Easing.inOutQuad },
{ time: DURATION, value: startX }
]);
// this.animRight = new Animation([
// { time: 0.0, value: startX - SPEED * DURATION, easing: Easing.inOutQuad },
// { time: DURATION, value: startX }
// ]);
}
MoveCubeCutscene.prototype = Object.create(Cutscene.prototype);
MoveCubeCutscene.prototype.constructor = MoveCubeCutscene;
MoveCubeCutscene.prototype.update = function() {
if(!this.animLeft.complete) {
this.cube.position.position.x = this.animLeft.update(TIME.delta);
} else {
this.cube.position.position.x = this.animRight.update(TIME.delta);
if(this.animRight.complete) {
Cutscene.finish();
}
}
Cutscene.finish();
// if(!this.animLeft.complete) {
// this.cube.position.position.x = this.animLeft.update(TIME.delta);
// } else {
// this.cube.position.position.x = this.animRight.update(TIME.delta);
// if(this.animRight.complete) {
// Cutscene.finish();
// }
// }
};
module = MoveCubeCutscene;