| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
|
Extends
Members
-
A reference to the canvas render target (we only need one as this can be shared across renderers)
-
cacheId string inherited
-
Currently default cache ID.
-
destroyed boolean readonly inherited
-
Flag if BaseTexture has been destroyed.
-
dirtyId number protected inherited
-
Used by TextureSystem to only update texture to the GPU when needed.
-
dirtyStyleId number protected inherited
-
Used by TextureSystem to only update texture style when needed.
-
filterStack Array.<PIXI.Graphics>
-
The data structure for the filters.
-
format PIXI.FORMATS inherited
-
The pixel format of the texture
- Default Value:
- PIXI.FORMATS.RGBA
-
The height of the base texture set when the image has loaded
-
isPowerOfTwo boolean readonly inherited
-
Whether or not the texture is a power of two, try to use power of two textures as much as you can
- Default Value:
- false
-
mipmap PIXI.MIPMAP_MODES inherited overrides
-
Mipmap mode of the texture, affects downscaled images
- Default Value:
- PIXI.settings.MIPMAP_TEXTURES
-
premultiplyAlpha boolean inherited
-
Set to true to enable pre-multiplied alpha
- Default Value:
- true
-
realHeight number readonly inherited
-
Pixel height of the source of this texture
-
realWidth number readonly inherited
-
Pixel width of the source of this texture
-
resolution number inherited
-
The resolution / device pixel ratio of the texture
- Default Value:
- PIXI.settings.RESOLUTION
-
resource PIXI.resources.Resource readonly inherited
-
The resource used by this BaseTexture, there can only be one resource per BaseTexture, but textures can share resources.
-
scaleMode PIXI.SCALE_MODES inherited
-
The scale mode to apply when scaling this texture
- Default Value:
- PIXI.settings.SCALE_MODE
-
stencilMaskStack Array.<PIXI.Graphics>
-
The data structure for the stencil masks.
-
target PIXI.TARGETS inherited
-
The target type
- Default Value:
- PIXI.TARGETS.TEXTURE_2D
-
textureCacheIds Array.<string> readonly inherited
-
The collection of alternative cache ids, since some BaseTextures can have more than one ID, short name and longer full URL
-
touched number protected inherited
-
TODO: fill in description
-
type PIXI.TYPES inherited
-
The type of resource data
- Default Value:
- PIXI.TYPES.UNSIGNED_BYTE
-
uid string protected inherited
-
Global unique identifier for this BaseTexture
-
Generally speaking means when resource is loaded.
-
The width of the base texture set when the image has loaded
-
wrapMode number inherited
-
How the texture wraps
Methods
-
destroy () overrides
-
Destroys this texture.
-
dispose () overrides
-
Frees the texture and framebuffer 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.
Fires:
-
getDrawableSource ()PIXI.ICanvasImageSource inherited
-
Get the drawable source, such as HTMLCanvasElement or HTMLImageElement suitable for rendering with CanvasRenderer. Provided by @pixi/canvas-renderer package.
Returns:
Type Description PIXI.ICanvasImageSource Source to render with CanvasRenderer -
Resizes the BaseRenderTexture.
Name Type Description widthnumber The width to resize to.
heightnumber The height to resize to.
-
setRealSize (realWidth, realHeight, resolution)BaseTexture inherited
-
Sets real size of baseTexture, preserves current resolution.
Name Type Description realWidthnumber Full rendered width
realHeightnumber Full rendered height
resolutionnumber optional Optionally set resolution
Returns:
Type Description BaseTexture this -
setResolution (resolution)BaseTexture inherited
-
Changes resolution
Name Type Description resolutionnumber optional res
Returns:
Type Description BaseTexture this -
setResource (resource)BaseTexture inherited
-
Sets the resource if it wasn't set. Throws error if resource already present
Name Type Description resourcePIXI.resources.Resource that is managing this BaseTexture
Returns:
Type Description BaseTexture this -
setSize (width, height, resolution)BaseTexture inherited
-
Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.
Name Type Description widthnumber Visual width
heightnumber Visual height
resolutionnumber optional Optionally set resolution
Returns:
Type Description BaseTexture this -
setStyle (scaleMode, mipmap)BaseTexture inherited
-
Changes style options of BaseTexture
Name Type Description scaleModePIXI.SCALE_MODES optional Pixi scalemode
mipmapPIXI.MIPMAP_MODES optional enable mipmaps
Returns:
Type Description BaseTexture this -
update () inherited
-
Invalidates the object. Texture becomes valid if width and height are greater than zero.
Events
-
dispose inherited
-
Fired when BaseTexture is destroyed.
Name Type Description baseTexturePIXI.BaseTexture Instance of texture being destroyed.
-
Fired when a not-immediately-available source fails to load.
Name Type Description baseTexturePIXI.BaseTexture Resource errored.
-
Fired when a not-immediately-available source finishes loading.
Name Type Description baseTexturePIXI.BaseTexture Resource loaded.
-
update inherited
-
Fired when BaseTexture is updated.
Name Type Description baseTexturePIXI.BaseTexture Instance of texture being updated.