Home

class: BaseTexture


A texture stores the information that represents an image. All textures have a base texture.

Extends:

EventEmitter → BaseTexture

Subclass(es):

BaseRenderTexture, VideoBaseTexture, BaseRenderTexture, VideoBaseTexture

Methods summary


Public methods
public update(): void
public _updateDimensions(): void
protected loadSource(source: HTMLImageElement, HTMLCanvasElement): void
public _updateImageType(): void
public _loadSvgSource(): void
public _loadSvgSourceUsingDataUri(dataUri: string): void
public _loadSvgSourceUsingXhr(): void
public _loadSvgSourceUsingString(svgString: string): void
private _sourceLoaded(): void
public destroy(): void
public dispose(): void
public updateSourceImage(newSrc: string): void
public static fromImage(imageUrl: string, crossorigin: boolean, scaleMode: number, sourceScale: number): PIXI.BaseTexture
public static fromCanvas(canvas: HTMLCanvasElement, scaleMode: number): PIXI.BaseTexture
public static from(source: string, HTMLImageElement, HTMLCanvasElement, scaleMode: number, sourceScale: number): PIXI.BaseTexture
public update(): void
public _updateDimensions(): void
protected loadSource(source: HTMLImageElement, HTMLCanvasElement): void
public _updateImageType(): void
public _loadSvgSource(): void
public _loadSvgSourceUsingDataUri(dataUri: string): void
public _loadSvgSourceUsingXhr(): void
public _loadSvgSourceUsingString(svgString: string): void
private _sourceLoaded(): void
public destroy(): void
public dispose(): void
public updateSourceImage(newSrc: string): void
public static fromImage(imageUrl: string, crossorigin: boolean, scaleMode: number, sourceScale: number): PIXI.BaseTexture
public static fromCanvas(canvas: HTMLCanvasElement, scaleMode: number): PIXI.BaseTexture
public static from(source: string, HTMLImageElement, HTMLCanvasElement, scaleMode: number, sourceScale: number): PIXI.BaseTexture

Properties


Name Type Attribute Description
resolution number public

The resolution / device pixel ratio of the texture

width number public

The width of the base texture set when the image has loaded

height number public

The height of the base texture set when the image has loaded

realWidth number public

Used to store the actual width of the source of this texture

realHeight number public

Used to store the actual height of the source of this texture

scaleMode number public

The scale mode to apply when scaling this texture

hasLoaded boolean public

Set to true once the base texture has successfully loaded.

This is never true if the underlying source fails to load or has no texture data.

isLoading boolean public

Set to true if the source is currently loading.

If an Image source is loading the 'loaded' or 'error' event will be
dispatched when the operation ends. An underyling source that is
immediately-available bypasses loading entirely.

source HTMLImageElement HTMLCanvasElement public

The image source that is used to create the texture.

TODO: Make this a setter that calls loadSource();

origSource Image public

The image source that is used to create the texture. This is used to
store the original Svg source when it is replaced with a canvas element.

TODO: Currently not in use but could be used when re-scaling svg.

imageType string public

Type of image defined in source, eg. png or svg

sourceScale number public

Scale for source image. Used with Svg images to scale them before rasterization.

premultipliedAlpha boolean public

Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)
All blend modes, and shaders written for default value. Change it on your own risk.

imageUrl string public

The image url of the texture

isPowerOfTwo boolean private

Whether or not the texture is a power of two, try to use power of two textures as much
as you can

mipmap boolean public

Set this to true if a mipmap of this texture needs to be generated. This value needs
to be set before the texture is used
Also the texture must be a power of two size to work

wrapMode number public

WebGL Texture wrap mode

_glTextures object.<number, WebGLTexture> private

A map of renderer IDs to webgl textures

_destroyed boolean private

If the object has been destroyed via destroy(). If true, it should not be used.

loaded protected

Fired when a not-immediately-available source finishes loading.

error protected

Fired when a not-immediately-available source fails to load.

resolution number public

The resolution / device pixel ratio of the texture

width number public

The width of the base texture set when the image has loaded

height number public

The height of the base texture set when the image has loaded

realWidth number public

Used to store the actual width of the source of this texture

realHeight number public

Used to store the actual height of the source of this texture

scaleMode number public

The scale mode to apply when scaling this texture

hasLoaded boolean public

Set to true once the base texture has successfully loaded.

This is never true if the underlying source fails to load or has no texture data.

isLoading boolean public

Set to true if the source is currently loading.

If an Image source is loading the 'loaded' or 'error' event will be
dispatched when the operation ends. An underyling source that is
immediately-available bypasses loading entirely.

source HTMLImageElement HTMLCanvasElement public

The image source that is used to create the texture.

TODO: Make this a setter that calls loadSource();

origSource Image public

The image source that is used to create the texture. This is used to
store the original Svg source when it is replaced with a canvas element.

TODO: Currently not in use but could be used when re-scaling svg.

imageType string public

Type of image defined in source, eg. png or svg

sourceScale number public

Scale for source image. Used with Svg images to scale them before rasterization.

premultipliedAlpha boolean public

Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)
All blend modes, and shaders written for default value. Change it on your own risk.

imageUrl string public

The image url of the texture

isPowerOfTwo boolean private

Whether or not the texture is a power of two, try to use power of two textures as much
as you can

mipmap boolean public

Set this to true if a mipmap of this texture needs to be generated. This value needs
to be set before the texture is used
Also the texture must be a power of two size to work

wrapMode number public

WebGL Texture wrap mode

_glTextures object.<number, WebGLTexture> private

A map of renderer IDs to webgl textures

_destroyed boolean private

If the object has been destroyed via destroy(). If true, it should not be used.

loaded protected

Fired when a not-immediately-available source finishes loading.

error protected

Fired when a not-immediately-available source fails to load.

Methods


update(): void

Updates the texture on all the webgl renderers, this also assumes the src has changed.

Returns:

void


_updateDimensions(): void

Update dimensions from real values

Returns:

void


loadSource(source: HTMLImageElement, HTMLCanvasElement): void

Load a source.

If the source is not-immediately-available, such as an image that needs to be
downloaded, then the 'loaded' or 'error' event will be dispatched in the future
and hasLoaded will remain false after this call.

The logic state after calling loadSource directly or indirectly (eg. fromImage, new BaseTexture) is:

if (texture.hasLoaded) {
   // texture ready for use
} else if (texture.isLoading) {
   // listen to 'loaded' and/or 'error' events on texture
} else {
   // not loading, not going to load UNLESS the source is reloaded
   // (it may still make sense to listen to the events)
}

Params:

Name Type Attribute Description
source

the source object of the texture.

Returns:

void


_updateImageType(): void

Updates type of the source image.

Returns:

void


_loadSvgSource(): void

Checks if source is an SVG image and whether it's loaded via a URL or a data URI. Then calls
_loadSvgSourceUsingDataUri or _loadSvgSourceUsingXhr.

Returns:

void


_loadSvgSourceUsingDataUri(dataUri: string): void

Reads an SVG string from data URI and then calls _loadSvgSourceUsingString.

Params:

Name Type Attribute Description
dataUri

The data uri to load from.

Returns:

void


_loadSvgSourceUsingXhr(): void

Loads an SVG string from imageUrl using XHR and then calls _loadSvgSourceUsingString.

Returns:

void


_loadSvgSourceUsingString(svgString: string): void

Loads texture using an SVG string. The original SVG Image is stored as origSource and the
created canvas is the new source. The SVG is scaled using sourceScale. Called by
_loadSvgSourceUsingXhr or _loadSvgSourceUsingDataUri.

Params:

Name Type Attribute Description
svgString

