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