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

@pixi/sprite-animated

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/sprite-animated - npm Package Compare versions

Comparing version 6.1.3 to 6.2.0

156

dist/browser/sprite-animated.js
/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -232,4 +232,2 @@ * @pixi/sprite-animated is licensed under the MIT License.

*
* @class
* @extends PIXI.Sprite
* @memberof PIXI

@@ -240,3 +238,3 @@ */

/**
* @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame
* @param textures - An array of {@link PIXI.Texture} or frame
* objects that make up the animation.

@@ -248,100 +246,14 @@ * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.

var _this = _super.call(this, textures[0] instanceof core.Texture ? textures[0] : textures[0].texture) || this;
/**
* @type {PIXI.Texture[]}
* @private
*/
_this._textures = null;
/**
* @type {number[]}
* @private
*/
_this._durations = null;
/**
* `true` uses PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default true
* @private
*/
_this._autoUpdate = autoUpdate;
/**
* `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default false
* @private
*/
_this._isConnectedToTicker = false;
/**
* The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.
*
* @member {number}
* @default 1
*/
_this.animationSpeed = 1;
/**
* Whether or not the animate sprite repeats after playing.
*
* @member {boolean}
* @default true
*/
_this.loop = true;
/**
* Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.
*
* Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.
* Changing anchor for each frame allows to pin sprite origin to certain moving feature
* of the frame (e.g. left foot).
*
* Note: Enabling this will override any previously set `anchor` on each frame change.
*
* @member {boolean}
* @default false
*/
_this.updateAnchor = false;
/**
* User-assigned function to call when an AnimatedSprite finishes playing.
*
* @example
* animation.onComplete = function () {
* // finished!
* };
* @member {Function}
*/
_this.onComplete = null;
/**
* User-assigned function to call when an AnimatedSprite changes which texture is being rendered.
*
* @example
* animation.onFrameChange = function () {
* // updated!
* };
* @member {Function}
*/
_this.onFrameChange = null;
/**
* User-assigned function to call when `loop` is true, and an AnimatedSprite is played and
* loops around to start again.
*
* @example
* animation.onLoop = function () {
* // looped!
* };
* @member {Function}
*/
_this.onLoop = null;
/**
* Elapsed time since animation has been started, used internally to display current texture.
*
* @member {number}
* @private
*/
_this._currentTime = 0;
_this._playing = false;
/**
* The texture index that was displayed last time
*
* @member {number}
* @private
*/
_this._previousFrame = null;