SVG source as string

Returns:

void


_sourceLoaded(): void

Used internally to update the width, height, and some other tracking vars once
a source has successfully loaded.

Returns:

void


destroy(): void

Destroys this base texture

Returns:

void


dispose(): void

Frees the texture from WebGL memory without destroying this texture object.
This means you can still use the texture later which will upload it to GPU
memory again.

Returns:

void


updateSourceImage(newSrc: string): void

Changes the source image of the texture.
The original source must be an Image element.

Params:

Name Type Attribute Description
newSrc

the path of the image

Returns:

void


fromImage(imageUrl: string, crossorigin: boolean, scaleMode: number, sourceScale: number): PIXI.BaseTexture

Helper function that creates a base texture from the given image url.
If the image is not in the base texture cache it will be created and loaded.

Params:

Name Type Attribute Description
imageUrl

The image url of the texture

crossorigin

Should use anonymous CORS? Defaults to true if the URL is not a data-URI.

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

sourceScale

Scale for the original image, used with Svg images.

Returns:

PIXI.BaseTexture


fromCanvas(canvas: HTMLCanvasElement, scaleMode: number): PIXI.BaseTexture

Helper function that creates a base texture from the given canvas element.

Params:

Name Type Attribute Description
canvas

The canvas element source of the texture

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

Returns:

PIXI.BaseTexture


from(source: string, HTMLImageElement, HTMLCanvasElement, scaleMode: number, sourceScale: number): PIXI.BaseTexture

Helper function that creates a base texture based on the source you provide.
The source can be - image url, image element, canvas element.

Params:

Name Type Attribute Description
source

The source to create base texture from.

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

sourceScale

Scale for the original image, used with Svg images.

Returns:

PIXI.BaseTexture


update(): void

Updates the texture on all the webgl renderers, this also assumes the src has changed.

Returns:

void


_updateDimensions(): void

Update dimensions from real values

Returns:

void


loadSource(source: HTMLImageElement, HTMLCanvasElement): void

Load a source.

If the source is not-immediately-available, such as an image that needs to be
downloaded, then the 'loaded' or 'error' event will be dispatched in the future
and hasLoaded will remain false after this call.

The logic state after calling loadSource directly or indirectly (eg. fromImage, new BaseTexture) is:

if (texture.hasLoaded) {
   // texture ready for use
} else if (texture.isLoading) {
   // listen to 'loaded' and/or 'error' events on texture
} else {
   // not loading, not going to load UNLESS the source is reloaded
   // (it may still make sense to listen to the events)
}

Params:

Name Type Attribute Description
source

the source object of the texture.

Returns:

void


_updateImageType(): void

Updates type of the source image.

Returns:

void


_loadSvgSource(): void

Checks if source is an SVG image and whether it's loaded via a URL or a data URI. Then calls
_loadSvgSourceUsingDataUri or _loadSvgSourceUsingXhr.

Returns:

void


_loadSvgSourceUsingDataUri(dataUri: string): void

Reads an SVG string from data URI and then calls _loadSvgSourceUsingString.

Params:

Name Type Attribute Description
dataUri

The data uri to load from.

Returns:

void


_loadSvgSourceUsingXhr(): void

Loads an SVG string from imageUrl using XHR and then calls _loadSvgSourceUsingString.

Returns:

void


_loadSvgSourceUsingString(svgString: string): void

Loads texture using an SVG string. The original SVG Image is stored as origSource and the
created canvas is the new source. The SVG is scaled using sourceScale. Called by
_loadSvgSourceUsingXhr or _loadSvgSourceUsingDataUri.

Params:

Name Type Attribute Description
svgString

SVG source as string

Returns:

void


_sourceLoaded(): void

Used internally to update the width, height, and some other tracking vars once
a source has successfully loaded.

Returns:

void


destroy(): void

Destroys this base texture

Returns:

void


dispose(): void

Frees the texture from WebGL memory without destroying this texture object.
This means you can still use the texture later which will upload it to GPU
memory again.

Returns:

void


updateSourceImage(newSrc: string): void

Changes the source image of the texture.
The original source must be an Image element.

Params:

Name Type Attribute Description
newSrc

the path of the image

Returns:

void


fromImage(imageUrl: string, crossorigin: boolean, scaleMode: number, sourceScale: number): PIXI.BaseTexture

Helper function that creates a base texture from the given image url.
If the image is not in the base texture cache it will be created and loaded.

Params:

Name Type Attribute Description
imageUrl

The image url of the texture

crossorigin

Should use anonymous CORS? Defaults to true if the URL is not a data-URI.

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

sourceScale

Scale for the original image, used with Svg images.

Returns:

PIXI.BaseTexture


fromCanvas(canvas: HTMLCanvasElement, scaleMode: number): PIXI.BaseTexture

Helper function that creates a base texture from the given canvas element.

Params:

Name Type Attribute Description
canvas

The canvas element source of the texture

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

Returns:

PIXI.BaseTexture


from(source: string, HTMLImageElement, HTMLCanvasElement, scaleMode: number, sourceScale: number): PIXI.BaseTexture

Helper function that creates a base texture based on the source you provide.
The source can be - image url, image element, canvas element.

Params:

Name Type Attribute Description
source

The source to create base texture from.

scaleMode

See {@link PIXI.SCALE_MODES} for possible values

sourceScale

Scale for the original image, used with Svg images.

Returns:

PIXI.BaseTexture


  {
    "comment": "/**\n * A texture stores the information that represents an image. All textures have a base texture.\n *\n * @class\n * @extends EventEmitter\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            516,
            22424
        ],
        "filename": "BaseTexture.js",
        "lineno": 19,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures",
        "code": {
            "id": "astnode100041471",
            "name": "BaseTexture",
            "type": "ClassDeclaration",
            "paramnames": [
                "source",
                "scaleMode",
                "resolution"
            ]
        }
    },
    "classdesc": "

A texture stores the information that represents an image. All textures have a base texture.

", "kind": "class", "augments": [ "EventEmitter" ], "memberof": "PIXI", "name": "BaseTexture", "longname": "PIXI.BaseTexture", "scope": "static", "params": [ { "type": { "names": [ "HTMLImageElement", "HTMLCanvasElement" ] }, "optional": true, "description": "

the source object of the texture.

", "name": "source" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "PIXI.settings.SCALE_MODE", "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 1, "description": "

The resolution / device pixel ratio of the texture

", "name": "resolution" } ], "___id": "T000002R003808", "___s": true, "$methods": [ { "comment": "/**\n * Updates the texture on all the webgl renderers, this also assumes the src has changed.\n *\n * @fires update\n */", "meta": { "range": [ 7058, 7462 ], "filename": "BaseTexture.js", "lineno": 238, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100041649", "name": "BaseTexture#update", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Updates the texture on all the webgl renderers, this also assumes the src has changed.

", "fires": [ "event:update" ], "name": "update", "longname": "PIXI.BaseTexture#update", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003854", "___s": true, "skip": true, "slug": "PIXI.BaseTextureupdate", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Update dimensions from real values\n */", "meta": { "range": [ 7526, 7771 ], "filename": "BaseTexture.js", "lineno": 255, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100041716", "name": "BaseTexture#_updateDimensions", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Update dimensions from real values

