@puxi/tween
Version:
PixiJS tweening library
1 lines • 19.8 kB
Source Map (JSON)
{"version":3,"file":"puxi-tween.js","sources":["../src/Tween.ts","../src/TweenManager.ts","../src/Ease.ts","../src/Interpolator.ts","../src/index.ts"],"sourcesContent":["import { Ease } from './Ease';\nimport { Erp } from './Interpolator';\nimport * as PIXI from 'pixi.js';\nimport { TweenManager } from './TweenManager';\n\nexport interface TweenTarget<T>\n{\n [key: string]: T;\n}\n\n/**\n * Holds the information needed to perform a tweening operation. It is used internally\n * by `PUXI.tween.TweenManager`.\n *\n * @memberof PUXI.tween\n * @class\n * @template T\n */\nexport class Tween<T> extends PIXI.utils.EventEmitter\n{\n startValue: T;\n endValue: T;\n erp: Erp<T>;\n ease: Ease;\n\n startTime: DOMHighResTimeStamp;\n endTime: DOMHighResTimeStamp;\n\n manager: TweenManager;\n key: number;\n observedValue: T;\n\n autoCreated: boolean;\n\n protected _repeat: number;\n protected _flip: boolean;\n protected _next: Tween<any>;\n\n protected _target: TweenTarget<T>;\n protected _observedProperty: string;\n\n constructor( // eslint-disable-line max-params\n manager?: TweenManager,\n key?: number,\n startValue?: T,\n endValue?: T,\n erp?: Erp<T>,\n ease?: Ease,\n observedValue?: T,\n startTime?: DOMHighResTimeStamp,\n endTime?: DOMHighResTimeStamp,\n repeat = 1,\n flip = true)\n {\n super();\n\n /**\n * The tween-manager whose update loop handles this tween.\n * @member {PUXI.TweenManager}\n */\n this.manager = manager;\n\n /**\n * Unique id for this tweening operation\n * @member {string}\n */\n this.key = key;\n\n /**\n * Start value of interpolation\n * @member {T}\n */\n this.startValue = startValue;\n\n /**\n * End value of interpolation\n * @member {T}\n */\n this.endValue = endValue;\n\n /**\n * Linear interpolator on tween property.\n * @member {Erp}\n */\n this.erp = erp;\n\n /**\n * Easing function\n * @member {Ease}\n */\n this.ease = ease;\n\n /**\n * Object that is observed and the interpolated value to be stored in.\n * @member {T}\n */\n this.observedValue = observedValue;\n\n /**\n * @member {DOMHighResTimeStamp}\n * @readonly\n */\n this.startTime = startTime;\n\n /**\n * @member {DOMHighResTimeStamp}\n * @readonly\n */\n this.endTime = endTime;\n\n this._repeat = repeat;\n this._flip = flip;\n this._next = null;\n this._target = null;\n this._observedProperty = null;\n\n this.autoCreated = false;\n }\n\n /**\n * Updates the observed value.\n *\n * @param {DOMHighResTimeStamp} t - current time\n */\n update(t: DOMHighResTimeStamp = performance.now()): void\n {\n t = (t - this.startTime) / (this.endTime - this.startTime);\n t = Math.min(Math.max(t, 0), 1);\n\n if (this.ease)\n {\n t = this.ease(t);\n }\n\n // Update observed value\n this.observedValue = this.erp(\n this.startValue,\n this.endValue,\n Math.min(Math.max(t, 0), 1),\n this.observedValue,\n );\n\n // Emit update event\n this.emit('update', this.observedValue, this.key);\n\n // Update target object (if any)\n if (this._target)\n {\n this._target[this._observedProperty] = this.observedValue;\n }\n\n // If cycle completed...\n if (t >= 1)\n {\n --this._repeat;\n\n this.emit('cycle', this);\n\n // Repeat tween if required\n if (this._repeat > 0)\n {\n if (this._flip)\n {\n const { startValue: s, endValue: e } = this;\n\n this.endValue = s;\n this.startValue = e;\n }\n\n const duration = this.endTime - this.startTime;\n\n this.startTime += duration;\n this.endTime += duration;\n\n return;\n }\n\n // Initiate chained tween\n if (this._next)\n {\n this.manager.queue(this._next);\n }\n\n this.reset();\n\n // Cleanup after completion\n this.emit('complete', this);\n this.removeAllListeners();\n }\n }\n\n /**\n * Configures this tween to update the observed-property on a tween target object\n * each animation frame.\n * @template T\n * @param {PUXI.TweenTarget<T>} target - object on which property is being tweened\n * @param {string} observedProperty - name of property on target\n */\n target(target: TweenTarget<T>, observedProperty: string): Tween<T>\n {\n this._target = target;\n this._observedProperty = observedProperty;\n\n return this;\n }\n\n /**\n * Repeats this tween `repeat` no. of times again. If the tween is still running,\n * then this is no. of times it will again (not added to the previous repeat\n * count).\n *\n * Each time the tween is repeated, a `cycle` event is fired.\n *\n * By default, the repeat count of any tween is 1.\n *\n * @param {number} repeat - the repeat count\n * @param {boolean}[flip=true] - whether to switch start/end values each cycle\n * @returns {Tween<T>} - this tween, useful for method chaining\n */\n repeat(repeat: number, flip = true): Tween<T>\n {\n this._repeat = repeat;\n this._flip = flip;\n\n return this;\n }\n\n /**\n * Chains a tween that will run after this one finishes.\n *\n * @template W\n * @param {W} startValue\n * @param {W} endValue\n * @param {DOMHighResTimeStamp} duration\n * @param {PUXI.Erp<W>} erp\n * @param {PUXI.Ease}[ease]\n */\n chain<W>(startValue: W, endValue: W, duration: DOMHighResTimeStamp, erp: Erp<W>, ease: Ease): Tween<W>\n {\n const next = (Tween.pool.pop() || new Tween<W>()) as Tween<W>;\n\n next.manager = this.manager;\n next.key = 0;\n next.startValue = startValue;\n next.endValue = endValue;\n next.startTime = this.endTime;\n next.endTime = next.startTime + duration;\n next.erp = erp;\n next.ease = ease;\n\n this._next = next;\n\n return next;\n }\n\n /**\n * Clears the tween's extra properties.\n */\n reset(): void\n {\n this.ease = null;\n this._repeat = 0;\n this._next = null;\n this._target = null;\n this._observedProperty = null;\n }\n\n /**\n * Called when a tween is complete and no references to it are held. This\n * will pool it (if auto-created).\n *\n * Custom tweens should override this.\n */\n destroy(): void\n {\n this.reset();\n\n if (this.autoCreated)\n {\n Tween.pool.push(this);\n }\n }\n\n /**\n * Fired whenever the observed value is updated.\n * @event update\n * @param {T} observedValue\n * @param {number} key\n */\n\n /**\n * Fired whenever the tween has \"repeated\" once.\n * @event cycle\n * @param {Tween} cxt\n */\n\n /**\n * Fired when tween has finished. References to this tween should be removed.\n * @event complete\n * @param {Tween} cxt\n */\n\n /**\n * Used for pooling.\n * @member {Array<TweenContext>}\n * @static\n */\n static pool: Array<Tween<any>> = [];\n}\n","import { Tween } from './Tween';\nimport { Ease } from './Ease';\nimport { Erp } from './Interpolator';\nimport { Ticker } from 'pixi.js';\n\n// TODO: Prevent update loop from starting if there are no queued tweens.\n\nexport let nextTweenKey = 0;\n\n/**\n * @memberof PUXI.tween\n * @class\n */\nexport class TweenManager\n{\n protected tweenMap: Map<number, Tween<any>>;\n\n private isRunning: boolean;\n\n constructor(autoStart = true)\n {\n this.tweenMap = new Map<number, Tween<any>>();\n\n if (autoStart)\n {\n this.start();\n }\n }\n\n /**\n * Initiates a tween from `startValue` to `endValue` for the given duration\n * using an interpolator.\n *\n * @template {T}\n * @param {T} startValue - value of tween property at start\n * @param {T} endValue - value of tween property at finish\n * @param {DOMHighResTimeStamp | number} duration - duration of tween in milliseconds\n * @param {PUXI.Erp<T>} erp - interpolator on tween property\n * @param {PUXI.Ease}[ease] - easing function\n */\n tween<T>(\n startValue: T,\n endValue: T,\n duration: DOMHighResTimeStamp,\n erp: Erp<T>,\n ease?: Ease,\n ): Tween<T>\n {\n const tweenCxt = (Tween.pool.pop() || new Tween()) as Tween<T>;\n\n tweenCxt.autoCreated = true;\n tweenCxt.reset();\n\n tweenCxt.manager = this;\n tweenCxt.key = nextTweenKey++;\n tweenCxt.startValue = startValue;\n tweenCxt.endValue = endValue;\n tweenCxt.erp = erp;\n tweenCxt.ease = ease;\n tweenCxt.startTime = performance.now();\n tweenCxt.endTime = tweenCxt.startTime + duration;\n\n this.tweenMap.set(tweenCxt.key, tweenCxt);\n tweenCxt.on('complete', this.onTweenComplete);\n\n return tweenCxt;\n }\n\n /**\n * Queues the tween context so that it is updated every frame.\n *\n * @param {PUXI.Tween} context\n * @returns {PUXI.TweenManager} this manager, useful for method chaining\n */\n queue(context: Tween<any>): TweenManager\n {\n context.key = nextTweenKey++;\n\n this.tweenMap.set(context.key, context);\n context.on('complete', this.onTweenComplete);\n\n return this;\n }\n\n /**\n * Starts the update loop.\n */\n start(): void\n {\n if (this.isRunning)\n {\n return;\n }\n\n Ticker.shared.add(this.onUpdate);\n this.isRunning = true;\n }\n\n /**\n * Stops the update loop. This will prevent tweens from getting updated.\n */\n stop(): void\n {\n if (!this.isRunning)\n {\n return;\n }\n\n Ticker.shared.remove(this.onUpdate);\n this.isRunning = false;\n }\n\n onUpdate = (): void =>\n {\n for (const [, cxt] of this.tweenMap)\n {\n cxt.update();\n }\n };\n\n protected onTweenComplete = (cxt: Tween<any>): void =>\n {\n this.tweenMap.delete(cxt.key);\n\n cxt.destroy();\n };\n}\n","export type Ease = (t: number) => number;\n\n/**\n * @memberof PUXI\n * @typedef {Function} Ease\n * @param {number} t - interpolation parameter (b/w 0 and 1) that increases linearly\n * @returns {numeber} - output interpolation parameter (b/w 0 and 1)\n */\n\n/**\n * Quadratic ease-in\n *\n * @memberof PUXI\n * @type Ease\n * @param {number} t\n * @returns {number}\n */\nexport const EaseIn: Ease = (t: number) => t * t;\n\n/**\n * Quadratic ease-out\n *\n * @memberof PUXI\n * @type Ease\n * @param {number} t\n * @returns {number}\n */\nexport const EaseOut: Ease = (t: number) => (1 - t) * (1 - t);\n\n/**\n * Quadratic ease-in & ease-out mixed!\n *\n * @memberof PUXI\n * @type Ease\n * @param {number} t\n * @returns {number}\n */\nexport const EaseBoth: Ease = (t: number) => ((t <= 0.5)\n ? 2 * t * t\n : ((2 * ((t - 0.5) * (1.5 - t))) + 0.5));\n","import * as PIXI from 'pixi.js';\n\nexport type Erp<T> = (startValue: T, endValue: T, t: number, observedValue?: T) => T;\n\n/**\n * Defines a (linear) interpolator on a type `T`.\n *\n * @memberof PUXI\n * @typedef {Function} Erp\n * @template T\n * @param {T} startValue\n * @param {T} endValue\n * @param {number} t - interpolation parameter between 0 and 1\n * @param {T}[observedValue]\n */\n\n/**\n * Interpolation function for number properties like alpha, rotation, component\n * position/scale/skew, elevation, etc.\n *\n * @memberof PUXI\n * @extends PUXI.Erp<number>\n * @param {number} startValue\n * @param {number} endValue\n * @param {number} t\n */\nexport const NumberErp: Erp<number> = (startValue: number, endValue: number, t: number) =>\n ((1 - t) * startValue) + (t * endValue);\n\n/**\n * Interpolation function for 2D vector properties like position, scale, skew, etc.\n *\n * @memberof PUXI\n * @extends PUXI.Erp<PIXI.Point>\n * @param {PIXI.Point} startValue\n * @param {PIXI.Point} endValue\n * @param {number} t\n * @param {PIXI.Point} observedValue\n */\nexport const PointErp: Erp<PIXI.Point> = (\n startValue: PIXI.Point,\n endValue: PIXI.Point,\n t: number,\n observedValue: PIXI.Point,\n): PIXI.Point =>\n{\n if (!observedValue)\n {\n observedValue = new PIXI.Point();\n }\n\n observedValue.x = ((1 - t) * startValue.x) + (t * endValue.x);\n observedValue.y = ((1 - t) * startValue.y) + (t * endValue.y);\n\n return observedValue;\n};\n\n","/**\n * @namespace PUXI\n */\n\n/**\n * @memberof PUXI\n * @namespace tween\n */\n\nexport * from './TweenManager';\nexport * from './Ease';\nexport * from './Interpolator';\nexport * from './Tween';\n"],"names":["PIXI.utils","nextTweenKey","Ticker","PIXI.Point"],"mappings":";;;;;;;;;;;;IAUA;;;;;;;;UAQa,KAAS,SAAQA,UAAU,CAAC,YAAY;QAuBjD;QACI,OAAsB,EACtB,GAAY,EACZ,UAAc,EACd,QAAY,EACZ,GAAY,EACZ,IAAW,EACX,aAAiB,EACjB,SAA+B,EAC/B,OAA6B,EAC7B,MAAM,GAAG,CAAC,EACV,IAAI,GAAG,IAAI;YAEX,KAAK,EAAE,CAAC;;;;;YAMR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;;;;;YAMvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;;;;YAMf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;;;;YAM7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;;;;YAMzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;;;;YAMf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;;;;YAMjB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;;;;YAMnC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;;;;YAM3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YAEvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,I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