@@ -351,6 +263,3 @@ _this.textures = textures;

}
/**
* Stops the AnimatedSprite.
*
*/
/** Stops the AnimatedSprite. */
AnimatedSprite.prototype.stop = function () {

@@ -366,6 +275,3 @@ if (!this._playing) {

};
/**
* Plays the AnimatedSprite.
*
*/
/** Plays the AnimatedSprite. */
AnimatedSprite.prototype.play = function () {

@@ -384,3 +290,3 @@ if (this._playing) {

*
* @param {number} frameNumber - Frame index to stop at.
* @param frameNumber - Frame index to stop at.
*/

@@ -398,3 +304,3 @@ AnimatedSprite.prototype.gotoAndStop = function (frameNumber) {

*
* @param {number} frameNumber - Frame index to start at.
* @param frameNumber - Frame index to start at.
*/

@@ -412,3 +318,3 @@ AnimatedSprite.prototype.gotoAndPlay = function (frameNumber) {

*
* @param {number} deltaTime - Time since last tick.
* @param deltaTime - Time since last tick.
*/

@@ -463,7 +369,3 @@ AnimatedSprite.prototype.update = function (deltaTime) {

};
/**
* Updates the displayed texture to match the current frame index.
*
* @private
*/
/** Updates the displayed texture to match the current frame index. */
AnimatedSprite.prototype.updateTexture = function () {

@@ -507,5 +409,4 @@ var currentFrame = this.currentFrame;

*
* @static
* @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animated sprite with the specified frames.
* @param frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return - The new animated sprite with the specified frames.
*/

@@ -522,5 +423,4 @@ AnimatedSprite.fromFrames = function (frames) {

*
* @static
* @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animate sprite with the specified images as frames.
* @param images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return The new animate sprite with the specified images as frames.
*/

@@ -540,3 +440,2 @@ AnimatedSprite.fromImages = function (images) {

* @readonly
* @member {number}
* @default 0

@@ -551,7 +450,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "textures", {
/**
* The array of textures used for this AnimatedSprite.
*
* @member {PIXI.Texture[]}
*/
/** The array of textures used for this AnimatedSprite. */
get: function () {

@@ -582,7 +477,6 @@ return this._textures;

/**
* The AnimatedSprites current frame index.
*
* @member {number}
* @readonly
*/
* The AnimatedSprites current frame index.
*
* @readonly
*/
get: function () {

@@ -602,3 +496,2 @@ var currentFrame = Math.floor(this._currentTime) % this._textures.length;

*
* @member {boolean}
* @readonly

@@ -613,7 +506,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "autoUpdate", {
/**
* Whether to use PIXI.Ticker.shared to auto update animation time
*
* @member {boolean}
*/
/** Whether to use PIXI.Ticker.shared to auto update animation time. */
get: function () {

@@ -640,9 +529,2 @@ return this._autoUpdate;

}(sprite.Sprite));
/**
* @memberof PIXI.AnimatedSprite
* @typedef {object} FrameObject
* @type {object}
* @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame
* @property {number} time - the duration of the frame in ms
*/

@@ -649,0 +531,0 @@ exports.AnimatedSprite = AnimatedSprite;

4

dist/browser/sprite-animated.min.js
/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -5,0 +5,0 @@ * @pixi/sprite-animated is licensed under the MIT License.

/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -74,4 +74,2 @@ * @pixi/sprite-animated is licensed under the MIT License.

*
* @class
* @extends PIXI.Sprite
* @memberof PIXI

@@ -82,3 +80,3 @@ */

/**
* @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame
* @param textures - An array of {@link PIXI.Texture} or frame
* objects that make up the animation.

@@ -90,100 +88,14 @@ * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.

var _this = _super.call(this, textures[0] instanceof core.Texture ? textures[0] : textures[0].texture) || this;
/**
* @type {PIXI.Texture[]}
* @private
*/
_this._textures = null;
/**
* @type {number[]}
* @private
*/
_this._durations = null;
/**
* `true` uses PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default true
* @private
*/
_this._autoUpdate = autoUpdate;
/**
* `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default false
* @private
*/
_this._isConnectedToTicker = false;
/**
* The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.
*
* @member {number}
* @default 1
*/
_this.animationSpeed = 1;
/**
* Whether or not the animate sprite repeats after playing.
*
* @member {boolean}
* @default true
*/
_this.loop = true;
/**
* Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.
*
* Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.
* Changing anchor for each frame allows to pin sprite origin to certain moving feature
* of the frame (e.g. left foot).
*
* Note: Enabling this will override any previously set `anchor` on each frame change.
*
* @member {boolean}
* @default false
*/
_this.updateAnchor = false;
/**
* User-assigned function to call when an AnimatedSprite finishes playing.
*
* @example
* animation.onComplete = function () {
* // finished!
* };
* @member {Function}
*/
_this.onComplete = null;
/**
* User-assigned function to call when an AnimatedSprite changes which texture is being rendered.
*
* @example
* animation.onFrameChange = function () {
* // updated!
* };
* @member {Function}
*/
_this.onFrameChange = null;
/**
* User-assigned function to call when `loop` is true, and an AnimatedSprite is played and
* loops around to start again.
*
* @example
* animation.onLoop = function () {
* // looped!
* };
* @member {Function}
*/
_this.onLoop = null;
/**
* Elapsed time since animation has been started, used internally to display current texture.
*
* @member {number}
* @private
*/
_this._currentTime = 0;
_this._playing = false;
/**
* The texture index that was displayed last time
*
* @member {number}
* @private
*/
_this._previousFrame = null;

@@ -193,6 +105,3 @@ _this.textures = textures;

}
/**
* Stops the AnimatedSprite.
*
*/
/** Stops the AnimatedSprite. */
AnimatedSprite.prototype.stop = function () {

@@ -208,6 +117,3 @@ if (!this._playing) {

};
/**
* Plays the AnimatedSprite.
*
*/
/** Plays the AnimatedSprite. */
AnimatedSprite.prototype.play = function () {

@@ -226,3 +132,3 @@ if (this._playing) {

*
* @param {number} frameNumber - Frame index to stop at.
* @param frameNumber - Frame index to stop at.
*/

@@ -240,3 +146,3 @@ AnimatedSprite.prototype.gotoAndStop = function (frameNumber) {

*
* @param {number} frameNumber - Frame index to start at.
* @param frameNumber - Frame index to start at.
*/

@@ -254,3 +160,3 @@ AnimatedSprite.prototype.gotoAndPlay = function (frameNumber) {

*
* @param {number} deltaTime - Time since last tick.
* @param deltaTime - Time since last tick.
*/

@@ -305,7 +211,3 @@ AnimatedSprite.prototype.update = function (deltaTime) {

};
/**
* Updates the displayed texture to match the current frame index.
*
* @private
*/
/** Updates the displayed texture to match the current frame index. */
AnimatedSprite.prototype.updateTexture = function () {

@@ -349,5 +251,4 @@ var currentFrame = this.currentFrame;

*
* @static
* @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animated sprite with the specified frames.
* @param frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return - The new animated sprite with the specified frames.
*/

@@ -364,5 +265,4 @@ AnimatedSprite.fromFrames = function (frames) {

*
* @static
* @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animate sprite with the specified images as frames.
* @param images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return The new animate sprite with the specified images as frames.
*/

@@ -382,3 +282,2 @@ AnimatedSprite.fromImages = function (images) {

* @readonly
* @member {number}
* @default 0

@@ -393,7 +292,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "textures", {
/**
* The array of textures used for this AnimatedSprite.
*
* @member {PIXI.Texture[]}
*/
/** The array of textures used for this AnimatedSprite. */
get: function () {

@@ -424,7 +319,6 @@ return this._textures;

/**
* The AnimatedSprites current frame index.
*
* @member {number}
* @readonly
*/
* The AnimatedSprites current frame index.
*
* @readonly
*/
get: function () {

@@ -444,3 +338,2 @@ var currentFrame = Math.floor(this._currentTime) % this._textures.length;

*
* @member {boolean}
* @readonly

@@ -455,7 +348,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "autoUpdate", {
/**
* Whether to use PIXI.Ticker.shared to auto update animation time
*
* @member {boolean}
*/
/** Whether to use PIXI.Ticker.shared to auto update animation time. */
get: function () {

@@ -482,11 +371,4 @@ return this._autoUpdate;

}(sprite.Sprite));
/**
* @memberof PIXI.AnimatedSprite
* @typedef {object} FrameObject
* @type {object}
* @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame
* @property {number} time - the duration of the frame in ms
*/
exports.AnimatedSprite = AnimatedSprite;
//# sourceMappingURL=sprite-animated.js.map
/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -5,0 +5,0 @@ * @pixi/sprite-animated is licensed under the MIT License.

/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -70,4 +70,2 @@ * @pixi/sprite-animated is licensed under the MIT License.

*
* @class
* @extends PIXI.Sprite
* @memberof PIXI

@@ -78,3 +76,3 @@ */

/**
* @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame
* @param textures - An array of {@link PIXI.Texture} or frame
* objects that make up the animation.

@@ -86,100 +84,14 @@ * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.

var _this = _super.call(this, textures[0] instanceof Texture ? textures[0] : textures[0].texture) || this;
/**
* @type {PIXI.Texture[]}
* @private
*/
_this._textures = null;
/**
* @type {number[]}
* @private
*/
_this._durations = null;
/**
* `true` uses PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default true
* @private
*/
_this._autoUpdate = autoUpdate;
/**
* `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time.
*
* @type {boolean}
* @default false
* @private
*/
_this._isConnectedToTicker = false;
/**
* The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.
*
* @member {number}
* @default 1
*/
_this.animationSpeed = 1;
/**
* Whether or not the animate sprite repeats after playing.
*
* @member {boolean}
* @default true
*/
_this.loop = true;
/**
* Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.
*
* Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.
* Changing anchor for each frame allows to pin sprite origin to certain moving feature
* of the frame (e.g. left foot).
*
* Note: Enabling this will override any previously set `anchor` on each frame change.
*
* @member {boolean}
* @default false
*/
_this.updateAnchor = false;
/**
* User-assigned function to call when an AnimatedSprite finishes playing.
*
* @example
* animation.onComplete = function () {
* // finished!
* };
* @member {Function}
*/
_this.onComplete = null;
/**
* User-assigned function to call when an AnimatedSprite changes which texture is being rendered.
*
* @example
* animation.onFrameChange = function () {
* // updated!
* };
* @member {Function}
*/
_this.onFrameChange = null;
/**
* User-assigned function to call when `loop` is true, and an AnimatedSprite is played and
* loops around to start again.
*
* @example
* animation.onLoop = function () {
* // looped!
* };
* @member {Function}
*/
_this.onLoop = null;
/**
* Elapsed time since animation has been started, used internally to display current texture.
*
* @member {number}
* @private
*/
_this._currentTime = 0;
_this._playing = false;
/**
* The texture index that was displayed last time
*
* @member {number}
* @private
*/
_this._previousFrame = null;

@@ -189,6 +101,3 @@ _this.textures = textures;

}
/**
* Stops the AnimatedSprite.
*
*/
/** Stops the AnimatedSprite. */
AnimatedSprite.prototype.stop = function () {

@@ -204,6 +113,3 @@ if (!this._playing) {

};
/**
* Plays the AnimatedSprite.
*
*/
/** Plays the AnimatedSprite. */
AnimatedSprite.prototype.play = function () {

@@ -222,3 +128,3 @@ if (this._playing) {

*
* @param {number} frameNumber - Frame index to stop at.
* @param frameNumber - Frame index to stop at.
*/

@@ -236,3 +142,3 @@ AnimatedSprite.prototype.gotoAndStop = function (frameNumber) {

*
* @param {number} frameNumber - Frame index to start at.
* @param frameNumber - Frame index to start at.
*/

@@ -250,3 +156,3 @@ AnimatedSprite.prototype.gotoAndPlay = function (frameNumber) {

*
* @param {number} deltaTime - Time since last tick.
* @param deltaTime - Time since last tick.
*/

@@ -301,7 +207,3 @@ AnimatedSprite.prototype.update = function (deltaTime) {

};
/**
* Updates the displayed texture to match the current frame index.
*
* @private
*/
/** Updates the displayed texture to match the current frame index. */
AnimatedSprite.prototype.updateTexture = function () {

@@ -345,5 +247,4 @@ var currentFrame = this.currentFrame;

*
* @static
* @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animated sprite with the specified frames.
* @param frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return - The new animated sprite with the specified frames.
*/

@@ -360,5 +261,4 @@ AnimatedSprite.fromFrames = function (frames) {

*
* @static
* @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animate sprite with the specified images as frames.
* @param images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return The new animate sprite with the specified images as frames.
*/

@@ -378,3 +278,2 @@ AnimatedSprite.fromImages = function (images) {

* @readonly
* @member {number}
* @default 0

@@ -389,7 +288,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "textures", {
/**
* The array of textures used for this AnimatedSprite.
*
* @member {PIXI.Texture[]}
*/
/** The array of textures used for this AnimatedSprite. */
get: function () {

@@ -420,7 +315,6 @@ return this._textures;

/**
* The AnimatedSprites current frame index.
*
* @member {number}
* @readonly
*/
* The AnimatedSprites current frame index.
*
* @readonly
*/
get: function () {

@@ -440,3 +334,2 @@ var currentFrame = Math.floor(this._currentTime) % this._textures.length;

*
* @member {boolean}
* @readonly

@@ -451,7 +344,3 @@ */

Object.defineProperty(AnimatedSprite.prototype, "autoUpdate", {
/**
* Whether to use PIXI.Ticker.shared to auto update animation time
*
* @member {boolean}
*/
/** Whether to use PIXI.Ticker.shared to auto update animation time. */
get: function () {

@@ -478,11 +367,4 @@ return this._autoUpdate;

}(Sprite));
/**
* @memberof PIXI.AnimatedSprite
* @typedef {object} FrameObject
* @type {object}
* @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame
* @property {number} time - the duration of the frame in ms
*/
export { AnimatedSprite };
//# sourceMappingURL=sprite-animated.js.map
/*!
* @pixi/sprite-animated - v6.1.3
* Compiled Mon, 13 Sep 2021 15:29:31 UTC
* @pixi/sprite-animated - v6.2.0
* Compiled Mon, 01 Nov 2021 16:52:10 UTC
*

@@ -5,0 +5,0 @@ * @pixi/sprite-animated is licensed under the MIT License.

@@ -34,12 +34,56 @@ import type { IDestroyOptions } from '@pixi/display';

*
* @class
* @extends PIXI.Sprite
* @memberof PIXI
*/
export declare class AnimatedSprite extends Sprite {
/**
* The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.
*
* @default 1
*/
animationSpeed: number;
/**
* Whether or not the animate sprite repeats after playing.
*
* @default true
*/
loop: boolean;
/**
* Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.
*
* Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.
* Changing anchor for each frame allows to pin sprite origin to certain moving feature
* of the frame (e.g. left foot).
*
* Note: Enabling this will override any previously set `anchor` on each frame change.
*
* @default false
*/
updateAnchor: boolean;
/**
* User-assigned function to call when an AnimatedSprite finishes playing.
*
* @example
* animation.onComplete = function () {
* // finished!
* };
*/
onComplete?: () => void;
/**
* User-assigned function to call when an AnimatedSprite changes which texture is being rendered.
*
* @example
* animation.onFrameChange = function () {
* // updated!
* };
*/
onFrameChange?: (currentFrame: number) => void;
/**
* User-assigned function to call when `loop` is true, and an AnimatedSprite is played and
* loops around to start again.
*
* @example
* animation.onLoop = function () {
* // looped!
* };
*/
onLoop?: () => void;

@@ -49,8 +93,20 @@ private _playing;

private _durations;
/**
* `true` uses PIXI.Ticker.shared to auto update animation time.
*
* @default true
*/
private _autoUpdate;
/**
* `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time.
*
* @default false
*/
private _isConnectedToTicker;
/** Elapsed time since animation has been started, used internally to display current texture. */
private _currentTime;
/** The texture index that was displayed last time. */
private _previousFrame;
/**
* @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame
* @param textures - An array of {@link PIXI.Texture} or frame
* objects that make up the animation.

@@ -60,11 +116,5 @@ * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.

constructor(textures: Texture[] | FrameObject[], autoUpdate?: boolean);
/**
* Stops the AnimatedSprite.
*
*/
/** Stops the AnimatedSprite. */
stop(): void;
/**
* Plays the AnimatedSprite.
*
*/
/** Plays the AnimatedSprite. */
play(): void;

@@ -74,3 +124,3 @@ /**

*
* @param {number} frameNumber - Frame index to stop at.
* @param frameNumber - Frame index to stop at.
*/

@@ -81,3 +131,3 @@ gotoAndStop(frameNumber: number): void;

*
* @param {number} frameNumber - Frame index to start at.
* @param frameNumber - Frame index to start at.
*/

@@ -88,10 +138,6 @@ gotoAndPlay(frameNumber: number): void;

*
* @param {number} deltaTime - Time since last tick.
* @param deltaTime - Time since last tick.
*/
update(deltaTime: number): void;
/**
* Updates the displayed texture to match the current frame index.
*
* @private
*/
/** Updates the displayed texture to match the current frame index. */
private updateTexture;

@@ -112,5 +158,4 @@ /**

*
* @static
* @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animated sprite with the specified frames.
* @param frames - The array of frames ids the AnimatedSprite will use as its texture frames.
* @return - The new animated sprite with the specified frames.
*/

@@ -121,5 +166,4 @@ static fromFrames(frames: string[]): AnimatedSprite;

*
* @static
* @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return {PIXI.AnimatedSprite} The new animate sprite with the specified images as frames.
* @param images - The array of image urls the AnimatedSprite will use as its texture frames.
* @return The new animate sprite with the specified images as frames.
*/

@@ -132,19 +176,13 @@ static fromImages(images: string[]): AnimatedSprite;

* @readonly
* @member {number}
* @default 0
*/
get totalFrames(): number;
/** The array of textures used for this AnimatedSprite. */
get textures(): Texture[] | FrameObject[];
set textures(value: Texture[] | FrameObject[]);
/**
* The array of textures used for this AnimatedSprite.
* The AnimatedSprites current frame index.
*
* @member {PIXI.Texture[]}
* @readonly
*/
get textures(): Texture[] | FrameObject[];
set textures(value: Texture[] | FrameObject[]);
/**
* The AnimatedSprites current frame index.
*
* @member {number}
* @readonly
*/
get currentFrame(): number;

@@ -154,11 +192,6 @@ /**

*
* @member {boolean}
* @readonly
*/
get playing(): boolean;
/**
* Whether to use PIXI.Ticker.shared to auto update animation time
*
* @member {boolean}
*/
/** Whether to use PIXI.Ticker.shared to auto update animation time. */
get autoUpdate(): boolean;

@@ -168,4 +201,7 @@ set autoUpdate(value: boolean);

/** @memberof PIXI.AnimatedSprite */
export declare interface FrameObject {
/** The {@link PIXI.Texture} of the frame. */
texture: Texture;
/** The duration of the frame, in milliseconds. */
time: number;

@@ -172,0 +208,0 @@ }

{
"name": "@pixi/sprite-animated",
"version": "6.1.3",
"version": "6.2.0",
"main": "dist/cjs/sprite-animated.js",

@@ -28,7 +28,7 @@ "module": "dist/esm/sprite-animated.js",

"peerDependencies": {
"@pixi/core": "6.1.3",
"@pixi/sprite": "6.1.3",
"@pixi/ticker": "6.1.3"
"@pixi/core": "6.2.0",
"@pixi/sprite": "6.2.0",
"@pixi/ticker": "6.2.0"
},
"gitHead": "2342b551124751206078602eb0e4408df230923e"
"gitHead": "793f21c0d0f2d2a423bd4339f40a569e1ea68711"
}

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

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