", "name": "_updateDimensions", "longname": "PIXI.BaseTexture#_updateDimensions", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003857", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_updateDimensions", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Load a source.\n *\n * If the source is not-immediately-available, such as an image that needs to be\n * downloaded, then the 'loaded' or 'error' event will be dispatched in the future\n * and `hasLoaded` will remain false after this call.\n *\n * The logic state after calling `loadSource` directly or indirectly (eg. `fromImage`, `new BaseTexture`) is:\n *\n * if (texture.hasLoaded) {\n * // texture ready for use\n * } else if (texture.isLoading) {\n * // listen to 'loaded' and/or 'error' events on texture\n * } else {\n * // not loading, not going to load UNLESS the source is reloaded\n * // (it may still make sense to listen to the events)\n * }\n *\n * @protected\n * @param {HTMLImageElement|HTMLCanvasElement} source - the source object of the texture.\n */", "meta": { "range": [ 8664, 12022 ], "filename": "BaseTexture.js", "lineno": 284, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100041764", "name": "BaseTexture#loadSource", "type": "MethodDefinition", "paramnames": [ "source" ] }, "vars": { "": null } }, "description": "

Load a source.

\n

If the source is not-immediately-available, such as an image that needs to be
downloaded, then the 'loaded' or 'error' event will be dispatched in the future
and hasLoaded will remain false after this call.

\n

The logic state after calling loadSource directly or indirectly (eg. fromImage, new BaseTexture) is:

\n
if (texture.hasLoaded) {\n   // texture ready for use\n} else if (texture.isLoading) {\n   // listen to 'loaded' and/or 'error' events on texture\n} else {\n   // not loading, not going to load UNLESS the source is reloaded\n   // (it may still make sense to listen to the events)\n}
", "access": "protected", "params": [ { "type": { "names": [ "HTMLImageElement", "HTMLCanvasElement" ] }, "description": "

the source object of the texture.

", "name": "source" } ], "name": "loadSource", "longname": "PIXI.BaseTexture#loadSource", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R003861", "___s": true, "skip": true, "slug": "PIXI.BaseTextureloadSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Updates type of the source image.\n */", "meta": { "range": [ 12085, 12858 ], "filename": "BaseTexture.js", "lineno": 407, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042068", "name": "BaseTexture#_updateImageType", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Updates type of the source image.

", "name": "_updateImageType", "longname": "PIXI.BaseTexture#_updateImageType", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003882", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_updateImageType", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Checks if `source` is an SVG image and whether it's loaded via a URL or a data URI. Then calls\n * `_loadSvgSourceUsingDataUri` or `_loadSvgSourceUsingXhr`.\n */", "meta": { "range": [ 13047, 13506 ], "filename": "BaseTexture.js", "lineno": 446, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042151", "name": "BaseTexture#_loadSvgSource", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Checks if source is an SVG image and whether it's loaded via a URL or a data URI. Then calls
_loadSvgSourceUsingDataUri or _loadSvgSourceUsingXhr.

", "name": "_loadSvgSource", "longname": "PIXI.BaseTexture#_loadSvgSource", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003890", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Reads an SVG string from data URI and then calls `_loadSvgSourceUsingString`.\n *\n * @param {string} dataUri - The data uri to load from.\n */", "meta": { "range": [ 13680, 14118 ], "filename": "BaseTexture.js", "lineno": 472, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042186", "name": "BaseTexture#_loadSvgSourceUsingDataUri", "type": "MethodDefinition", "paramnames": [ "dataUri" ] }, "vars": { "": null } }, "description": "

Reads an SVG string from data URI and then calls _loadSvgSourceUsingString.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

The data uri to load from.

", "name": "dataUri" } ], "name": "_loadSvgSourceUsingDataUri", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingDataUri", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R003892", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingDataUri", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Loads an SVG string from `imageUrl` using XHR and then calls `_loadSvgSourceUsingString`.\n */", "meta": { "range": [ 14237, 15065 ], "filename": "BaseTexture.js", "lineno": 495, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042230", "name": "BaseTexture#_loadSvgSourceUsingXhr", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Loads an SVG string from imageUrl using XHR and then calls _loadSvgSourceUsingString.

", "name": "_loadSvgSourceUsingXhr", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingXhr", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003896", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingXhr", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Loads texture using an SVG string. The original SVG Image is stored as `origSource` and the\n * created canvas is the new `source`. The SVG is scaled using `sourceScale`. Called by\n * `_loadSvgSourceUsingXhr` or `_loadSvgSourceUsingDataUri`.\n *\n * @param {string} svgString SVG source as string\n *\n * @fires loaded\n */", "meta": { "range": [ 15433, 16774 ], "filename": "BaseTexture.js", "lineno": 531, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042300", "name": "BaseTexture#_loadSvgSourceUsingString", "type": "MethodDefinition", "paramnames": [ "svgString" ] }, "vars": { "": null } }, "description": "

Loads texture using an SVG string. The original SVG Image is stored as origSource and the
created canvas is the new source. The SVG is scaled using sourceScale. Called by
_loadSvgSourceUsingXhr or _loadSvgSourceUsingDataUri.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

SVG source as string

", "name": "svgString" } ], "fires": [ "event:loaded" ], "name": "_loadSvgSourceUsingString", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingString", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R003900", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingString", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used internally to update the width, height, and some other tracking vars once\n * a source has successfully loaded.\n *\n * @private\n */", "meta": { "range": [ 16946, 17027 ], "filename": "BaseTexture.js", "lineno": 579, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042465", "name": "BaseTexture#_sourceLoaded", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Used internally to update the width, height, and some other tracking vars once
a source has successfully loaded.

", "access": "private", "name": "_sourceLoaded", "longname": "PIXI.BaseTexture#_sourceLoaded", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003914", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_sourceLoaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Destroys this base texture\n *\n */", "meta": { "range": [ 17090, 17623 ], "filename": "BaseTexture.js", "lineno": 589, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042480", "name": "BaseTexture#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Destroys this base texture

", "name": "destroy", "longname": "PIXI.BaseTexture#destroy", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003916", "___s": true, "skip": true, "slug": "PIXI.BaseTexturedestroy", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Frees the texture from WebGL memory without destroying this texture object.\n * This means you can still use the texture later which will upload it to GPU\n * memory again.\n *\n */", "meta": { "range": [ 17838, 17895 ], "filename": "BaseTexture.js", "lineno": 623, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042551", "name": "BaseTexture#dispose", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Frees the texture from WebGL memory without destroying this texture object.
This means you can still use the texture later which will upload it to GPU
memory again.

", "name": "dispose", "longname": "PIXI.BaseTexture#dispose", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R003922", "___s": true, "skip": true, "slug": "PIXI.BaseTexturedispose", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Changes the source image of the texture.\n * The original source must be an Image element.\n *\n * @param {string} newSrc - the path of the image\n */", "meta": { "range": [ 18079, 18189 ], "filename": "BaseTexture.js", "lineno": 634, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042562", "name": "BaseTexture#updateSourceImage", "type": "MethodDefinition", "paramnames": [ "newSrc" ] }, "vars": { "": null } }, "description": "

Changes the source image of the texture.
The original source must be an Image element.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

the path of the image

", "name": "newSrc" } ], "name": "updateSourceImage", "longname": "PIXI.BaseTexture#updateSourceImage", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R003923", "___s": true, "skip": true, "slug": "PIXI.BaseTextureupdateSourceImage", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture from the given image url.\n * If the image is not in the base texture cache it will be created and loaded.\n *\n * @static\n * @param {string} imageUrl - The image url of the texture\n * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 18843, 19954 ], "filename": "BaseTexture.js", "lineno": 652, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042583", "name": "BaseTexture.fromImage", "type": "MethodDefinition", "paramnames": [ "imageUrl", "crossorigin", "scaleMode", "sourceScale" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture from the given image url.
If the image is not in the base texture cache it will be created and loaded.

", "scope": "static", "params": [ { "type": { "names": [ "string" ] }, "description": "

