A | |
A, gamvas.key | |
actor, gamvas. | |
add | |
addActor, gamvas. | |
addAnimation, gamvas. | |
addOnLoad, gamvas. | |
addOnReady, gamvas. | |
addPrismaticJoint, gamvas. | |
addRevoluteJoint, gamvas. | |
addSound, gamvas. | |
addState | |
alignParticleToPath, gamvas. | |
ALT, gamvas.key | |
autoClear, gamvas. | |
B | |
B, gamvas.key | |
BACKSLASH, gamvas.key | |
BACKSPACE, gamvas.key | |
baseURL, gamvas | |
body, gamvas. | |
bodyCircle, gamvas. | |
bodyPolygon, gamvas. | |
bodyRect, gamvas. | |
BRACKET_CLOSE, gamvas.key | |
BRACKET_OPEN, gamvas.key | |
BREAK, gamvas.key | |
C | |
c, gamvas. | |
C, gamvas.key | |
camera, gamvas. | |
canvas, gamvas. | |
CAPSLOCK, gamvas.key | |
center | |
clearColor, gamvas. | |
clearScreen, gamvas. | |
COMMA, gamvas.key | |
connect, gamvas. | |
connected, gamvas. | |
copy, gamvas. | |
createBody, gamvas. | |
CTRL, gamvas.key | |
currentAnimation, gamvas. | |
currentFrame, gamvas. | |
D | |
D, gamvas.key | |
DASH, gamvas.key | |
data, gamvas. | |
debugAlpha, gamvas. | |
debugStrokeWidth, gamvas. | |
DELETE, gamvas.key | |
density, gamvas. | |
difference, gamvas. | |
dimension, gamvas. | |
disableCamera, gamvas. | |
distance, gamvas. | |
doCollide, gamvas. | |
done, gamvas. | |
DOWN, gamvas.key | |
draw | |
drawDebug, gamvas. | |
DYNAMIC, gamvas. | |
E | |
E, gamvas.key | |
emitted, gamvas. | |
END, gamvas.key | |
enter | |
EQUAL, gamvas.key | |
ESCAPE, gamvas.key | |
exitEvent | |
extend, gamvas. |
A: 65
The actor the state is assigned to, or null if not assigned
this.actor
Add a gamvas.AStarNode to the node system
add: function( n )
Returns a new vector adding vector v to the current vector
gamvas.Vector2D.prototype.add = function( v )
Add a gamvas.Actor to the state.
addActor: function( act )
Adds a animation
addAnimation: function( anim )
Add a function to be called when the HTML document is loaded
addOnLoad: function( fnc )
Add a function to be called when gamvas is ready and right before rendering the first frame.
addOnReady: function( fnc )
Add a Box2D prismatic joint between this actor and another
addPrismaticJoint: function( t, tp, tv, params )
Add a Box2D revolute joint between this actor and another
addRevoluteJoint: function( t, tp, params )
Add a gamvas.Sound to the state.
addSound: function( snd )
Adds a actor state
addState: function( state, activate )
Add a state to the state system
addState: function( state )
If true, align particle orientation along their movement
alignParticleToPath: function( yesno )
ALT: 18
If set to true, the screen will automatically cleared before drawing functions are called.
this.autoClear
B: 66
BACKSLASH: 220
BACKSPACE: 8
The place there the gamvas scripts live Will be filled on startup
baseURL: ''
The Box2D b2Body, if physics is enabled
this.body
make the actor a physics object with a circle as body shape
bodyCircle: function( x, y, radius, type )
make the actor a physics object with a non rectangular polygon shape If you just need a rectangle, there is a shortcut: gamvas.actor.bodyRect
bodyPolygon: function( x, y, polys, cx, cy, type )
make the actor a physics object with a rectangular body shape
bodyRect: function( x, y, width, height, type )
BRACKET_CLOSE: 221
BRACKET_OPEN: 219
BREAK: 19
a HTML5 2D context of the canvas the game is running on.
this.c
C: 67
a gamvas.Camera instance, to modify camera.
this.camera
The DOM element of the canvas the game is running on.
this.canvas
CAPSLOCK: 20
A gamvas.Vector2D object with the center offset of the actor
this.center
The center of rotation of the animation
this.center
The color to clear the screen, if gamvas.State.autoClear is enabled.
this.clearColor
Clears the screen.
clearScreen: function()
COMMA: 188
Connect two nodes
connect: function( n, auto )
Returns a copy of the vector
gamvas.Vector2D.prototype.copy = function()
Create a Box2D b2Body object for the actor.
createBody: function( type, shape )
CTRL: 17
The name of the current animation
this.currentAnimation
The index of the current frame
this.currentFrame
D: 68
DASH: 189
The actual object
this.data
The alpha of physics debug information
debugAlpha: 0.3
The stroke width if you draw physics debug information
debugStrokeWidth: 2
DELETE: 46
The physical property of density.
this.density
Returns a new vector holding the difference between vector v and the current vector
gamvas.Vector2D.prototype.difference = function( v )
a object holding the canvas dimension in {w, h}
this.dimension
By default a state provides a full environment for game development.
this.disableCamera
Returns the distance between the current vector and vector v
gamvas.Vector2D.prototype.distance = function( v )
This function is called to check of two objects should collide.
doCollide: function( a, c, om )
Are all resources loaded?
gamvas.Resource.prototype.done = function()
DOWN: 40
Gets called when the actor is drawn.
draw: function( t )
Gets called when the state should draw.
draw: function( t )
Draw the animation according to its position, rotation and scale settings
draw: function( t )
draws the image, using its position, rotation and scale information
this.draw = function()
Draw the particle emitter
draw: function( t )
Overwrite this function to draw your game objects.
draw: function( t )
Draw the physics debug information.
drawDebug: function()
E: 69
The amount of emitted particles
this.emitted
END: 35
Gets called when the state is entered.
enter: function()
The enter function is called when the state is entered.
enter: function()
EQUAL: 187
ESCAPE: 27
return from a unhandled keypress on onKey* functions
exitEvent: function()
return from a unhandled mouseevent on onMouse* functions
exitEvent: function()