vegui. sk. ani.js

Dependencies

vegui.sk.std.js

Description

The vegUI site kit effect foundation library.  All effects build on this library as it provides functions to handle the global effect timer and to ad * d and remove effects from nodes handled with the VSK_Node object

Summary
Array that holds nodes that currently have vsk effects affecting them
Interval speed of the global effect timer (ms)
Poll nodes in the vsk_Effects array and process their attached effects
Process all effects currently active on the node
Clears effects by id
Start the global effect timer
Stop the global effect timer
Initialize effect on node
Drop effect from node by it’s id
Check if an effect is currently active on the node by it’s id
class used to create effect sequences that can be looped
executes the function stored in the <body> property of the sequence
Halts the sequenced after it has been started by calling the loop method The body property of the sequence is set to null and the original body function is returned.

Variables

vsk_Effects

var vsk_Effects

Array that holds nodes that currently have vsk effects affecting them

Constants

VSK_FX_INTERVAL

Interval speed of the global effect timer (ms)

Functions

vsk_fx_poll

function vsk_fx_poll()

Poll nodes in the vsk_Effects array and process their attached effects

VSK_Node

Summary
Process all effects currently active on the node
Clears effects by id
Start the global effect timer
Stop the global effect timer
Initialize effect on node
Drop effect from node by it’s id
Check if an effect is currently active on the node by it’s id

Functions

fx_process()

VSK_Node.prototype.fx_process = function()

Process all effects currently active on the node

Returns

VSK_Nodeself

fx_clear

VSK_Node.prototype.fx_clear = function(clearEffects)

Clears effects by id

Parameters

array clearEffectsarray holding effect ids to be cleared

fx_start

VSK_Node.prototype.fx_start = function()

Start the global effect timer

Returns

VSK_Nodeself

fx_stop

VSK_Node.prototype.fx_stop = function()

Stop the global effect timer

Returns

VSK_Nodeself

fx_init

VSK_Node.prototype.fx_init = function(id,
effect,
collision)

Initialize effect on node

Parameters

var idunique effect id
object effecteffect object
<array collision>every existing value will be treated as an effect id, any effect ids active on the object that are found in the collision array will be canceled

Returns

VSK_Nodeself

fx_halt

VSK_Node.prototype.fx_halt = function(id,
silent)

Drop effect from node by it’s id

Parameters

var idunique effect id
<bool silent>if true neither the onhalt nor the sequence events are triggered

Returns

VSK_Nodeself

fx_active

VSK_Node.prototype.fx_active = function(id)

Check if an effect is currently active on the node by it’s id

Parameters

var ideffect id to check

Returns

booltrue, if the effect is active on the node
boolfalse, if the effect is not active on the node

VSK_FX_Sequence

class used to create effect sequences that can be looped

Properties

nVSK_Node, the node this sequence is linked to
bodyfunction, holds the function the sequence in form of a function
Summary
executes the function stored in the <body> property of the sequence
Halts the sequenced after it has been started by calling the loop method The body property of the sequence is set to null and the original body function is returned.

Functions

VSK_FX_Sequence

function VSK_FX_Sequence(n)

Parameters

VSK_Node nthe node this sequence is linked to

loop

VSK_FX_Sequence.prototype.loop = function(n)

executes the function stored in the <body> property of the sequence

Parameters

<int n>loop n times

halt

VSK_FX_Sequence.prototype.halt = function(clearEffects)

Halts the sequenced after it has been started by calling the loop method The body property of the sequence is set to null and the original body function is returned.

Returns

functionthe function that was pointed to by the body property
var vsk_Effects
Array that holds nodes that currently have vsk effects affecting them
function vsk_fx_poll()
Poll nodes in the vsk_Effects array and process their attached effects
VSK_Node.prototype.fx_process = function()
Process all effects currently active on the node
VSK_Node.prototype.fx_clear = function(clearEffects)
Clears effects by id
VSK_Node.prototype.fx_start = function()
Start the global effect timer
VSK_Node.prototype.fx_stop = function()
Stop the global effect timer
VSK_Node.prototype.fx_init = function(id,
effect,
collision)
Initialize effect on node
VSK_Node.prototype.fx_halt = function(id,
silent)
Drop effect from node by it’s id
VSK_Node.prototype.fx_active = function(id)
Check if an effect is currently active on the node by it’s id
function VSK_FX_Sequence(n)
VSK_FX_Sequence.prototype.loop = function(n)
executes the function stored in the body property of the sequence
VSK_FX_Sequence.prototype.halt = function(clearEffects)
Halts the sequenced after it has been started by calling the loop method The body property of the sequence is set to null and the original body function is returned.