Name | Type | Attributes | Description |
---|---|---|---|
texture |
Texture |
observed texture |
|
clampMargin |
number |
<optional> |
Changes frame clamping, 0.5 by default. Use -0.5 for extra border. |
- See:
-
- Texture
- Mesh
- TilingSprite
Members
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 Value:
- 0.5
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 Value:
- 0
If texture size is the same as baseTexture.
- Default Value:
- false
mapCoord Matrix readonly
Matrix operation that converts texture region coords to texture coords
texture Texture
Texture property.
Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw. Calculated based on clampOffset.
Normalized clamp offset. Calculated based on clampOffset.
Tracks Texture frame changes.
Methods
Multiplies uvs array to transform
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
uvs |
Float32Array |
mesh uvs |
||
out |
Float32Array |
<optional> |
uvs |
output |
Returns:
Type | Description |
---|---|
Float32Array |
|
Updates matrices if texture was changed
Returns:
Type | Description |
---|---|
boolean |
|