The image url of the texture

", "name": "imageUrl" }, { "type": { "names": [ "boolean" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Should use anonymous CORS? Defaults to true if the URL is not a data-URI.

", "name": "crossorigin" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "PIXI.settings.SCALE_MODE", "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Scale for the original image, used with Svg images.

", "name": "sourceScale" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "fromImage", "longname": "PIXI.BaseTexture.fromImage", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R003925", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.fromImage", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture from the given canvas element.\n *\n * @static\n * @param {HTMLCanvasElement} canvas - The canvas element source of the texture\n * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 20304, 20708 ], "filename": "BaseTexture.js", "lineno": 694, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042671", "name": "BaseTexture.fromCanvas", "type": "MethodDefinition", "paramnames": [ "canvas", "scaleMode" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture from the given canvas element.

", "scope": "static", "params": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

The canvas element source of the texture

", "name": "canvas" }, { "type": { "names": [ "number" ] }, "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "fromCanvas", "longname": "PIXI.BaseTexture.fromCanvas", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R003935", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.fromCanvas", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture based on the source you provide.\n * The source can be - image url, image element, canvas element.\n *\n * @static\n * @param {string|HTMLImageElement|HTMLCanvasElement} source - The source to create base texture from.\n * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 21277, 22422 ], "filename": "BaseTexture.js", "lineno": 722, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100042722", "name": "BaseTexture.from", "type": "MethodDefinition", "paramnames": [ "source", "scaleMode", "sourceScale" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture based on the source you provide.
The source can be - image url, image element, canvas element.

", "scope": "static", "params": [ { "type": { "names": [ "string", "HTMLImageElement", "HTMLCanvasElement" ] }, "description": "

The source to create base texture from.

", "name": "source" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "PIXI.settings.SCALE_MODE", "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Scale for the original image, used with Svg images.

", "name": "sourceScale" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "from", "longname": "PIXI.BaseTexture.from", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R003940", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.from", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Updates the texture on all the webgl renderers, this also assumes the src has changed.\n *\n * @fires update\n */", "meta": { "range": [ 7058, 7462 ], "filename": "BaseTexture.js", "lineno": 238, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116328", "name": "BaseTexture#update", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Updates the texture on all the webgl renderers, this also assumes the src has changed.

", "fires": [ "event:update" ], "name": "update", "longname": "PIXI.BaseTexture#update", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010788", "___s": true, "skip": true, "slug": "PIXI.BaseTextureupdate", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Update dimensions from real values\n */", "meta": { "range": [ 7526, 7771 ], "filename": "BaseTexture.js", "lineno": 255, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116395", "name": "BaseTexture#_updateDimensions", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Update dimensions from real values

", "name": "_updateDimensions", "longname": "PIXI.BaseTexture#_updateDimensions", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010791", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_updateDimensions", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Load a source.\n *\n * If the source is not-immediately-available, such as an image that needs to be\n * downloaded, then the 'loaded' or 'error' event will be dispatched in the future\n * and `hasLoaded` will remain false after this call.\n *\n * The logic state after calling `loadSource` directly or indirectly (eg. `fromImage`, `new BaseTexture`) is:\n *\n * if (texture.hasLoaded) {\n * // texture ready for use\n * } else if (texture.isLoading) {\n * // listen to 'loaded' and/or 'error' events on texture\n * } else {\n * // not loading, not going to load UNLESS the source is reloaded\n * // (it may still make sense to listen to the events)\n * }\n *\n * @protected\n * @param {HTMLImageElement|HTMLCanvasElement} source - the source object of the texture.\n */", "meta": { "range": [ 8664, 12022 ], "filename": "BaseTexture.js", "lineno": 284, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116443", "name": "BaseTexture#loadSource", "type": "MethodDefinition", "paramnames": [ "source" ] }, "vars": { "": null } }, "description": "

Load a source.

\n

If the source is not-immediately-available, such as an image that needs to be
downloaded, then the 'loaded' or 'error' event will be dispatched in the future
and hasLoaded will remain false after this call.

\n

The logic state after calling loadSource directly or indirectly (eg. fromImage, new BaseTexture) is:

\n
if (texture.hasLoaded) {\n   // texture ready for use\n} else if (texture.isLoading) {\n   // listen to 'loaded' and/or 'error' events on texture\n} else {\n   // not loading, not going to load UNLESS the source is reloaded\n   // (it may still make sense to listen to the events)\n}
", "access": "protected", "params": [ { "type": { "names": [ "HTMLImageElement", "HTMLCanvasElement" ] }, "description": "

the source object of the texture.

", "name": "source" } ], "name": "loadSource", "longname": "PIXI.BaseTexture#loadSource", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R010795", "___s": true, "skip": true, "slug": "PIXI.BaseTextureloadSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Updates type of the source image.\n */", "meta": { "range": [ 12085, 12858 ], "filename": "BaseTexture.js", "lineno": 407, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116747", "name": "BaseTexture#_updateImageType", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Updates type of the source image.

", "name": "_updateImageType", "longname": "PIXI.BaseTexture#_updateImageType", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010816", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_updateImageType", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Checks if `source` is an SVG image and whether it's loaded via a URL or a data URI. Then calls\n * `_loadSvgSourceUsingDataUri` or `_loadSvgSourceUsingXhr`.\n */", "meta": { "range": [ 13047, 13506 ], "filename": "BaseTexture.js", "lineno": 446, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116830", "name": "BaseTexture#_loadSvgSource", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Checks if source is an SVG image and whether it's loaded via a URL or a data URI. Then calls
_loadSvgSourceUsingDataUri or _loadSvgSourceUsingXhr.

", "name": "_loadSvgSource", "longname": "PIXI.BaseTexture#_loadSvgSource", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010824", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Reads an SVG string from data URI and then calls `_loadSvgSourceUsingString`.\n *\n * @param {string} dataUri - The data uri to load from.\n */", "meta": { "range": [ 13680, 14118 ], "filename": "BaseTexture.js", "lineno": 472, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116865", "name": "BaseTexture#_loadSvgSourceUsingDataUri", "type": "MethodDefinition", "paramnames": [ "dataUri" ] }, "vars": { "": null } }, "description": "

Reads an SVG string from data URI and then calls _loadSvgSourceUsingString.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

The data uri to load from.

", "name": "dataUri" } ], "name": "_loadSvgSourceUsingDataUri", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingDataUri", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R010826", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingDataUri", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Loads an SVG string from `imageUrl` using XHR and then calls `_loadSvgSourceUsingString`.\n */", "meta": { "range": [ 14237, 15065 ], "filename": "BaseTexture.js", "lineno": 495, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116909", "name": "BaseTexture#_loadSvgSourceUsingXhr", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Loads an SVG string from imageUrl using XHR and then calls _loadSvgSourceUsingString.

", "name": "_loadSvgSourceUsingXhr", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingXhr", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010830", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingXhr", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Loads texture using an SVG string. The original SVG Image is stored as `origSource` and the\n * created canvas is the new `source`. The SVG is scaled using `sourceScale`. Called by\n * `_loadSvgSourceUsingXhr` or `_loadSvgSourceUsingDataUri`.\n *\n * @param {string} svgString SVG source as string\n *\n * @fires loaded\n */", "meta": { "range": [ 15433, 16774 ], "filename": "BaseTexture.js", "lineno": 531, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100116979", "name": "BaseTexture#_loadSvgSourceUsingString", "type": "MethodDefinition", "paramnames": [ "svgString" ] }, "vars": { "": null } }, "description": "

