Optional
options: IBaseTextureOptions<any>Optional
alphaMode?: ALPHA_MODESOptional
anisotropicLevel?: numberOptional
format?: FORMATSOptional
height?: numberOptional
mipmap?: MIPMAP_MODESOptional
multisample?: MSAA_QUALITYOptional
pixiIdPrefix?: stringOptional
resolution?: numberOptional
resourceOptions?: ROOptional
scaleMode?: SCALE_MODESOptional
target?: TARGETSOptional
type?: TYPESOptional
width?: numberOptional
wrapMode?: WRAP_MODESNumber of the texture batch, used by multi-texture renderers
Location inside texture batch, used by multi-texture renderers
How to treat premultiplied alpha, see PIXI.ALPHA_MODES.
Anisotropic filtering level of texture
Currently default cache ID.
Readonly
destroyedFlag if BaseTexture has been destroyed.
Readonly
dirtyUsed by TextureSystem to only update texture to the GPU when needed.
Please call update()
to increment it.
Protected
dirtyUsed by TextureSystem to only update texture style when needed.
The data structure for the filters.
The pixel format of the texture
Readonly
framebufferThe framebuffer of this base texture.
Readonly
heightThe height of the base texture set when the image has loaded
Readonly
isWhether or not the texture is a power of two, try to use power of two textures as much as you can
The data structure for the stencil masks.
Whether its a part of another texture, handled by ArrayResource or CubeResource
Readonly
resolutionThe resolution / device pixel ratio of the texture
Readonly
resourceThe resource used by this BaseTexture, there can only be one resource per BaseTexture, but textures can share resources.
The target type
Readonly
textureThe collection of alternative cache ids, since some BaseTextures can have more than one ID, short name and longer full URL
Protected
touchedUsed by automatic texture Garbage Collection, stores last GC tick when it was bound
The type of resource data
Protected
Readonly
uidGlobal unique identifier for this BaseTexture
Readonly
validGenerally speaking means when resource is loaded.
Readonly
widthThe width of the base texture set when the image has loaded
Static
_Global number of the texture batch, used by multi-texture renderers.
Static
defaultDefault options used when creating BaseTexture objects.
Static
prefixedMipmap mode of the texture, affects downscaled images
Pixel height of the source of this texture
Pixel width of the source of this texture
Utility function for BaseTexture|Texture cast.
Destroys this texture.
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.
Optional
context: anyAdd a one-time listener for a given event.
Optional
context: anyRemove all listeners, or those of the specified event.
Optional
event: string | symbolRemove the listeners of a given event.
Optional
fn: (...args: any[]) => voidOptional
context: anyOptional
once: booleanResizes the BaseRenderTexture.
The desired width to resize to.
The desired height to resize to.
Sets real size of baseTexture, preserves current resolution.
Full rendered width
Full rendered height
Optional
resolution: numberOptionally set resolution
Changes resolution
res
Sets the resource if it wasn't set. Throws error if resource already present
that is managing this BaseTexture
Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.
Desired visual width
Desired visual height
Optional
resolution: numberOptionally set resolution
Changes style options of BaseTexture
Optional
scaleMode: SCALE_MODESPixi scalemode
Optional
mipmap: MIPMAP_MODESenable mipmaps
Invalidates the object. Texture becomes valid if width and height are greater than zero.
Static
addAdds 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.
Static
fromHelper 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.
Optional
options: IBaseTextureOptions<RO>See PIXI.BaseTexture's constructor for options.
Optional
alphaMode?: ALPHA_MODESOptional
anisotropicLevel?: numberOptional
format?: FORMATSOptional
height?: numberOptional
mipmap?: MIPMAP_MODESOptional
multisample?: MSAA_QUALITYOptional
pixiIdPrefix?: stringOptional
resolution?: numberOptional
resourceOptions?: ROOptional
scaleMode?: SCALE_MODESOptional
target?: TARGETSOptional
type?: TYPESOptional
width?: numberOptional
wrapMode?: WRAP_MODESOptional
strict: booleanEnforce strict-mode, see PIXI.settings.STRICT_TEXTURE_CACHE.
The new base texture.
Static
fromCreate a new Texture with a BufferResource from a typed array.
The optional array to use. If no data is provided, a new Float32Array is created.
Width of the resource
Height of the resource
Optional
options: IBaseTextureOptions<IBufferResourceOptions>See PIXI.BaseTexture's constructor for options. Default properties are different from the constructor's defaults.
Optional
alphaMode?: ALPHA_MODESOptional
anisotropicLevel?: numberOptional
format?: FORMATSOptional
height?: numberOptional
mipmap?: MIPMAP_MODESOptional
multisample?: MSAA_QUALITYOptional
pixiIdPrefix?: stringOptional
resolution?: numberOptional
resourceOptions?: ROOptional
scaleMode?: SCALE_MODESOptional
target?: TARGETSOptional
type?: TYPESOptional
width?: numberOptional
wrapMode?: WRAP_MODESStatic
removeRemove a BaseTexture from the global BaseTextureCache.
id of a BaseTexture to be removed, or a BaseTexture instance itself.
The BaseTexture that was removed.
A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it.
Hint: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded otherwise black rectangles will be drawn instead.
A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position and rotation of the given Display Objects is ignored. For example:
Example
Memberof
PIXI