Adobe ATMOSPHERE User Manual page 256

Table of Contents

Advertisement

244
APPENDIX E
else if (context == RemoteAvatarContext)
{
chat.print("This is a REMOTE avatar script.");
}
else
{
chat.print("This is not an avatar script.");
}
localAvatarContext
the value of the 'context' global in an Avatar script which is running on the client that owns the Avatar.
remoteAvatarContext
the value of the 'context' global in an Avatar script which is running on another user's client.
worldContext
the value of the 'context' global in a world script.
version
Returns the version number of the application.
// Some features didn't exist before then...
if (version < 1.2) { ... }
Global Methods
addAnimator(object)
Adds the given object to the list of animators. Once every frame, each animator's timestep(t, deltaT) callback is
called, where t is the current time in seconds since the world was entered, and deltaT is the time in seconds since
the last timestep. Additionally, each animator's onLoad() callback is called when the last and fi nal javascript fi le
associated with the world has been successfully loaded and executed.
foo = new Object;
foo.timestep = function(t, deltaT)
{
chat.print("This timestep is at " + t + " seconds.");
chat.print("Last timestep was at " + (t - deltaT) + " seconds.");
}
addAnimator(foo);
removeAnimator(object)
Removes the given object from the list of animators. If the object is in the animators list more than once, only
one instance of it is removed.
removeAnimator(foo);
dump(object)
Displays the properties of the object in the chat output window.
dump(fog);

Advertisement

Table of Contents
loading

Table of Contents