Loads texture using an SVG string. The original SVG Image is stored as origSource and the
created canvas is the new source. The SVG is scaled using sourceScale. Called by
_loadSvgSourceUsingXhr or _loadSvgSourceUsingDataUri.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

SVG source as string

", "name": "svgString" } ], "fires": [ "event:loaded" ], "name": "_loadSvgSourceUsingString", "longname": "PIXI.BaseTexture#_loadSvgSourceUsingString", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R010834", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_loadSvgSourceUsingString", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used internally to update the width, height, and some other tracking vars once\n * a source has successfully loaded.\n *\n * @private\n */", "meta": { "range": [ 16946, 17027 ], "filename": "BaseTexture.js", "lineno": 579, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117144", "name": "BaseTexture#_sourceLoaded", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Used internally to update the width, height, and some other tracking vars once
a source has successfully loaded.

", "access": "private", "name": "_sourceLoaded", "longname": "PIXI.BaseTexture#_sourceLoaded", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010848", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_sourceLoaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Destroys this base texture\n *\n */", "meta": { "range": [ 17090, 17623 ], "filename": "BaseTexture.js", "lineno": 589, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117159", "name": "BaseTexture#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Destroys this base texture

", "name": "destroy", "longname": "PIXI.BaseTexture#destroy", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010850", "___s": true, "skip": true, "slug": "PIXI.BaseTexturedestroy", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Frees the texture from WebGL memory without destroying this texture object.\n * This means you can still use the texture later which will upload it to GPU\n * memory again.\n *\n */", "meta": { "range": [ 17838, 17895 ], "filename": "BaseTexture.js", "lineno": 623, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117230", "name": "BaseTexture#dispose", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Frees the texture from WebGL memory without destroying this texture object.
This means you can still use the texture later which will upload it to GPU
memory again.

", "name": "dispose", "longname": "PIXI.BaseTexture#dispose", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "params": [], "___id": "T000002R010856", "___s": true, "skip": true, "slug": "PIXI.BaseTexturedispose", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Changes the source image of the texture.\n * The original source must be an Image element.\n *\n * @param {string} newSrc - the path of the image\n */", "meta": { "range": [ 18079, 18189 ], "filename": "BaseTexture.js", "lineno": 634, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117241", "name": "BaseTexture#updateSourceImage", "type": "MethodDefinition", "paramnames": [ "newSrc" ] }, "vars": { "": null } }, "description": "

Changes the source image of the texture.
The original source must be an Image element.

", "params": [ { "type": { "names": [ "string" ] }, "description": "

the path of the image

", "name": "newSrc" } ], "name": "updateSourceImage", "longname": "PIXI.BaseTexture#updateSourceImage", "kind": "function", "memberof": "PIXI.BaseTexture", "scope": "instance", "___id": "T000002R010857", "___s": true, "skip": true, "slug": "PIXI.BaseTextureupdateSourceImage", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture from the given image url.\n * If the image is not in the base texture cache it will be created and loaded.\n *\n * @static\n * @param {string} imageUrl - The image url of the texture\n * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 18843, 19954 ], "filename": "BaseTexture.js", "lineno": 652, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117262", "name": "BaseTexture.fromImage", "type": "MethodDefinition", "paramnames": [ "imageUrl", "crossorigin", "scaleMode", "sourceScale" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture from the given image url.
If the image is not in the base texture cache it will be created and loaded.

", "scope": "static", "params": [ { "type": { "names": [ "string" ] }, "description": "

The image url of the texture

", "name": "imageUrl" }, { "type": { "names": [ "boolean" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Should use anonymous CORS? Defaults to true if the URL is not a data-URI.

", "name": "crossorigin" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "PIXI.settings.SCALE_MODE", "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Scale for the original image, used with Svg images.

", "name": "sourceScale" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "fromImage", "longname": "PIXI.BaseTexture.fromImage", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R010859", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.fromImage", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture from the given canvas element.\n *\n * @static\n * @param {HTMLCanvasElement} canvas - The canvas element source of the texture\n * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 20304, 20708 ], "filename": "BaseTexture.js", "lineno": 694, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117350", "name": "BaseTexture.fromCanvas", "type": "MethodDefinition", "paramnames": [ "canvas", "scaleMode" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture from the given canvas element.

", "scope": "static", "params": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "

The canvas element source of the texture

", "name": "canvas" }, { "type": { "names": [ "number" ] }, "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "fromCanvas", "longname": "PIXI.BaseTexture.fromCanvas", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R010869", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.fromCanvas", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Helper function that creates a base texture based on the source you provide.\n * The source can be - image url, image element, canvas element.\n *\n * @static\n * @param {string|HTMLImageElement|HTMLCanvasElement} source - The source to create base texture from.\n * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n * @return {PIXI.BaseTexture} The new base texture.\n */", "meta": { "range": [ 21277, 22422 ], "filename": "BaseTexture.js", "lineno": 722, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": { "id": "astnode100117401", "name": "BaseTexture.from", "type": "MethodDefinition", "paramnames": [ "source", "scaleMode", "sourceScale" ] }, "vars": { "": null } }, "description": "

Helper function that creates a base texture based on the source you provide.
The source can be - image url, image element, canvas element.

", "scope": "static", "params": [ { "type": { "names": [ "string", "HTMLImageElement", "HTMLCanvasElement" ] }, "description": "

The source to create base texture from.

", "name": "source" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "PIXI.settings.SCALE_MODE", "description": "

See {@link PIXI.SCALE_MODES} for possible values

", "name": "scaleMode" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": "(auto)", "description": "

Scale for the original image, used with Svg images.

", "name": "sourceScale" } ], "returns": [ { "type": { "names": [ "PIXI.BaseTexture" ] }, "description": "

The new base texture.

" } ], "name": "from", "longname": "PIXI.BaseTexture.from", "kind": "function", "memberof": "PIXI.BaseTexture", "___id": "T000002R010874", "___s": true, "skip": true, "slug": "PIXI.BaseTexture.from", "filepath": "core\\textures\\BaseTexture.js" } ], "$attributes": [ { "comment": "/**\n * The resolution / device pixel ratio of the texture\n *\n * @member {number} PIXI.BaseTexture#resolution\n * @default 1\n */", "meta": { "range": [ 1004, 1170 ], "filename": "BaseTexture.js", "lineno": 34, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The resolution / device pixel ratio of the texture

", "kind": "member", "name": "resolution", "type": { "names": [ "number" ] }, "defaultvalue": "1", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#resolution", "scope": "instance", "___id": "T000002R003812", "___s": true, "skip": true, "slug": "PIXI.BaseTextureresolution", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The width of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#width\n */", "meta": { "range": [ 1241, 1410 ], "filename": "BaseTexture.js", "lineno": 42, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The width of the base texture set when the image has loaded

", "readonly": true, "kind": "member", "name": "width", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#width", "scope": "instance", "___id": "T000002R003814", "___s": true, "skip": true, "slug": "PIXI.BaseTexturewidth", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The height of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#height\n */", "meta": { "range": [ 1446, 1617 ], "filename": "BaseTexture.js", "lineno": 50, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The height of the base texture set when the image has loaded

", "readonly": true, "kind": "member", "name": "height", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#height", "scope": "instance", "___id": "T000002R003816", "___s": true, "skip": true, "slug": "PIXI.BaseTextureheight", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used to store the actual width of the source of this texture\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#realWidth\n */", "meta": { "range": [ 1736, 1910 ], "filename": "BaseTexture.js", "lineno": 60, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Used to store the actual width of the source of this texture

