STAY IN TOUCH

and receive our newsletter to get the latest news and tips.


Board

The Board lets you display and move around sprites, to create awesome 2D games. Read more
function (Board) → add on every frame(body : Action) returns Event Binding
add an action that fires for every display frame.
function (Board) → at(i : Number) returns Sprite
Gets the sprite indexed by i
function (Board) → background scene returns Board Background Scene
Gets the background scene
function (Board) → clear background camera
Clears the background camera
function (Board) → clear background picture
Clear the background picture
function (Board) → clear events
Clear all queued events related to this board
function (Board) → clear every frame timers
Stops and clears all the every frame timers
function (Board) → count returns Number
Gets the sprite count
function (Board) → create anchor(width : Number, height : Number) returns Sprite
Create an anchor sprite.
function (Board) → create boundary(distance : Number)
Create walls around the board at the given distance.
function (Board) → create ellipse(width : Number, height : Number) returns Sprite
Create a new ellipse sprite.
function (Board) → create obstacle(x : Number, y : Number, width : Number, height : Number, elasticity : Number) returns Obstacle
Create a line obstacle with given start point, and given width and height. Elasticity is 0 for sticky, 1 for complete bounce.
function (Board) → create picture(picture : Picture) returns Sprite
Create a new picture sprite.
function (Board) → create rectangle(width : Number, height : Number) returns Sprite
Create a new rectangle sprite.
function (Board) → create spring(sprite1 : Sprite, sprite2 : Sprite, stiffness : Number) returns Spring
Create a spring between the two sprites.
function (Board) → create sprite set returns Sprite Set
Create a new collection for sprites.
function (Board) → create sprite sheet(picture : Picture) returns Sprite Sheet
Create a new sprite sheet.
function (Board) → create text(width : Number, height : Number, font Size : Number, text : String) returns Sprite
Create a new text sprite.
function (Board) → equals(other board : Board) returns Boolean
Checks if the board is the same instance as the other board.
function (Board) → evolve
Update positions of sprites on board.
function (Board) → frame timer returns Timer
gets the timer that fires for every display frame.
function (Board) → height returns Number
Gets the height in pixels
function (Board) → is invalid returns Boolean
Returns true if the current instance is useless
function (Board) → is landscape returns Boolean
Gets a value indicating if the board is designed to be viewed in landscape mode
function (Board) → on every frame(body : Action) returns Event Binding
add an action that fires for every display frame.
function (Board) → on swipe(swiped : Vector Action) returns Event Binding
set the handler that is invoked when the board is swiped
function (Board) → on tap(tapped : Position Action) returns Event Binding
set the handler that is invoked when the board is tapped
function (Board) → on touch down(touch down : Position Action) returns Event Binding
set the handler that is invoked when the board is touched
function (Board) → on touch up(touch up : Position Action) returns Event Binding
set the handler that is invoked when the board touch is released
function (Board) → post to wall
Shows the board on the wall.
function (Board) → set background(color : Color)
Sets the background color
function (Board) → set background camera(camera : Camera)
Sets the background camera
function (Board) → set background picture(picture : Picture)
Sets the background picture
function (Board) → set debug mode(debug : Boolean)
In debug mode, board displays speed and other info of sprites
function (Board) → set friction(friction : Number)
Sets the default friction for sprites to a fraction of speed loss between 0 and 1
function (Board) → set gravity(x : Number, y : Number)
Sets the uniform acceleration vector for objects on the board to pixels/sec^2
function (Board) → touch current returns Vector3
Current touch point
function (Board) → touched returns Boolean
True if board is touched
function (Board) → touch end returns Vector3
Last touch end point
function (Board) → touch start returns Vector3
Last touch start point
function (Board) → touch velocity returns Vector3
Final touch velocity after touch ended
function (Board) → update on wall
Make updates visible.
function (Board) → width returns Number
Gets the width in pixels