Interface: TilingSpriteOptions

TilingSpriteOptions

Constructor options used for TilingSprite instances. Extends scene.TilingSpriteViewOptions

const tilingSprite = new TilingSprite({
   texture: Texture.from('assets/image.png'),
   width: 100,
   height: 100,
   tilePosition: { x: 100, y: 100 },
   tileScale: { x: 2, y: 2 },
});
Properties:
Name Type Default Description
anchor PointData {x: 0, y: 0}

The anchor point of the sprite

applyAnchorToTexture boolean false
height number 256

The height of the tiling sprite.

roundPixels boolean

Whether or not to round the x/y position.

texture Texture Texture.WHITE

The texture to use for the sprite.

tilePosition PointData {x: 0, y: 0}

The offset of the image that is being tiled.

tileRotation number 0

The rotation of the image that is being tiled.

tileScale PointData {x: 1, y: 1}

Scaling of the image that is being tiled.

width number 256

The width of the tiling sprite. #

See:

Extends

Members

anchor PointData

The anchor point of the sprite

Default Value:
  • {x: 0, y: 0}

applyAnchorToTexture boolean

Default Value:
  • false
TODO

height number

The height of the tiling sprite.

Default Value:
  • 256

roundPixels boolean

Whether or not to round the x/y position.

texture Texture

The texture to use for the sprite.

Default Value:
  • Texture.WHITE

tilePosition PointData

The offset of the image that is being tiled.

Default Value:
  • {x: 0, y: 0}

tileRotation number

The rotation of the image that is being tiled.

Default Value:
  • 0

tileScale PointData

Scaling of the image that is being tiled.

Default Value:
  • {x: 1, y: 1}

width number

The width of the tiling sprite. #

Default Value:
  • 256