The BaseTexture's Resource type.
The options for constructing resource.
Global number of the texture batch, used by multi-texture renderers
Pixel height of the source of this texture
Pixel width of the source of this texture
Refresh check for isPowerOfTwo texture based on size
Utility function for BaseTexture|Texture cast
Destroys this base texture. The method stops if resource doesn't want this texture to be destroyed. Removes texture from all caches.
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.
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Handle errors with resources.
Error event emitted.
Add a one-time listener for a given event.
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Sets real size of baseTexture, preserves current resolution.
Full rendered width
Full rendered height
this
Changes resolution
res
this
Sets the resource if it wasn't set. Throws error if resource already present
that is managing this BaseTexture
this
Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.
Visual width
Visual height
this
Changes style options of BaseTexture
this
Invalidates the object. Texture becomes valid if width and height are greater than zero.
Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.
The BaseTexture to add to the cache.
The id that the BaseTexture will be stored against.
Helper function that creates a base texture based on the source you provide. The source can be - image url, image element, canvas element. If the source is an image url or an image element and not in the base texture cache, it will be created and loaded.
The source to create base texture from.
The new base texture.
Create a new BaseTexture with a BufferResource from a Float32Array. RGBA values are floats from 0 to 1.
The optional array to use, if no data is provided, a new Float32Array is created.
Width of the resource
Height of the resource
The resulting new BaseTexture
Remove a BaseTexture from the global BaseTextureCache.
id of a BaseTexture to be removed, or a BaseTexture instance itself.
The BaseTexture that was removed.
Generated using TypeDoc
A Texture stores the information that represents an image. All textures have a base texture, which contains information about the source. Therefore you can have many textures all using a single BaseTexture
PIXI