", "readonly": true, "kind": "member", "name": "realWidth", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#realWidth", "scope": "instance", "___id": "T000002R003818", "___s": true, "skip": true, "slug": "PIXI.BaseTexturerealWidth", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used to store the actual height of the source of this texture\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#realHeight\n */", "meta": { "range": [ 1949, 2125 ], "filename": "BaseTexture.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Used to store the actual height of the source of this texture

", "readonly": true, "kind": "member", "name": "realHeight", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#realHeight", "scope": "instance", "___id": "T000002R003820", "___s": true, "skip": true, "slug": "PIXI.BaseTexturerealHeight", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The scale mode to apply when scaling this texture\n *\n * @member {number} PIXI.BaseTexture#scaleMode\n * @default PIXI.settings.SCALE_MODE\n * @see PIXI.SCALE_MODES\n */", "meta": { "range": [ 2166, 2386 ], "filename": "BaseTexture.js", "lineno": 75, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The scale mode to apply when scaling this texture

", "kind": "member", "name": "scaleMode", "type": { "names": [ "number" ] }, "defaultvalue": "PIXI.settings.SCALE_MODE", "see": [ "PIXI.SCALE_MODES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#scaleMode", "scope": "instance", "___id": "T000002R003822", "___s": true, "skip": true, "slug": "PIXI.BaseTexturescaleMode", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Set to true once the base texture has successfully loaded.\n *\n * This is never true if the underlying source fails to load or has no texture data.\n *\n * @readonly\n * @member {boolean} PIXI.BaseTexture#hasLoaded\n */", "meta": { "range": [ 2480, 2757 ], "filename": "BaseTexture.js", "lineno": 84, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set to true once the base texture has successfully loaded.

\n

This is never true if the underlying source fails to load or has no texture data.

