Class: TextureMatrix
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:19
Class controls uv mapping from Texture normal space to BaseTexture normal space.
Takes trim and rotate into account. May contain clamp settings for Meshes and TilingSprite.
Can be used in Texture uvMatrix field, or separately, you can use different clamp settings on the same texture.
If you want to add support for texture region of certain feature or filter, that's what you're looking for.
Takes track of Texture changes through _lastTextureID private field.
Use update() method call to track it from outside.
See
- Texture
- Mesh
- TilingSprite
Advanced
Constructors
Constructor
> new TextureMatrix(texture, clampMargin?): TextureMatrix
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:62
Parameters
texture
observed texture
clampMargin?
number
Changes frame clamping, 0.5 by default. Use -0.5 for extra border.
Returns
TextureMatrix
Properties
_texture
> protected _texture: Texture
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:51
clampMargin
> clampMargin: number
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:38
Changes frame clamping Works with TilingSprite and Mesh Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas
Default
0.5
clampOffset
> clampOffset: number
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:31
Changes frame clamping Works with TilingSprite and Mesh Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders
Default
0
isSimple
> readonly isSimple: boolean
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:57
If texture size is the same as baseTexture.
Default
false
@readonly
mapCoord
> readonly mapCoord: Matrix
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:24
Matrix operation that converts texture region coords to texture coords
uClampFrame
> readonly uClampFrame: Float32Array
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:43
Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw. Calculated based on clampOffset.
uClampOffset
> readonly uClampOffset: Float32Array
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:45
Normalized clamp offset. Calculated based on clampOffset.
Accessors
texture
Get Signature
> get texture(): Texture
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:64
Texture property.
Returns
Set Signature
> set texture(value): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:65
Parameters
value
Returns
void
Methods
multiplyUvs()
> multiplyUvs(uvs, out?): Float32Array
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:72
Multiplies uvs array to transform
Parameters
uvs
Float32Array
mesh uvs
out?
Float32Array<ArrayBufferLike>
output
Returns
Float32Array
- output
update()
> update(): boolean
Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.d.ts:77
Updates matrices if texture was changed
Returns
boolean
- whether or not it was updated