Advancedobserved texture
OptionalclampMargin: numberChanges frame clamping, 0.5 by default. Use -0.5 for extra border.
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
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
ReadonlyisIf texture size is the same as baseTexture.
ReadonlymapMatrix operation that converts texture region coords to texture coords
ReadonlyuClamp region for normalized coords, left-top pixel center in xy , bottom-right in zw. Calculated based on clampOffset.
ReadonlyuNormalized clamp offset. Calculated based on clampOffset.
Multiplies uvs array to transform
mesh uvs
Optionalout: Float32Arrayoutput
Updates matrices if texture was changed
Class controls uv mapping from Texture normal space to BaseTexture normal space.
Takes
trimandrotateinto account. May contain clamp settings for Meshes and TilingSprite.Can be used in Texture
uvMatrixfield, 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
_lastTextureIDprivate field. Useupdate()method call to track it from outside.See