", "readonly": true, "kind": "member", "name": "hasLoaded", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#hasLoaded", "scope": "instance", "___id": "T000002R003824", "___s": true, "skip": true, "slug": "PIXI.BaseTexturehasLoaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Set to true if the source is currently loading.\n *\n * If an Image source is loading the 'loaded' or 'error' event will be\n * dispatched when the operation ends. An underyling source that is\n * immediately-available bypasses loading entirely.\n *\n * @readonly\n * @member {boolean} PIXI.BaseTexture#isLoading\n */", "meta": { "range": [ 2799, 3187 ], "filename": "BaseTexture.js", "lineno": 94, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set to true if the source is currently loading.

\n

If an Image source is loading the 'loaded' or 'error' event will be
dispatched when the operation ends. An underyling source that is
immediately-available bypasses loading entirely.

", "readonly": true, "kind": "member", "name": "isLoading", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#isLoading", "scope": "instance", "___id": "T000002R003826", "___s": true, "skip": true, "slug": "PIXI.BaseTextureisLoading", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image source that is used to create the texture.\n *\n * TODO: Make this a setter that calls loadSource();\n *\n * @readonly\n * @member {HTMLImageElement|HTMLCanvasElement} PIXI.BaseTexture#source\n */", "meta": { "range": [ 3229, 3492 ], "filename": "BaseTexture.js", "lineno": 106, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image source that is used to create the texture.

\n

TODO: Make this a setter that calls loadSource();

", "readonly": true, "kind": "member", "name": "source", "type": { "names": [ "HTMLImageElement", "HTMLCanvasElement" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#source", "scope": "instance", "___id": "T000002R003828", "___s": true, "skip": true, "slug": "PIXI.BaseTexturesource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image source that is used to create the texture. This is used to\n * store the original Svg source when it is replaced with a canvas element.\n *\n * TODO: Currently not in use but could be used when re-scaling svg.\n *\n * @readonly\n * @member {Image} PIXI.BaseTexture#origSource\n */", "meta": { "range": [ 3562, 3916 ], "filename": "BaseTexture.js", "lineno": 116, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image source that is used to create the texture. This is used to
store the original Svg source when it is replaced with a canvas element.

\n

TODO: Currently not in use but could be used when re-scaling svg.

", "readonly": true, "kind": "member", "name": "origSource", "type": { "names": [ "Image" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#origSource", "scope": "instance", "___id": "T000002R003830", "___s": true, "skip": true, "slug": "PIXI.BaseTextureorigSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Type of image defined in source, eg. `png` or `svg`\n *\n * @readonly\n * @member {string} PIXI.BaseTexture#imageType\n */", "meta": { "range": [ 3987, 4152 ], "filename": "BaseTexture.js", "lineno": 127, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Type of image defined in source, eg. png or svg

", "readonly": true, "kind": "member", "name": "imageType", "type": { "names": [ "string" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#imageType", "scope": "instance", "___id": "T000002R003832", "___s": true, "skip": true, "slug": "PIXI.BaseTextureimageType", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Scale for source image. Used with Svg images to scale them before rasterization.\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#sourceScale\n */", "meta": { "range": [ 4219, 4415 ], "filename": "BaseTexture.js", "lineno": 135, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Scale for source image. Used with Svg images to scale them before rasterization.

", "readonly": true, "kind": "member", "name": "sourceScale", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#sourceScale", "scope": "instance", "___id": "T000002R003834", "___s": true, "skip": true, "slug": "PIXI.BaseTexturesourceScale", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)\n * All blend modes, and shaders written for default value. Change it on your own risk.\n *\n * @member {boolean} PIXI.BaseTexture#premultipliedAlpha\n * @default true\n */", "meta": { "range": [ 4457, 4752 ], "filename": "BaseTexture.js", "lineno": 143, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)
All blend modes, and shaders written for default value. Change it on your own risk.

", "kind": "member", "name": "premultipliedAlpha", "type": { "names": [ "boolean" ] }, "defaultvalue": "true", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#premultipliedAlpha", "scope": "instance", "___id": "T000002R003836", "___s": true, "skip": true, "slug": "PIXI.BaseTexturepremultipliedAlpha", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image url of the texture\n *\n * @member {string} PIXI.BaseTexture#imageUrl\n */", "meta": { "range": [ 4802, 4922 ], "filename": "BaseTexture.js", "lineno": 152, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image url of the texture

", "kind": "member", "name": "imageUrl", "type": { "names": [ "string" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#imageUrl", "scope": "instance", "___id": "T000002R003838", "___s": true, "skip": true, "slug": "PIXI.BaseTextureimageUrl", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Whether or not the texture is a power of two, try to use power of two textures as much\n * as you can\n *\n * @private\n * @member {boolean} PIXI.BaseTexture#isPowerOfTwo\n */", "meta": { "range": [ 4962, 5187 ], "filename": "BaseTexture.js", "lineno": 159, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Whether or not the texture is a power of two, try to use power of two textures as much
as you can

", "access": "private", "kind": "member", "name": "isPowerOfTwo", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#isPowerOfTwo", "scope": "instance", "___id": "T000002R003840", "___s": true, "skip": true, "slug": "PIXI.BaseTextureisPowerOfTwo", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n *\n * Set this to true if a mipmap of this texture needs to be generated. This value needs\n * to be set before the texture is used\n * Also the texture must be a power of two size to work\n *\n * @member {boolean} PIXI.BaseTexture#mipmap\n * @see PIXI.MIPMAP_TEXTURES\n */", "meta": { "range": [ 5259, 5594 ], "filename": "BaseTexture.js", "lineno": 170, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set this to true if a mipmap of this texture needs to be generated. This value needs
to be set before the texture is used
Also the texture must be a power of two size to work

", "kind": "member", "name": "mipmap", "type": { "names": [ "boolean" ] }, "see": [ "PIXI.MIPMAP_TEXTURES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#mipmap", "scope": "instance", "___id": "T000002R003842", "___s": true, "skip": true, "slug": "PIXI.BaseTexturemipmap", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n *\n * WebGL Texture wrap mode\n *\n * @member {number} PIXI.BaseTexture#wrapMode\n * @see PIXI.WRAP_MODES\n */", "meta": { "range": [ 5652, 5810 ], "filename": "BaseTexture.js", "lineno": 181, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

WebGL Texture wrap mode

", "kind": "member", "name": "wrapMode", "type": { "names": [ "number" ] }, "see": [ "PIXI.WRAP_MODES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#wrapMode", "scope": "instance", "___id": "T000002R003844", "___s": true, "skip": true, "slug": "PIXI.BaseTexturewrapMode", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * A map of renderer IDs to webgl textures\n *\n * @private\n * @member {object} PIXI.BaseTexture#_glTextures\n */", "meta": { "range": [ 5864, 6040 ], "filename": "BaseTexture.js", "lineno": 190, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

A map of renderer IDs to webgl textures

", "access": "private", "kind": "member", "name": "_glTextures", "type": { "names": [ "object." ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#_glTextures", "scope": "instance", "___id": "T000002R003846", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_glTextures", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * If the object has been destroyed via destroy(). If true, it should not be used.\n *\n * @member {boolean} PIXI.BaseTexture#_destroyed\n * @private\n * @readonly\n */", "meta": { "range": [ 6270, 6485 ], "filename": "BaseTexture.js", "lineno": 207, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

If the object has been destroyed via destroy(). If true, it should not be used.

", "kind": "member", "name": "_destroyed", "type": { "names": [ "boolean" ] }, "access": "private", "readonly": true, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#_destroyed", "scope": "instance", "___id": "T000002R003850", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_destroyed", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Fired when a not-immediately-available source finishes loading.\n *\n * @protected\n * @event loaded\n * @memberof PIXI.BaseTexture#\n */", "meta": { "range": [ 6528, 6715 ], "filename": "BaseTexture.js", "lineno": 216, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Fired when a not-immediately-available source finishes loading.

", "access": "protected", "kind": "event", "name": "loaded", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#event:loaded", "scope": "instance", "___id": "T000002R003852", "___s": true, "skip": true, "slug": "PIXI.BaseTextureevent:loaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Fired when a not-immediately-available source fails to load.\n *\n * @protected\n * @event error\n * @memberof PIXI.BaseTexture#\n */", "meta": { "range": [ 6725, 6908 ], "filename": "BaseTexture.js", "lineno": 224, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Fired when a not-immediately-available source fails to load.

", "access": "protected", "kind": "event", "name": "error", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#event:error", "scope": "instance", "___id": "T000002R003853", "___s": true, "skip": true, "slug": "PIXI.BaseTextureevent:error", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The resolution / device pixel ratio of the texture\n *\n * @member {number} PIXI.BaseTexture#resolution\n * @default 1\n */", "meta": { "range": [ 1004, 1170 ], "filename": "BaseTexture.js", "lineno": 34, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The resolution / device pixel ratio of the texture

", "kind": "member", "name": "resolution", "type": { "names": [ "number" ] }, "defaultvalue": "1", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#resolution", "scope": "instance", "___id": "T000002R010746", "___s": true, "skip": true, "slug": "PIXI.BaseTextureresolution", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The width of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#width\n */", "meta": { "range": [ 1241, 1410 ], "filename": "BaseTexture.js", "lineno": 42, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The width of the base texture set when the image has loaded

", "readonly": true, "kind": "member", "name": "width", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#width", "scope": "instance", "___id": "T000002R010748", "___s": true, "skip": true, "slug": "PIXI.BaseTexturewidth", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The height of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#height\n */", "meta": { "range": [ 1446, 1617 ], "filename": "BaseTexture.js", "lineno": 50, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The height of the base texture set when the image has loaded

", "readonly": true, "kind": "member", "name": "height", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#height", "scope": "instance", "___id": "T000002R010750", "___s": true, "skip": true, "slug": "PIXI.BaseTextureheight", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used to store the actual width of the source of this texture\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#realWidth\n */", "meta": { "range": [ 1736, 1910 ], "filename": "BaseTexture.js", "lineno": 60, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Used to store the actual width of the source of this texture

", "readonly": true, "kind": "member", "name": "realWidth", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#realWidth", "scope": "instance", "___id": "T000002R010752", "___s": true, "skip": true, "slug": "PIXI.BaseTexturerealWidth", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Used to store the actual height of the source of this texture\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#realHeight\n */", "meta": { "range": [ 1949, 2125 ], "filename": "BaseTexture.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Used to store the actual height of the source of this texture

", "readonly": true, "kind": "member", "name": "realHeight", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#realHeight", "scope": "instance", "___id": "T000002R010754", "___s": true, "skip": true, "slug": "PIXI.BaseTexturerealHeight", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The scale mode to apply when scaling this texture\n *\n * @member {number} PIXI.BaseTexture#scaleMode\n * @default PIXI.settings.SCALE_MODE\n * @see PIXI.SCALE_MODES\n */", "meta": { "range": [ 2166, 2386 ], "filename": "BaseTexture.js", "lineno": 75, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The scale mode to apply when scaling this texture

", "kind": "member", "name": "scaleMode", "type": { "names": [ "number" ] }, "defaultvalue": "PIXI.settings.SCALE_MODE", "see": [ "PIXI.SCALE_MODES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#scaleMode", "scope": "instance", "___id": "T000002R010756", "___s": true, "skip": true, "slug": "PIXI.BaseTexturescaleMode", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Set to true once the base texture has successfully loaded.\n *\n * This is never true if the underlying source fails to load or has no texture data.\n *\n * @readonly\n * @member {boolean} PIXI.BaseTexture#hasLoaded\n */", "meta": { "range": [ 2480, 2757 ], "filename": "BaseTexture.js", "lineno": 84, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set to true once the base texture has successfully loaded.

\n

This is never true if the underlying source fails to load or has no texture data.

", "readonly": true, "kind": "member", "name": "hasLoaded", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#hasLoaded", "scope": "instance", "___id": "T000002R010758", "___s": true, "skip": true, "slug": "PIXI.BaseTexturehasLoaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Set to true if the source is currently loading.\n *\n * If an Image source is loading the 'loaded' or 'error' event will be\n * dispatched when the operation ends. An underyling source that is\n * immediately-available bypasses loading entirely.\n *\n * @readonly\n * @member {boolean} PIXI.BaseTexture#isLoading\n */", "meta": { "range": [ 2799, 3187 ], "filename": "BaseTexture.js", "lineno": 94, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set to true if the source is currently loading.

\n

If an Image source is loading the 'loaded' or 'error' event will be
dispatched when the operation ends. An underyling source that is
immediately-available bypasses loading entirely.

", "readonly": true, "kind": "member", "name": "isLoading", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#isLoading", "scope": "instance", "___id": "T000002R010760", "___s": true, "skip": true, "slug": "PIXI.BaseTextureisLoading", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image source that is used to create the texture.\n *\n * TODO: Make this a setter that calls loadSource();\n *\n * @readonly\n * @member {HTMLImageElement|HTMLCanvasElement} PIXI.BaseTexture#source\n */", "meta": { "range": [ 3229, 3492 ], "filename": "BaseTexture.js", "lineno": 106, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image source that is used to create the texture.

\n

TODO: Make this a setter that calls loadSource();

", "readonly": true, "kind": "member", "name": "source", "type": { "names": [ "HTMLImageElement", "HTMLCanvasElement" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#source", "scope": "instance", "___id": "T000002R010762", "___s": true, "skip": true, "slug": "PIXI.BaseTexturesource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image source that is used to create the texture. This is used to\n * store the original Svg source when it is replaced with a canvas element.\n *\n * TODO: Currently not in use but could be used when re-scaling svg.\n *\n * @readonly\n * @member {Image} PIXI.BaseTexture#origSource\n */", "meta": { "range": [ 3562, 3916 ], "filename": "BaseTexture.js", "lineno": 116, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image source that is used to create the texture. This is used to
store the original Svg source when it is replaced with a canvas element.

\n

TODO: Currently not in use but could be used when re-scaling svg.

", "readonly": true, "kind": "member", "name": "origSource", "type": { "names": [ "Image" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#origSource", "scope": "instance", "___id": "T000002R010764", "___s": true, "skip": true, "slug": "PIXI.BaseTextureorigSource", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Type of image defined in source, eg. `png` or `svg`\n *\n * @readonly\n * @member {string} PIXI.BaseTexture#imageType\n */", "meta": { "range": [ 3987, 4152 ], "filename": "BaseTexture.js", "lineno": 127, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Type of image defined in source, eg. png or svg

", "readonly": true, "kind": "member", "name": "imageType", "type": { "names": [ "string" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#imageType", "scope": "instance", "___id": "T000002R010766", "___s": true, "skip": true, "slug": "PIXI.BaseTextureimageType", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Scale for source image. Used with Svg images to scale them before rasterization.\n *\n * @readonly\n * @member {number} PIXI.BaseTexture#sourceScale\n */", "meta": { "range": [ 4219, 4415 ], "filename": "BaseTexture.js", "lineno": 135, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Scale for source image. Used with Svg images to scale them before rasterization.

", "readonly": true, "kind": "member", "name": "sourceScale", "type": { "names": [ "number" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#sourceScale", "scope": "instance", "___id": "T000002R010768", "___s": true, "skip": true, "slug": "PIXI.BaseTexturesourceScale", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)\n * All blend modes, and shaders written for default value. Change it on your own risk.\n *\n * @member {boolean} PIXI.BaseTexture#premultipliedAlpha\n * @default true\n */", "meta": { "range": [ 4457, 4752 ], "filename": "BaseTexture.js", "lineno": 143, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)
All blend modes, and shaders written for default value. Change it on your own risk.

", "kind": "member", "name": "premultipliedAlpha", "type": { "names": [ "boolean" ] }, "defaultvalue": "true", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#premultipliedAlpha", "scope": "instance", "___id": "T000002R010770", "___s": true, "skip": true, "slug": "PIXI.BaseTexturepremultipliedAlpha", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * The image url of the texture\n *\n * @member {string} PIXI.BaseTexture#imageUrl\n */", "meta": { "range": [ 4802, 4922 ], "filename": "BaseTexture.js", "lineno": 152, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

The image url of the texture

", "kind": "member", "name": "imageUrl", "type": { "names": [ "string" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#imageUrl", "scope": "instance", "___id": "T000002R010772", "___s": true, "skip": true, "slug": "PIXI.BaseTextureimageUrl", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Whether or not the texture is a power of two, try to use power of two textures as much\n * as you can\n *\n * @private\n * @member {boolean} PIXI.BaseTexture#isPowerOfTwo\n */", "meta": { "range": [ 4962, 5187 ], "filename": "BaseTexture.js", "lineno": 159, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Whether or not the texture is a power of two, try to use power of two textures as much
as you can

", "access": "private", "kind": "member", "name": "isPowerOfTwo", "type": { "names": [ "boolean" ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#isPowerOfTwo", "scope": "instance", "___id": "T000002R010774", "___s": true, "skip": true, "slug": "PIXI.BaseTextureisPowerOfTwo", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n *\n * Set this to true if a mipmap of this texture needs to be generated. This value needs\n * to be set before the texture is used\n * Also the texture must be a power of two size to work\n *\n * @member {boolean} PIXI.BaseTexture#mipmap\n * @see PIXI.MIPMAP_TEXTURES\n */", "meta": { "range": [ 5259, 5594 ], "filename": "BaseTexture.js", "lineno": 170, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Set this to true if a mipmap of this texture needs to be generated. This value needs
to be set before the texture is used
Also the texture must be a power of two size to work

", "kind": "member", "name": "mipmap", "type": { "names": [ "boolean" ] }, "see": [ "PIXI.MIPMAP_TEXTURES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#mipmap", "scope": "instance", "___id": "T000002R010776", "___s": true, "skip": true, "slug": "PIXI.BaseTexturemipmap", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n *\n * WebGL Texture wrap mode\n *\n * @member {number} PIXI.BaseTexture#wrapMode\n * @see PIXI.WRAP_MODES\n */", "meta": { "range": [ 5652, 5810 ], "filename": "BaseTexture.js", "lineno": 181, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

WebGL Texture wrap mode

", "kind": "member", "name": "wrapMode", "type": { "names": [ "number" ] }, "see": [ "PIXI.WRAP_MODES" ], "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#wrapMode", "scope": "instance", "___id": "T000002R010778", "___s": true, "skip": true, "slug": "PIXI.BaseTexturewrapMode", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * A map of renderer IDs to webgl textures\n *\n * @private\n * @member {object} PIXI.BaseTexture#_glTextures\n */", "meta": { "range": [ 5864, 6040 ], "filename": "BaseTexture.js", "lineno": 190, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

A map of renderer IDs to webgl textures

", "access": "private", "kind": "member", "name": "_glTextures", "type": { "names": [ "object." ] }, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#_glTextures", "scope": "instance", "___id": "T000002R010780", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_glTextures", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * If the object has been destroyed via destroy(). If true, it should not be used.\n *\n * @member {boolean} PIXI.BaseTexture#_destroyed\n * @private\n * @readonly\n */", "meta": { "range": [ 6270, 6485 ], "filename": "BaseTexture.js", "lineno": 207, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

If the object has been destroyed via destroy(). If true, it should not be used.

", "kind": "member", "name": "_destroyed", "type": { "names": [ "boolean" ] }, "access": "private", "readonly": true, "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#_destroyed", "scope": "instance", "___id": "T000002R010784", "___s": true, "skip": true, "slug": "PIXI.BaseTexture_destroyed", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Fired when a not-immediately-available source finishes loading.\n *\n * @protected\n * @event loaded\n * @memberof PIXI.BaseTexture#\n */", "meta": { "range": [ 6528, 6715 ], "filename": "BaseTexture.js", "lineno": 216, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Fired when a not-immediately-available source finishes loading.

", "access": "protected", "kind": "event", "name": "loaded", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#event:loaded", "scope": "instance", "___id": "T000002R010786", "___s": true, "skip": true, "slug": "PIXI.BaseTextureevent:loaded", "filepath": "core\\textures\\BaseTexture.js" }, { "comment": "/**\n * Fired when a not-immediately-available source fails to load.\n *\n * @protected\n * @event error\n * @memberof PIXI.BaseTexture#\n */", "meta": { "range": [ 6725, 6908 ], "filename": "BaseTexture.js", "lineno": 224, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\textures", "code": {} }, "description": "

Fired when a not-immediately-available source fails to load.

", "access": "protected", "kind": "event", "name": "error", "memberof": "PIXI.BaseTexture", "longname": "PIXI.BaseTexture#event:error", "scope": "instance", "___id": "T000002R010787", "___s": true, "skip": true, "slug": "PIXI.BaseTextureevent:error", "filepath": "core\\textures\\BaseTexture.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [ { "name": "EventEmitter" } ], "$augmentedBy": [ { "name": "BaseRenderTexture" }, { "name": "VideoBaseTexture" }, { "name": "BaseRenderTexture" }, { "name": "VideoBaseTexture" } ], "filepath": "core\\textures\\BaseTexture.js" }