@pixi/sprite-animated
Advanced tools
Comparing version 5.0.3 to 5.0.4
/*! | ||
* @pixi/sprite-animated - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-animated - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -306,3 +306,3 @@ * @pixi/sprite-animated is licensed under the MIT License. | ||
this._textureTrimmedID = -1; | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
this.uvs = this._texture._uvs.uvsFloat32; | ||
@@ -309,0 +309,0 @@ |
/*! | ||
* @pixi/sprite-animated - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-animated - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/sprite-animated is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_sprite_animated=function(t,e,r,i){"use strict";var s=function(t){function r(r,i){t.call(this,r[0]instanceof e.Texture?r[0]:r[0].texture),this._textures=null,this._durations=null,this.textures=r,this._autoUpdate=!1!==i,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this.playing=!1}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var s={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0}};return r.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&i.Ticker.shared.remove(this.update,this))},r.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&i.Ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.HIGH))},r.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},r.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},r.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var s=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*s,this._currentTime+=s;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())},r.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copy(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},r.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},r.fromFrames=function(t){for(var i=[],s=0;s<t.length;++s)i.push(e.Texture.from(t[s]));return new r(i)},r.fromImages=function(t){for(var i=[],s=0;s<t.length;++s)i.push(e.Texture.from(t[s]));return new r(i)},s.totalFrames.get=function(){return this._textures.length},s.textures.get=function(){return this._textures},s.textures.set=function(t){if(t[0]instanceof e.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var r=0;r<t.length;r++)this._textures.push(t[r].texture),this._durations.push(t[r].time)}this.gotoAndStop(0),this.updateTexture()},s.currentFrame.get=function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},Object.defineProperties(r.prototype,s),r}(r.Sprite);return t.AnimatedSprite=s,t}({},PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_sprite_animated); | ||
this.PIXI=this.PIXI||{};var _pixi_sprite_animated=function(t,e,r,i){"use strict";var s=function(t){function r(r,i){t.call(this,r[0]instanceof e.Texture?r[0]:r[0].texture),this._textures=null,this._durations=null,this.textures=r,this._autoUpdate=!1!==i,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this.playing=!1}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var s={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0}};return r.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&i.Ticker.shared.remove(this.update,this))},r.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&i.Ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.HIGH))},r.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},r.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},r.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var s=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*s,this._currentTime+=s;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())},r.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copy(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},r.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},r.fromFrames=function(t){for(var i=[],s=0;s<t.length;++s)i.push(e.Texture.from(t[s]));return new r(i)},r.fromImages=function(t){for(var i=[],s=0;s<t.length;++s)i.push(e.Texture.from(t[s]));return new r(i)},s.totalFrames.get=function(){return this._textures.length},s.textures.get=function(){return this._textures},s.textures.set=function(t){if(t[0]instanceof e.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var r=0;r<t.length;r++)this._textures.push(t[r].texture),this._durations.push(t[r].time)}this.gotoAndStop(0),this.updateTexture()},s.currentFrame.get=function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},Object.defineProperties(r.prototype,s),r}(r.Sprite);return t.AnimatedSprite=s,t}({},PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_sprite_animated); | ||
//# sourceMappingURL=sprite-animated.min.js.map |
/*! | ||
* @pixi/sprite-animated - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-animated - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -306,3 +306,3 @@ * @pixi/sprite-animated is licensed under the MIT License. | ||
this._textureTrimmedID = -1; | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
this.uvs = this._texture._uvs.uvsFloat32; | ||
@@ -309,0 +309,0 @@ |
/*! | ||
* @pixi/sprite-animated - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-animated - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -310,3 +310,3 @@ * @pixi/sprite-animated is licensed under the MIT License. | ||
this._textureTrimmedID = -1; | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
this.uvs = this._texture._uvs.uvsFloat32; | ||
@@ -313,0 +313,0 @@ |
{ | ||
"name": "@pixi/sprite-animated", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"main": "lib/sprite-animated.js", | ||
@@ -30,5 +30,5 @@ "module": "lib/sprite-animated.es.js", | ||
"dependencies": { | ||
"@pixi/core": "^5.0.3", | ||
"@pixi/sprite": "^5.0.3", | ||
"@pixi/ticker": "^5.0.3" | ||
"@pixi/core": "^5.0.4", | ||
"@pixi/sprite": "^5.0.4", | ||
"@pixi/ticker": "^5.0.4" | ||
}, | ||
@@ -38,3 +38,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ba03f57001cd8bae3ae3644911cd513c68184e7c" | ||
"gitHead": "7a771ca5f05eeba62222b53446d0c2bdfcac37f7" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113793
Updated@pixi/core@^5.0.4
Updated@pixi/sprite@^5.0.4
Updated@pixi/ticker@^5.0.4