tilesprite

PP.assets. tilesprite

The namespace containing functions to load and manage tilesprites assets
Source:

Methods

(static) add(scene, image, x, y, width, height, pivot_x, pivot_y)

Add a new tilesprite to the scene.
Source:
Parameters:
Name Type Description
scene object The scene object where to add the image.
image object The object of an image returned by PP.assets.image.load
x number The horizontal initial position in pixels of the image.
y number The vertical initial position in pixels of the image.
width number The width of the tilesprite. If zero it will use the size of the texture frame.
height number The height of the tilesprite. If zero it will use the size of the texture frame.
pivot_x number The pivot X position **in percentage** from 0 to 1.
pivot_y number The pivot Y position **in percentage** from 0 to 1.