Utility class for maintaining reference to a collection
of Textures on a single Spritesheet.
Public methods | |
---|---|
public static | BATCH_SIZE(): void |
private | _updateResolution(resolutionFilename: string): number |
public | parse(callback: function): void |
private | _processFrames(initialFrameIndex: number): void |
private | _parseComplete(): void |
private | _nextBatch(): void |
public | destroy(destroyBase: boolean): void |
public static | BATCH_SIZE(): void |
private | _updateResolution(resolutionFilename: string): number |
public | parse(callback: function): void |
private | _processFrames(initialFrameIndex: number): void |
private | _parseComplete(): void |
private | _nextBatch(): void |
public | destroy(destroyBase: boolean): void |
The maximum number of Textures to build per process.
void
Generate the resolution from the filename or fallback
to the meta.scale field of the JSON data.
Name | Type | Attribute | Description |
---|---|---|---|
resolutionFilename | The filename to use for resolving |
Parser spritesheet from loaded data. This is done asynchronously
to prevent creating too many Texture within a single process.
Name | Type | Attribute | Description |
---|---|---|---|
callback | Callback when complete returns |
void
Process a batch of frames
Name | Type | Attribute | Description |
---|---|---|---|
initialFrameIndex | The index of frame to start. |
void
The parse has completed.
void
Begin the next batch of textures.
void
Destroy Spritesheet and don't use after this.
Name | Type | Attribute | Description |
---|---|---|---|
destroyBase | Whether to destroy the base texture as well |
void
The maximum number of Textures to build per process.
void
Generate the resolution from the filename or fallback
to the meta.scale field of the JSON data.
Name | Type | Attribute | Description |
---|---|---|---|
resolutionFilename | The filename to use for resolving |
Parser spritesheet from loaded data. This is done asynchronously
to prevent creating too many Texture within a single process.
Name | Type | Attribute | Description |
---|---|---|---|
callback | Callback when complete returns |
void
Process a batch of frames
Name | Type | Attribute | Description |
---|---|---|---|
initialFrameIndex | The index of frame to start. |
void
The parse has completed.
void
Begin the next batch of textures.
void
Destroy Spritesheet and don't use after this.
Name | Type | Attribute | Description |
---|---|---|---|
destroyBase | Whether to destroy the base texture as well |
void
{ "comment": "/**\n * Utility class for maintaining reference to a collection\n * of Textures on a single Spritesheet.\n *\n * @class\n * @memberof PIXI\n */", "meta": { "range": [ 271, 7524 ], "filename": "Spritesheet.js", "lineno": 13, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043021", "name": "Spritesheet", "type": "ClassDeclaration", "paramnames": [ "baseTexture", "data", "resolutionFilename" ] } }, "classdesc": "Utility class for maintaining reference to a collection
", "kind": "class", "memberof": "PIXI", "name": "Spritesheet", "longname": "PIXI.Spritesheet", "scope": "static", "params": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "
of Textures on a single Spritesheet.Reference to the source BaseTexture object.
", "name": "baseTexture" }, { "type": { "names": [ "Object" ] }, "description": "Spritesheet image data.
", "name": "data" }, { "type": { "names": [ "string" ] }, "optional": true, "description": "The filename to consider when determining
", "name": "resolutionFilename", "defaultvalue": null } ], "___id": "T000002R003970", "___s": true, "$methods": [ { "comment": "/**\n * The maximum number of Textures to build per process.\n *\n * @type {number}\n * @default 1000\n */", "meta": { "range": [ 421, 477 ], "filename": "Spritesheet.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043024", "name": "Spritesheet.BATCH_SIZE", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "
the resolution of the spritesheet. If not provided, the imageUrl will
be used on the BaseTexture.The maximum number of Textures to build per process.
", "type": { "names": [ "number" ] }, "defaultvalue": "1000", "name": "BATCH_SIZE", "longname": "PIXI.Spritesheet.BATCH_SIZE", "kind": "member", "memberof": "PIXI.Spritesheet", "scope": "static", "params": [], "___id": "T000002R003971", "___s": true, "skip": true, "slug": "PIXI.Spritesheet.BATCH_SIZE", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Generate the resolution from the filename or fallback\n * to the meta.scale field of the JSON data.\n *\n * @private\n * @param {string} resolutionFilename - The filename to use for resolving\n * the default resolution.\n * @return {number} Resolution to use for spritesheet.\n */", "meta": { "range": [ 2472, 3158 ], "filename": "Spritesheet.js", "lineno": 99, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043107", "name": "Spritesheet#_updateResolution", "type": "MethodDefinition", "paramnames": [ "resolutionFilename" ] }, "vars": { "": null } }, "description": "Generate the resolution from the filename or fallback
", "access": "private", "params": [ { "type": { "names": [ "string" ] }, "description": "
to the meta.scale field of the JSON data.The filename to use for resolving
", "name": "resolutionFilename" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "
the default resolution.Resolution to use for spritesheet.
" } ], "name": "_updateResolution", "longname": "PIXI.Spritesheet#_updateResolution", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R003981", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_updateResolution", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Parser spritesheet from loaded data. This is done asynchronously\n * to prevent creating too many Texture within a single process.\n *\n * @param {Function} callback - Callback when complete returns\n * a map of the Textures for this spritesheet.\n */", "meta": { "range": [ 3453, 3763 ], "filename": "Spritesheet.js", "lineno": 130, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043167", "name": "Spritesheet#parse", "type": "MethodDefinition", "paramnames": [ "callback" ] }, "vars": { "": null } }, "description": "Parser spritesheet from loaded data. This is done asynchronously
", "params": [ { "type": { "names": [ "function" ] }, "description": "
to prevent creating too many Texture within a single process.Callback when complete returns
", "name": "callback" } ], "name": "parse", "longname": "PIXI.Spritesheet#parse", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R003986", "___s": true, "skip": true, "slug": "PIXI.Spritesheetparse", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Process a batch of frames\n *\n * @private\n * @param {number} initialFrameIndex - The index of frame to start.\n */", "meta": { "range": [ 3913, 6235 ], "filename": "Spritesheet.js", "lineno": 152, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043212", "name": "Spritesheet#_processFrames", "type": "MethodDefinition", "paramnames": [ "initialFrameIndex" ] }, "vars": { "": null } }, "description": "
a map of the Textures for this spritesheet.Process a batch of frames
", "access": "private", "params": [ { "type": { "names": [ "number" ] }, "description": "The index of frame to start.
", "name": "initialFrameIndex" } ], "name": "_processFrames", "longname": "PIXI.Spritesheet#_processFrames", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R003989", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_processFrames", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * The parse has completed.\n *\n * @private\n */", "meta": { "range": [ 6312, 6487 ], "filename": "Spritesheet.js", "lineno": 225, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043482", "name": "Spritesheet#_parseComplete", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The parse has completed.
", "access": "private", "name": "_parseComplete", "longname": "PIXI.Spritesheet#_parseComplete", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "params": [], "___id": "T000002R004003", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_parseComplete", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Begin the next batch of textures.\n *\n * @private\n */", "meta": { "range": [ 6573, 6978 ], "filename": "Spritesheet.js", "lineno": 239, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043513", "name": "Spritesheet#_nextBatch", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Begin the next batch of textures.
", "access": "private", "name": "_nextBatch", "longname": "PIXI.Spritesheet#_nextBatch", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "params": [], "___id": "T000002R004007", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_nextBatch", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Destroy Spritesheet and don't use after this.\n *\n * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n */", "meta": { "range": [ 7148, 7522 ], "filename": "Spritesheet.js", "lineno": 261, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100043566", "name": "Spritesheet#destroy", "type": "MethodDefinition", "paramnames": [ "destroyBase" ] }, "vars": { "": null } }, "description": "Destroy Spritesheet and don't use after this.
", "params": [ { "type": { "names": [ "boolean" ] }, "optional": true, "defaultvalue": false, "description": "Whether to destroy the base texture as well
", "name": "destroyBase" } ], "name": "destroy", "longname": "PIXI.Spritesheet#destroy", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R004008", "___s": true, "skip": true, "slug": "PIXI.Spritesheetdestroy", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * The maximum number of Textures to build per process.\n *\n * @type {number}\n * @default 1000\n */", "meta": { "range": [ 421, 477 ], "filename": "Spritesheet.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117703", "name": "Spritesheet.BATCH_SIZE", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The maximum number of Textures to build per process.
", "type": { "names": [ "number" ] }, "defaultvalue": "1000", "name": "BATCH_SIZE", "longname": "PIXI.Spritesheet.BATCH_SIZE", "kind": "member", "memberof": "PIXI.Spritesheet", "scope": "static", "params": [], "___id": "T000002R010905", "___s": true, "skip": true, "slug": "PIXI.Spritesheet.BATCH_SIZE", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Generate the resolution from the filename or fallback\n * to the meta.scale field of the JSON data.\n *\n * @private\n * @param {string} resolutionFilename - The filename to use for resolving\n * the default resolution.\n * @return {number} Resolution to use for spritesheet.\n */", "meta": { "range": [ 2472, 3158 ], "filename": "Spritesheet.js", "lineno": 99, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117786", "name": "Spritesheet#_updateResolution", "type": "MethodDefinition", "paramnames": [ "resolutionFilename" ] }, "vars": { "": null } }, "description": "Generate the resolution from the filename or fallback
", "access": "private", "params": [ { "type": { "names": [ "string" ] }, "description": "
to the meta.scale field of the JSON data.The filename to use for resolving
", "name": "resolutionFilename" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "
the default resolution.Resolution to use for spritesheet.
" } ], "name": "_updateResolution", "longname": "PIXI.Spritesheet#_updateResolution", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R010915", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_updateResolution", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Parser spritesheet from loaded data. This is done asynchronously\n * to prevent creating too many Texture within a single process.\n *\n * @param {Function} callback - Callback when complete returns\n * a map of the Textures for this spritesheet.\n */", "meta": { "range": [ 3453, 3763 ], "filename": "Spritesheet.js", "lineno": 130, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117846", "name": "Spritesheet#parse", "type": "MethodDefinition", "paramnames": [ "callback" ] }, "vars": { "": null } }, "description": "Parser spritesheet from loaded data. This is done asynchronously
", "params": [ { "type": { "names": [ "function" ] }, "description": "
to prevent creating too many Texture within a single process.Callback when complete returns
", "name": "callback" } ], "name": "parse", "longname": "PIXI.Spritesheet#parse", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R010920", "___s": true, "skip": true, "slug": "PIXI.Spritesheetparse", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Process a batch of frames\n *\n * @private\n * @param {number} initialFrameIndex - The index of frame to start.\n */", "meta": { "range": [ 3913, 6235 ], "filename": "Spritesheet.js", "lineno": 152, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117891", "name": "Spritesheet#_processFrames", "type": "MethodDefinition", "paramnames": [ "initialFrameIndex" ] }, "vars": { "": null } }, "description": "
a map of the Textures for this spritesheet.Process a batch of frames
", "access": "private", "params": [ { "type": { "names": [ "number" ] }, "description": "The index of frame to start.
", "name": "initialFrameIndex" } ], "name": "_processFrames", "longname": "PIXI.Spritesheet#_processFrames", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R010923", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_processFrames", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * The parse has completed.\n *\n * @private\n */", "meta": { "range": [ 6312, 6487 ], "filename": "Spritesheet.js", "lineno": 225, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100118161", "name": "Spritesheet#_parseComplete", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The parse has completed.
", "access": "private", "name": "_parseComplete", "longname": "PIXI.Spritesheet#_parseComplete", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "params": [], "___id": "T000002R010937", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_parseComplete", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Begin the next batch of textures.\n *\n * @private\n */", "meta": { "range": [ 6573, 6978 ], "filename": "Spritesheet.js", "lineno": 239, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100118192", "name": "Spritesheet#_nextBatch", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Begin the next batch of textures.
", "access": "private", "name": "_nextBatch", "longname": "PIXI.Spritesheet#_nextBatch", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "params": [], "___id": "T000002R010941", "___s": true, "skip": true, "slug": "PIXI.Spritesheet_nextBatch", "filepath": "core\\textures\\Spritesheet.js" }, { "comment": "/**\n * Destroy Spritesheet and don't use after this.\n *\n * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n */", "meta": { "range": [ 7148, 7522 ], "filename": "Spritesheet.js", "lineno": 261, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100118245", "name": "Spritesheet#destroy", "type": "MethodDefinition", "paramnames": [ "destroyBase" ] }, "vars": { "": null } }, "description": "Destroy Spritesheet and don't use after this.
", "params": [ { "type": { "names": [ "boolean" ] }, "optional": true, "defaultvalue": false, "description": "Whether to destroy the base texture as well
", "name": "destroyBase" } ], "name": "destroy", "longname": "PIXI.Spritesheet#destroy", "kind": "function", "memberof": "PIXI.Spritesheet", "scope": "instance", "___id": "T000002R010942", "___s": true, "skip": true, "slug": "PIXI.Spritesheetdestroy", "filepath": "core\\textures\\Spritesheet.js" } ], "$attributes": [], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\textures\\Spritesheet.js" }