Function 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
I
 init
 isActive, gamvas.Actor
 isFullScreen, gamvas
 isPressed
 isReady, gamvas.Sound
 isSet, gamvas
L
 leave
 length, gamvas.Vector2D
 loading, gamvas.State
 loop, gamvas.Sound
M
 move
 mute, gamvas.Sound
N
 normalized, gamvas.Vector2D
O
 onCollision, gamvas.ActorState
 onCollisionEnter, gamvas.ActorState
 onCollisionLeave, gamvas.ActorState
 onKeyDown
 onKeyUp
 onMouseDown
 onMouseMove
 onMouseUp
 onParticleEnd, gamvas.ParticleEmitter
 onTouchDown, gamvas.State
 onTouchMove, gamvas.State
 onTouchUp, gamvas.State
P
 play, gamvas.Sound
 postDraw
 preDraw
Q
 quickDistance, gamvas.Vector2D
 quickLength, gamvas.Vector2D
R
 registerInputEvents, gamvas.State
 removeActor, gamvas.State
 reset, gamvas.ParticleEmitter
 resetForces, gamvas.Actor
 resetWorld, gamvas.physics
 resume, gamvas.Sound
 rotate
init: function()
Description
init: function()
Gets called once on state initialization.
init: function()
The init function is called only once per state to initialize it.
isActive: function()
Check if the actor is active
isFullScreen: function()
Test if we are currently running in real fullscreen mode
isPressed: function(k)
Check if a key is pressed
isPressed: function(k)
Check if a mouse button is pressed
gamvas.Sound.prototype.isReady = function()
Test if the sound is ready to play
isSet: function(v)
Tests if a variable is set
leave: function()
Gets called when the state is left.
leave: function()
The enter function is called when the state is left.
gamvas.Vector2D.prototype.length = function()
Return the length of the vector in pixels.
loading: function(t)
Overwrite for a custom loading screen
gamvas.Sound.prototype.loop = function()
Play the sound looping (e.g.
move: function(x,
y)
Move the actor
move: function(x,
y)
Move the animation
gamvas.Camera.prototype.move = function(x,
y)
Move the camera, relative to its current position.
this.move = function(x,
y)
Move the image
Move the particle emitter
gamvas.Sound.prototype.mute = function()
Mute the sound
gamvas.Vector2D.prototype.normalized = function()
Returns the normalized vector of a vector.
onCollision: function(a,
ni,
ti,
c)
The actor starts a collision with another actor
onCollisionEnter: function(a,
c)
The actor starts a collision with another actor
onCollisionLeave: function(a,
c)
The actor leaves a collision with another actor
onKeyDown: function(keyCode,
character,
ev)
A key on the keyboard was pressed
onKeyDown: function(keyCode,
character,
ev)
A key on the keyboard was pressed
onKeyUp: function(keyCode,
character,
ev)
A key on the keyboard was released
onKeyUp: function(keyCode,
character,
ev)
A key on the keyboard was released
onMouseDown: function(button,
x,
y,
ev)
A mouse button was pressed
onMouseDown: function(button,
x,
y,
ev)
A mouse button was pressed
onMouseMove: function(x,
y,
ev)
The mouse was moved
onMouseMove: function(x,
y,
ev)
The mouse was moved
onMouseUp: function(button,
x,
y,
ev)
A mouse button was released
onMouseUp: function(button,
x,
y,
ev)
A mouse button was released
onParticleEnd: function(pos,
rot,
scale,
vel)
Overwrite this function to do something everytime a particle is removed
onTouchDown: function(id,
x,
y,
ev)
A finger starts touching the display
onTouchMove: function(id,
x,
y,
ev)
A finger is sliding over the surface
onTouchUp: function(id,
x,
y,
ev)
A finger stopped touching the display
gamvas.Sound.prototype.play = function()
Play the sound once, restarts the sound automatically
postDraw: function(t)
Gets called after camera handling.
postDraw: function(t)
Gets called after camera handling.
postDraw: function(t)
This function is called after camera is applied.
preDraw: function(t)
Gets called after screen clear and before camera handling.
preDraw: function(t)
Gets called after screen clear and before camera handling.
preDraw: function(t)
This function is called before camera is applied.
gamvas.Vector2D.prototype.quickDistance = function(v)
Returns a comparable distance between the current vector and vector v
gamvas.Vector2D.prototype.quickLength = function()
Returns the non sqrt() length of the vector, which is faster to calculate as it’s real length.
registerInputEvents: function(act)
Send keyboard/mouse events to gamvas.Actor onKeyDown and similar functions
removeActor: function(act)
Add a gamvas.Actor to the state.
reset: function(kill)
Reset the particle emitter
resetForces: function(x,
y,
r)
Resets all physical forces on the actor
resetWorld: function(gravx,
gravy,
slp,
listener)
Resets the physics world
gamvas.Sound.prototype.resume = function()
Resumes a stopped sound, without rewinding it
rotate: function(r)
Rotate the actor
rotate: function(r)
Rotate the animation
gamvas.Camera.prototype.rotate = function(r)
Rotate the camera for r radians
this.rotate = function(r)
Rotate the image
Rotate the particle emitter
gamvas.Vector2D.prototype.rotate = function(r)
Returns a new vector with the current vector rotated a certain angle.
Close