A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
test(animation): notify replay state changes through world update
yhhf92bad1db121
diff --git a/sdk/tests/sprite-timing-wasm.test.ts b/sdk/tests/sprite-timing-wasm.test.tsindex 3fd4e562c..a4fa38587 100644--- a/sdk/tests/sprite-timing-wasm.test.ts+++ b/sdk/tests/sprite-timing-wasm.test.ts@@ -65,7 +65,8 @@ describe.skipIf(!HAS_WASM)('sprite timing on real WASM', () => {const value = clip(false); value.frames = [{ texture: 1 }]; value.events = [{ frame: 0, name: 'zero' }];const entity = spawn(value), events: string[] = []; api.onEvent(entity, event => events.push(event.name));api.update(world, 0); api.update(world, .125);- world.get(entity, SpriteAnimator).playing = true; api.update(world, 0); api.update(world, 0);+ world.update(entity, SpriteAnimator, animator => { animator.playing = true; });+ api.update(world, 0); api.update(world, 0);expect(events).toEqual(['zero', 'zero']);});