Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@pixi/ticker

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/ticker - npm Package Compare versions

Comparing version 5.2.4 to 5.3.0

27

dist/ticker.js
/*!
* @pixi/ticker - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
* @pixi/ticker - v5.3.0
* Compiled Thu, 18 Jun 2020 23:27:40 UTC
*

@@ -33,7 +33,7 @@ * @pixi/ticker is licensed under the MIT License.

* @enum {number}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.InteractionManager}
* @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite}
* @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}.
* @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.BasePrepare} utility.
*/

@@ -476,5 +476,6 @@ (function (UPDATE_PRIORITY) {

/**
* Counts the number of listeners on this ticker.
* The number of listeners on this ticker, calculated by walking through linked list
*
* @returns {number} The number of listeners on this ticker
* @readonly
* @member {number}
*/

@@ -492,3 +493,3 @@ get: function () {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -612,3 +613,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -638,3 +639,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -669,3 +670,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -725,3 +726,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -731,3 +732,3 @@ });

/**
* The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by
* The system ticker instance used by {@link PIXI.InteractionManager} and by
* {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,

@@ -749,3 +750,3 @@ * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.

},
enumerable: true,
enumerable: false,
configurable: true

@@ -752,0 +753,0 @@ });

/*!
* @pixi/ticker - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
* @pixi/ticker - v5.3.0
* Compiled Thu, 18 Jun 2020 23:27:40 UTC
*

@@ -8,3 +8,3 @@ * @pixi/ticker is licensed under the MIT License.

*/
this.PIXI=this.PIXI||{};var _pixi_ticker=function(t,e){"use strict";var i;e.settings.TARGET_FPMS=.06,(i=t.UPDATE_PRIORITY||(t.UPDATE_PRIORITY={}))[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY";var s=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.fn=t,this.context=e,this.priority=i,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),n=function(){function i(){var t=this;this._head=new s(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return i.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},i.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},i.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},i.prototype.add=function(e,i,n){return void 0===n&&(n=t.UPDATE_PRIORITY.NORMAL),this._addListener(new s(e,i,n))},i.prototype.addOnce=function(e,i,n){return void 0===n&&(n=t.UPDATE_PRIORITY.NORMAL),this._addListener(new s(e,i,n,!0))},i.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},i.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(i.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!0,configurable:!0}),i.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},i.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},i.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},i.prototype.update=function(t){var i;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((i=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){var s=t-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=t-s%this._minElapsedMS}this.deltaMS=i,this.deltaTime=this.deltaMS*e.settings.TARGET_FPMS;for(var n=this._head,r=n.next;r;)r=r.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(i.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var i=Math.min(this.maxFPS,t),s=Math.min(Math.max(0,i)/1e3,e.settings.TARGET_FPMS);this._maxElapsedMS=1/s},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"shared",{get:function(){if(!i._shared){var t=i._shared=new i;t.autoStart=!0,t._protected=!0}return i._shared},enumerable:!0,configurable:!0}),Object.defineProperty(i,"system",{get:function(){if(!i._system){var t=i._system=new i;t.autoStart=!0,t._protected=!0}return i._system},enumerable:!0,configurable:!0}),i}(),r=function(){function e(){}return e.init=function(e){var i=this;e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set:function(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,t.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}}),this.stop=function(){i._ticker.stop()},this.start=function(){i._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?n.shared:new n,e.autoStart&&this.start()},e.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},e}();return t.Ticker=n,t.TickerPlugin=r,t}({},PIXI);Object.assign(this.PIXI,_pixi_ticker);
this.PIXI=this.PIXI||{};var _pixi_ticker=function(t,e){"use strict";var i;e.settings.TARGET_FPMS=.06,(i=t.UPDATE_PRIORITY||(t.UPDATE_PRIORITY={}))[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY";var s=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.fn=t,this.context=e,this.priority=i,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),n=function(){function i(){var t=this;this._head=new s(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return i.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},i.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},i.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},i.prototype.add=function(e,i,n){return void 0===n&&(n=t.UPDATE_PRIORITY.NORMAL),this._addListener(new s(e,i,n))},i.prototype.addOnce=function(e,i,n){return void 0===n&&(n=t.UPDATE_PRIORITY.NORMAL),this._addListener(new s(e,i,n,!0))},i.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},i.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(i.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),i.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},i.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},i.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},i.prototype.update=function(t){var i;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((i=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){var s=t-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=t-s%this._minElapsedMS}this.deltaMS=i,this.deltaTime=this.deltaMS*e.settings.TARGET_FPMS;for(var n=this._head,r=n.next;r;)r=r.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(i.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var i=Math.min(this.maxFPS,t),s=Math.min(Math.max(0,i)/1e3,e.settings.TARGET_FPMS);this._maxElapsedMS=1/s},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"shared",{get:function(){if(!i._shared){var t=i._shared=new i;t.autoStart=!0,t._protected=!0}return i._shared},enumerable:!1,configurable:!0}),Object.defineProperty(i,"system",{get:function(){if(!i._system){var t=i._system=new i;t.autoStart=!0,t._protected=!0}return i._system},enumerable:!1,configurable:!0}),i}(),r=function(){function e(){}return e.init=function(e){var i=this;e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set:function(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,t.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}}),this.stop=function(){i._ticker.stop()},this.start=function(){i._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?n.shared:new n,e.autoStart&&this.start()},e.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},e}();return t.Ticker=n,t.TickerPlugin=r,t}({},PIXI);Object.assign(this.PIXI,_pixi_ticker);
//# sourceMappingURL=ticker.min.js.map
/*!
* @pixi/ticker - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
* @pixi/ticker - v5.3.0
* Compiled Thu, 18 Jun 2020 23:27:40 UTC
*

@@ -31,7 +31,7 @@ * @pixi/ticker is licensed under the MIT License.

* @enum {number}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.InteractionManager}
* @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite}
* @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}.
* @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.BasePrepare} utility.
*/

@@ -475,5 +475,6 @@ var UPDATE_PRIORITY;

/**
* Counts the number of listeners on this ticker.
* The number of listeners on this ticker, calculated by walking through linked list
*
* @returns {number} The number of listeners on this ticker
* @readonly
* @member {number}
*/

@@ -491,3 +492,3 @@ get: function () {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -611,3 +612,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -637,3 +638,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -668,3 +669,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -724,3 +725,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -730,3 +731,3 @@ });

/**
* The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by
* The system ticker instance used by {@link PIXI.InteractionManager} and by
* {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,

@@ -748,3 +749,3 @@ * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.

},
enumerable: true,
enumerable: false,
configurable: true

@@ -751,0 +752,0 @@ });

/*!
* @pixi/ticker - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
* @pixi/ticker - v5.3.0
* Compiled Thu, 18 Jun 2020 23:27:40 UTC
*

@@ -35,7 +35,7 @@ * @pixi/ticker is licensed under the MIT License.

* @enum {number}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}
* @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.InteractionManager}
* @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite}
* @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}.
* @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.
* @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.BasePrepare} utility.
*/

@@ -478,5 +478,6 @@ (function (UPDATE_PRIORITY) {

/**
* Counts the number of listeners on this ticker.
* The number of listeners on this ticker, calculated by walking through linked list
*
* @returns {number} The number of listeners on this ticker
* @readonly
* @member {number}
*/

@@ -494,3 +495,3 @@ get: function () {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -614,3 +615,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -640,3 +641,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -671,3 +672,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -727,3 +728,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -733,3 +734,3 @@ });

/**
* The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by
* The system ticker instance used by {@link PIXI.InteractionManager} and by
* {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,

@@ -751,3 +752,3 @@ * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.

},
enumerable: true,
enumerable: false,
configurable: true

@@ -754,0 +755,0 @@ });

{
"name": "@pixi/ticker",
"version": "5.2.4",
"version": "5.3.0",
"main": "lib/ticker.js",

@@ -27,5 +27,5 @@ "module": "lib/ticker.es.js",

"dependencies": {
"@pixi/settings": "5.2.4"
"@pixi/settings": "5.3.0"
},
"gitHead": "71c6b3b2061af4a4f3a95a265d46e933b8befc2c"
"gitHead": "a9b7b32a9c0aeb3d9c42ef04b2c2a39be1cd0880"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc