Optional
anchorThe anchor point of the TilingSprite (0-1 range)
Controls the origin point for rotation, scaling, and positioning. Can be a number for uniform anchor or a PointData for separate x/y values.
Optional
applyWhether the tiling pattern should originate from the anchor point. When true, tiling starts from the origin instead of top-left.
This will make the texture coordinates assigned to each vertex dependent on the value of the anchor. Without this, the top-left corner always gets the (0, 0) texture coordinate.
Optional
heightThe height of the tiling area. This defines how tall the tiling sprite will be.
Optional
roundWhether to round the sprite's position to whole pixels. This can help with crisp rendering, especially for pixel art. When true, the sprite's position will be rounded to the nearest pixel.
Optional
textureThe texture to use for tiling. This is the image that will be repeated across the sprite.
Optional
tileThe offset of the tiling texture. Used to scroll or position the repeated pattern.
Optional
tileRotation of the tiling texture in radians. This controls the rotation applied to the texture before tiling.
Optional
tileScale of the tiling texture. Affects the size of each repeated instance of the texture.
Optional
widthThe width of the tiling area. This defines how wide the tiling sprite will be.
Constructor options used for creating a TilingSprite instance. Defines the texture, tiling behavior, and rendering properties of the sprite.
Example
See