Class: Global

Class contents

Methods list

These are special functions (or methods) that you may call on the object. these functions typically instruct the object to perform a certain operation.

Events list

Events are functions you add to your objects, that will be called by Cubiverse when certain things (events) occur.
    No events

Class Information

Constructor

new Global()

You cannot instigate a Globao object directly from normal Java-script code, it is created automatically by Cubiverse and varilable as the global GLOBAL variable.
Important:
  • You cannot instigate a Globao object directly from normal Java-script code, it is created automatically by Cubiverse and varilable as the global GLOBAL variable.

Methods

clearTimeout(function, milliseconds)

The clearTimeout() removes a timer routine, you must supply the same routine as you passed to setTimeout()
Parameters:
Name Type Description
function function A function that will be executed
milliseconds integer The number of milliseconds to pass before executing the code
Example
clearTimeout( myTimerRoutine );

log(function, milliseconds)

The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds.

This method allows you to have a function called afer a specified number of milliseconds, the function will be called only once after the timeout.

Parameters:
Name Type Description
function function A function that will be executed
milliseconds integer The number of milliseconds to pass before executing the code
Example
log( "Log message..." );

setInterval(function, milliseconds)

The setInterval() method calls a function or evaluates an expression every X number of milliseconds.

This method allows you to have a function called every time a set amount of milliseconds has passed, the function will be called continously until you call clearInterval.

Parameters:
Name Type Description
function function A function that will be executed
milliseconds integer The number of milliseconds to pass before executing the code
Example
setInterval( function(){ log("hello world" }, 1000);

setTimeout(function, milliseconds)

The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds.

This method allows you to have a function called afer a specified number of milliseconds, the function will be called only once after the timeout.

Parameters:
Name Type Description
function function A function that will be executed
milliseconds integer The number of milliseconds to pass before executing the code
Example
setTimeout( function(){ log("hello world" }, 1000);