Repository navigation
a2d.Tile
Armen edited this page Jun 2, 2012
·
1 revision
extends a2d.Node
Defined in tile.js
|
a2d.Tile(image, opts) Animated Tile Node
|
| **[draw](#draw)** (canvas, forceScale) draws this node and its children | |
| **[frameLoop](#frameLoop)** (range, updown) Initiate a frameloop | |
| **[setTile](#setTile)** (t) set which tile to display |
| _float_ | **[angle](#angle)** angle |
| _number_ | **[fps](#fps)** frames per second (does nothing if no frameloop is active) |
| _Image_ | **[image](#image)** |
| _boolean_ | **[loop](#loop)** |
| _float_ | **[opacity](#opacity)** 1.0 is opaque, 0.0 is transparent |
| *a2d.Position* | **[position](#position)** |
| *a2d.Vector* | **[range](#range)** |
| _boolean_ | **[scrollLock](#scrollLock)** Set this to true to make it ignore the scrolling offset. |
| _number_ | **[tile](#tile)** |
| *a2d.Dimension* | **[tileSize](#tileSize)** |
| **[animationend](#animationend)** register this event to handle things when the animation ends. |
a2d.Tile(image, opts)
Animated Tile Node
{Image} image
opts
draw (canvas, forceScale)
draws this node and its children
{HTMLCanvasElement} canvas optional
forceScale
--
frameLoop (range, updown)
Initiate a frameloop
{a2d.Vector} range
{boolean} updown
--
setTile (t)
set which tile to display
{number} t
--
{number} fps
frames per second (does nothing if no frameloop is active)
--
{float} opacity
1.0 is opaque, 0.0 is transparent
-- {a2d.Position} position
-- {a2d.Vector} range
--
{boolean} scrollLock
Set this to true to make it ignore the scrolling offset.
Mostly useful for UI
-- {a2d.Dimension} tileSize
animationend
register this event to handle things when the animation ends.
animatedNode.on("animationend", function() {
alert("animation ended.");
});