From ba10f237a6a210ed221df5e82ee6d50ed2d851ef Mon Sep 17 00:00:00 2001 From: Reece Como Date: Wed, 24 Apr 2024 02:26:41 +1000 Subject: [PATCH] #4 fix Action.repeatForever() looping on nested chained actions --- dist/Action.d.ts | 9 ++- dist/Action.js | 105 +++++++++++++++++++++++-------- dist/Action.js.map | 2 +- package.json | 2 +- src/Action.ts | 133 +++++++++++++++++++++++++++++++--------- src/test/Action.test.ts | 89 +++++++++++++++++++++++++++ 6 files changed, 282 insertions(+), 58 deletions(-) diff --git a/dist/Action.d.ts b/dist/Action.d.ts index 4d9e0f6..c47acea 100644 --- a/dist/Action.d.ts +++ b/dist/Action.d.ts @@ -431,6 +431,12 @@ export declare abstract class Action { * Anything you return here will be available as `ticker.data`. */ protected _setupTicker(target: TargetNode, ticker: ActionTicker): any; + /** + * Do resetting ticker stuff here. + * + * Anything you return here will be available as `ticker.data`. + */ + protected _onDidReset(ticker: ActionTicker): any; } declare class ActionTicker { key: string | undefined; @@ -438,6 +444,7 @@ declare class ActionTicker { action: Action; protected static _running: ActionTicker[]; static runAction(key: string | undefined, target: TargetNode, action: Action): void; + reset(): void; static removeAction(actionTicker: ActionTicker): ActionTicker; static hasTargetActions(target: TargetNode): boolean; static getTargetActionTickerForKey(target: TargetNode, key: string): ActionTicker | undefined; @@ -477,8 +484,6 @@ declare class ActionTicker { */ duration: number; constructor(key: string | undefined, target: TargetNode, action: Action); - /** Whether action is in progress (or has not yet started). */ - get isPlaying(): boolean; /** The relative time elapsed between 0 and 1. */ get timeDistance(): number; /** diff --git a/dist/Action.js b/dist/Action.js index e6bc0e7..aaebed1 100644 --- a/dist/Action.js +++ b/dist/Action.js @@ -60,8 +60,7 @@ export class Action { * and then repeats it the same number of times. */ static repeat(action, repeats) { - const length = Math.max(0, Math.round(repeats)); - return Action.sequence(Array.from({ length }, () => action)); + return new RepeatAction(action, repeats); } /** * Creates an action that repeats another action forever. @@ -482,6 +481,14 @@ export class Action { _setupTicker(target, ticker) { return undefined; } + /** + * Do resetting ticker stuff here. + * + * Anything you return here will be available as `ticker.data`. + */ + _onDidReset(ticker) { + return undefined; + } } // // ----------------- Global Settings: ----------------- @@ -523,12 +530,6 @@ class GroupAction extends Action { this.index = 0; this.actions = actions; } - _setupTicker(target, ticker) { - ticker.autoComplete = false; - return { - childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) - }; - } updateAction(target, progress, progressDelta, ticker, timeDelta) { const relativeTimeDelta = timeDelta * this.speed; let allDone = true; @@ -545,6 +546,15 @@ class GroupAction extends Action { reversed() { return new GroupAction(this.actions.map(action => action.reversed())); } + _setupTicker(target, ticker) { + ticker.autoComplete = false; + return { + childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) + }; + } + _onDidReset(ticker) { + ticker.data.childTickers.forEach((ticker) => ticker.reset()); + } } class SequenceAction extends Action { constructor(actions) { @@ -553,12 +563,6 @@ class SequenceAction extends Action { actions.reduce((total, action) => total + action.scaledDuration, 0)); this.actions = actions; } - _setupTicker(target, ticker) { - ticker.autoComplete = false; - return { - childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) - }; - } updateAction(target, progress, progressDelta, ticker, timeDelta) { let allDone = true; let remainingTimeDelta = timeDelta * this.speed; @@ -585,6 +589,54 @@ class SequenceAction extends Action { const reversedSequence = [...this.actions].reverse().map(action => action.reversed()); return new SequenceAction(reversedSequence); } + _setupTicker(target, ticker) { + ticker.autoComplete = false; + return { + childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) + }; + } + _onDidReset(ticker) { + ticker.data.childTickers.forEach((ticker) => ticker.reset()); + } +} +class RepeatAction extends Action { + constructor(action, repeats) { + super( + // Duration: + action.scaledDuration * repeats); + this.action = action; + this.repeats = repeats; + if (Math.round(repeats) !== repeats || repeats < 0) { + throw new Error('Repeats must be a positive integer.'); + } + } + reversed() { + return new RepeatAction(this.action.reversed(), this.repeats); + } + updateAction(target, progress, progressDelta, ticker, timeDelta) { + let childTicker = ticker.data.childTicker; + let remainingTimeDelta = timeDelta * this.speed; + remainingTimeDelta = childTicker.stepActionForward(remainingTimeDelta); + if (remainingTimeDelta > 0) { + if (++ticker.data.n >= this.repeats) { + ticker.isDone = true; + return; + } + childTicker.reset(); + childTicker.stepActionForward(remainingTimeDelta); + } + } + _setupTicker(target, ticker) { + ticker.autoComplete = false; + return { + childTicker: new ActionTicker(undefined, target, this.action), + n: 0, + }; + } + _onDidReset(ticker) { + ticker.data.childTicker.reset(); + ticker.data.n = 0; + } } class RepeatForeverAction extends Action { constructor(action) { @@ -597,20 +649,23 @@ class RepeatForeverAction extends Action { reversed() { return new RepeatForeverAction(this.action.reversed()); } - _setupTicker(target, ticker) { - return { - childTicker: new ActionTicker(undefined, target, this.action) - }; - } updateAction(target, progress, progressDelta, ticker, timeDelta) { let childTicker = ticker.data.childTicker; let remainingTimeDelta = timeDelta * this.speed; remainingTimeDelta = childTicker.stepActionForward(remainingTimeDelta); if (remainingTimeDelta > 0) { - childTicker.elapsed = 0.0; // reset + childTicker.reset(); childTicker.stepActionForward(remainingTimeDelta); } } + _setupTicker(target, ticker) { + return { + childTicker: new ActionTicker(undefined, target, this.action) + }; + } + _onDidReset(ticker) { + ticker.data.childTicker.reset(); + } } class ScaleToSizeAction extends Action { constructor(width, height, duration) { @@ -998,6 +1053,11 @@ class ActionTicker { } this._running.push(new ActionTicker(key, target, action)); } + reset() { + this.elapsed = 0.0; + this.isDone = false; + this.action._onDidReset(this); + } static removeAction(actionTicker) { const index = ActionTicker._running.indexOf(actionTicker); if (index >= 0) { @@ -1078,10 +1138,6 @@ class ActionTicker { this.speed = action.speed; this.duration = action.scaledDuration; } - /** Whether action is in progress (or has not yet started). */ - get isPlaying() { - return this.isDone === false; - } /** The relative time elapsed between 0 and 1. */ get timeDistance() { return this.duration === 0 ? 1 : Math.min(1, this.elapsed / this.action.scaledDuration); @@ -1097,6 +1153,7 @@ class ActionTicker { /** @returns Any unused time delta. Negative value means action is still in progress. */ stepActionForward(timeDelta) { if (!this.isSetup) { + // cache action attributes this.speed = this.action.speed; this.duration = this.action.duration; this.data = this.action._setupTicker(this.target, this); diff --git a/dist/Action.js.map b/dist/Action.js.map index 7e3d9f3..0a94910 100644 --- a/dist/Action.js.map +++ b/dist/Action.js.map @@ -1 +1 @@ -{"version":3,"file":"Action.js","sourceRoot":"","sources":["../src/Action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,WAAW,GAAG,CAAC,GAAG,OAAO,CAAC;AAChC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AACjC,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AA4B5B,EAAE;AACF,sBAAsB;AACtB,EAAE;AAEF;;;;;;;;GAQG;AACH,MAAM,OAAgB,MAAM;IAoC1B,EAAE;IACF,wDAAwD;IACxD,EAAE;IAEF;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,KAAK,CAAC,OAAiB;QACnC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,QAAQ,CAAC,OAAiB;QACtC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,MAAM,CAAC,MAAc,EAAE,OAAe;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAO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AAG,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC,EAAE,WAAW,CAAC,CAAC;YACzF,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE;gBACpB,YAAY,CAAC,YAAY,CAAC,CAAC;gBAC3B,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,UAAU,CAAC,MAAM,GAAG,UAAU,MAAc;QAC1C,OAAO,YAAY,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC;IAEF,UAAU,CAAC,UAAU,GAAG;QACtB,OAAO,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,UAAU,CAAC,gBAAgB,GAAG;QAC5B,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,UAAU,CAAC,YAAY,GAAG,UAAU,MAAc;QAChD,YAAY,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index c34ddb4..a82213a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixijs-actions", - "version": "1.1.0", + "version": "1.1.1", "author": "Reece Como ", "authors": [ "Reece Como ", diff --git a/src/Action.ts b/src/Action.ts index a58491e..e8d5141 100644 --- a/src/Action.ts +++ b/src/Action.ts @@ -129,8 +129,7 @@ export abstract class Action { * and then repeats it the same number of times. */ public static repeat(action: Action, repeats: number): Action { - const length = Math.max(0, Math.round(repeats)); - return Action.sequence(Array.from({ length }, () => action)); + return new RepeatAction(action, repeats); } /** @@ -679,6 +678,15 @@ export abstract class Action { protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { return undefined; } + + /** + * Do resetting ticker stuff here. + * + * Anything you return here will be available as `ticker.data`. + */ + protected _onDidReset(ticker: ActionTicker): any { + return undefined; + } } // @@ -698,14 +706,6 @@ class GroupAction extends Action { this.actions = actions; } - protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { - ticker.autoComplete = false; - - return { - childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) - }; - } - public updateAction( target: TargetNode, progress: number, @@ -731,6 +731,18 @@ class GroupAction extends Action { public reversed(): Action { return new GroupAction(this.actions.map(action => action.reversed())); } + + protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { + ticker.autoComplete = false; + + return { + childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) + }; + } + + protected _onDidReset(ticker: ActionTicker): any { + ticker.data.childTickers.forEach((ticker: ActionTicker) => ticker.reset()); + } } class SequenceAction extends Action { @@ -744,14 +756,6 @@ class SequenceAction extends Action { this.actions = actions; } - protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { - ticker.autoComplete = false; - - return { - childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) - }; - } - public updateAction( target: TargetNode, progress: number, @@ -789,6 +793,69 @@ class SequenceAction extends Action { const reversedSequence = [...this.actions].reverse().map(action => action.reversed()); return new SequenceAction(reversedSequence); } + + protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { + ticker.autoComplete = false; + + return { + childTickers: this.actions.map(action => new ActionTicker(undefined, target, action)) + }; + } + + protected _onDidReset(ticker: ActionTicker): any { + ticker.data.childTickers.forEach((ticker: ActionTicker) => ticker.reset()); + } +} + +class RepeatAction extends Action { + public constructor( + protected readonly action: Action, + protected readonly repeats: number, + ) { + super( + // Duration: + action.scaledDuration * repeats + ); + + if (Math.round(repeats) !== repeats || repeats < 0) { + throw new Error('Repeats must be a positive integer.'); + } + } + + public reversed(): Action { + return new RepeatAction(this.action.reversed(), this.repeats); + } + + public updateAction(target: TargetNode, progress: number, progressDelta: number, ticker: ActionTicker, timeDelta: number): void { + let childTicker: ActionTicker = ticker.data.childTicker; + let remainingTimeDelta = timeDelta * this.speed; + + remainingTimeDelta = childTicker.stepActionForward(remainingTimeDelta); + + if (remainingTimeDelta > 0) { + if (++ticker.data.n >= this.repeats) { + ticker.isDone = true; + return; + } + + childTicker.reset(); + childTicker.stepActionForward(remainingTimeDelta); + } + } + + protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { + ticker.autoComplete = false; + + return { + childTicker: new ActionTicker(undefined, target, this.action), + n: 0, + }; + } + + protected _onDidReset(ticker: ActionTicker): any { + ticker.data.childTicker.reset(); + ticker.data.n = 0; + } } class RepeatForeverAction extends Action { @@ -806,12 +873,6 @@ class RepeatForeverAction extends Action { return new RepeatForeverAction(this.action.reversed()); } - protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { - return { - childTicker: new ActionTicker(undefined, target, this.action) - }; - } - public updateAction(target: TargetNode, progress: number, progressDelta: number, ticker: ActionTicker, timeDelta: number): void { let childTicker: ActionTicker = ticker.data.childTicker; let remainingTimeDelta = timeDelta * this.speed; @@ -819,10 +880,20 @@ class RepeatForeverAction extends Action { remainingTimeDelta = childTicker.stepActionForward(remainingTimeDelta); if (remainingTimeDelta > 0) { - childTicker.elapsed = 0.0; // reset + childTicker.reset(); childTicker.stepActionForward(remainingTimeDelta); } } + + protected _setupTicker(target: TargetNode, ticker: ActionTicker): any { + return { + childTicker: new ActionTicker(undefined, target, this.action) + }; + } + + protected _onDidReset(ticker: ActionTicker): any { + ticker.data.childTicker.reset(); + } } class ScaleToSizeAction extends Action { @@ -1360,6 +1431,12 @@ class ActionTicker { this._running.push(new ActionTicker(key, target, action)); } + public reset(): void { + this.elapsed = 0.0; + this.isDone = false; + (this.action as any)._onDidReset(this); + } + public static removeAction(actionTicker: ActionTicker): ActionTicker { const index = ActionTicker._running.indexOf(actionTicker); if (index >= 0) { @@ -1486,11 +1563,6 @@ class ActionTicker { this.duration = action.scaledDuration; } - /** Whether action is in progress (or has not yet started). */ - public get isPlaying(): boolean { - return this.isDone === false; - } - /** The relative time elapsed between 0 and 1. */ public get timeDistance(): number { return this.duration === 0 ? 1 : Math.min(1, this.elapsed / this.action.scaledDuration); @@ -1508,6 +1580,7 @@ class ActionTicker { /** @returns Any unused time delta. Negative value means action is still in progress. */ public stepActionForward(timeDelta: number): number { if (!this.isSetup) { + // cache action attributes this.speed = this.action.speed; this.duration = this.action.duration; this.data = (this.action as any)._setupTicker(this.target, this); diff --git a/src/test/Action.test.ts b/src/test/Action.test.ts index 43135aa..eff2a88 100644 --- a/src/test/Action.test.ts +++ b/src/test/Action.test.ts @@ -98,6 +98,37 @@ describe('Action Chaining', () => { expect(node.position.x).toBeCloseTo(22); expect(node.hasActions()).toBe(false); }); + + it('should loop over a group', () => { + const group = Action.group([ + Action.moveByX(5, 1.0), + Action.moveByX(5, 0.0), + Action.waitForDuration(1.0), + ]); + const action = Action.repeat(group, 3); + + expect(action.duration).toBeCloseTo(3.0); + expect(action.scaledDuration).toBeCloseTo(3.0); + + const node = new Container(); + node.run(action); + expect(node.hasActions()).toBe(true); + + simulateTime(1.0); + expect(node.position.x).toBeCloseTo(10); + + simulateTime(1.0); + expect(node.position.x).toBeCloseTo(20); + + simulateTime(1.0); + expect(node.position.x).toBeCloseTo(30); + + simulateTime(1.0); + expect(node.position.x).toBeCloseTo(30); + + // Sanity check: We're still going. + expect(node.hasActions()).toBe(false); + }); }); describe('repeatForever()', () => { @@ -126,6 +157,64 @@ describe('Action Chaining', () => { // Cleanup. node.removeAllActions(); }); + + it('should loop over a group', () => { + const group = Action.group([ + Action.moveByX(5, 1.0), + Action.moveByX(5, 0.0), + Action.waitForDuration(1.0), + ]); + const action = Action.repeatForever(group); + + const node = new Container(); + node.run(action); + expect(node.hasActions()).toBe(true); + + simulateTime(0.5); + expect(node.position.x).toBeCloseTo(7.5); + + simulateTime(0.5); + expect(node.position.x).toBeCloseTo(10); + + simulateTime(0.5); + expect(node.position.x).toBeCloseTo(17.5); + + simulateTime(0.499999); + expect(node.position.x).toBeCloseTo(20); + + // Sanity check: We're still going. + expect(node.hasActions()).toBe(true); + + // Cleanup. + node.removeAllActions(); + }); + + it('should loop over a sequence', () => { + const group = Action.sequence([ + Action.moveByX(5, 1.0), + Action.moveByY(5, 1.0), + Action.waitForDuration(1.0), + ]); + const action = Action.repeatForever(group); + + const node = new Container(); + node.run(action); + + simulateTime(3.0); + expect(node.position.x).toBeCloseTo(5); + + simulateTime(3.0); + expect(node.position.x).toBeCloseTo(10); + + simulateTime(3.0); + expect(node.position.x).toBeCloseTo(15); + + // Sanity check: We're still going. + expect(node.hasActions()).toBe(true); + + // Cleanup. + node.removeAllActions(); + }); }); });