Optional
options: IBaseTextureOptions<any>Number 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.
PIXI.ALPHA_MODES.UNPACK
Anisotropic filtering level of texture
0
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.
The data structure for the filters.
The pixel format of the texture
PIXI.FORMATS.RGBA
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
false
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
PIXI.settings.RESOLUTION
Readonly
resourceThe resource used by this BaseTexture, there can only be one resource per BaseTexture, but textures can share resources.
The target type
PIXI.TARGETS.TEXTURE_2D
Readonly
textureThe 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
PIXI.TYPES.UNSIGNED_BYTE
Readonly
validGenerally speaking means when resource is loaded.
Readonly
widthThe width of the base texture set when the image has loaded
Static
_globalGlobal number of the texture batch, used by multi-texture renderers.
Static
defaultDefault options used when creating BaseTexture objects.
PIXI.BaseTexture
Static
prefixedColor when clearning the texture.
Mipmap mode of the texture, affects downscaled images
PIXI.MIPMAP_MODES.POW2
Shortcut to this.framebuffer.multisample
.
PIXI.MSAA_QUALITY.NONE
Pixel height of the source of this texture
Pixel width of the source of this texture
The scale mode to apply when scaling this texture
PIXI.SCALE_MODES.LINEAR
How the texture wraps
PIXI.WRAP_MODES.CLAMP
Utility function for BaseTexture|Texture cast.
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
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
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.
Static
removeRemove 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 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