Optionaloptions: IBaseTextureOptions<any>OptionalalphaMode?: ALPHA_MODESOptionalanisotropicLevel?: numberOptionalformat?: FORMATSOptionalheight?: numberOptionalmipmap?: MIPMAP_MODESOptionalmultisample?: MSAA_QUALITYOptionalpixiIdPrefix?: stringOptionalresolution?: numberOptionalresourceOptions?: ROOptionalscaleMode?: SCALE_MODESOptionaltarget?: TARGETSOptionaltype?: TYPESOptionalwidth?: numberOptionalwrapMode?: 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.
ReadonlydestroyedFlag if BaseTexture has been destroyed.
ReadonlydirtyUsed by TextureSystem to only update texture to the GPU when needed.
Please call update() to increment it.
The data structure for the filters.
The pixel format of the texture
ReadonlyframebufferThe framebuffer of this base texture.
ReadonlyheightThe height of the base texture set when the image has loaded
ReadonlyisWhether 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
ReadonlyresolutionThe resolution / device pixel ratio of the texture
ReadonlyresourceThe resource used by this BaseTexture, there can only be one resource per BaseTexture, but textures can share resources.
The target type
ReadonlytextureThe collection of alternative cache ids, since some BaseTextures can have more than one ID, short name and longer full URL
The type of resource data
ReadonlyvalidGenerally speaking means when resource is loaded.
ReadonlywidthThe width of the base texture set when the image has loaded
Static_Global number of the texture batch, used by multi-texture renderers.
StaticdefaultDefault options used when creating BaseTexture objects.
StaticprefixedMipmap 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.
Optionalcontext: anyAdd a one-time listener for a given event.
Optionalcontext: anyRemove all listeners, or those of the specified event.
Optionalevent: string | symbolRemove the listeners of a given event.
Optionalfn: (...args: any[]) => voidOptionalcontext: anyOptionalonce: 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
Optionalresolution: 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
Optionalresolution: numberOptionally set resolution
Changes style options of BaseTexture
OptionalscaleMode: SCALE_MODESPixi scalemode
Optionalmipmap: MIPMAP_MODESenable mipmaps
Invalidates the object. Texture becomes valid if width and height are greater than zero.
StaticaddAdds 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.
StaticfromHelper 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.
Optionaloptions: IBaseTextureOptions<RO>See PIXI.BaseTexture's constructor for options.
OptionalalphaMode?: ALPHA_MODESOptionalanisotropicLevel?: numberOptionalformat?: FORMATSOptionalheight?: numberOptionalmipmap?: MIPMAP_MODESOptionalmultisample?: MSAA_QUALITYOptionalpixiIdPrefix?: stringOptionalresolution?: numberOptionalresourceOptions?: ROOptionalscaleMode?: SCALE_MODESOptionaltarget?: TARGETSOptionaltype?: TYPESOptionalwidth?: numberOptionalwrapMode?: WRAP_MODESOptionalstrict: booleanEnforce strict-mode, see PIXI.settings.STRICT_TEXTURE_CACHE.
The new base texture.
StaticfromCreate 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
Optionaloptions: IBaseTextureOptions<IBufferResourceOptions>See PIXI.BaseTexture's constructor for options. Default properties are different from the constructor's defaults.
OptionalalphaMode?: ALPHA_MODESOptionalanisotropicLevel?: numberOptionalformat?: FORMATSOptionalheight?: numberOptionalmipmap?: MIPMAP_MODESOptionalmultisample?: MSAA_QUALITYOptionalpixiIdPrefix?: stringOptionalresolution?: numberOptionalresourceOptions?: ROOptionalscaleMode?: SCALE_MODESOptionaltarget?: TARGETSOptionaltype?: TYPESOptionalwidth?: numberOptionalwrapMode?: WRAP_MODESStaticremoveRemove 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