Math; Rotation - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

fi lterOutput(textOutput)
This method is used by your Remote Avatar, which is running on someone else's computer. When you type a
message into your chat line and press Enter, the message is sent to the server, and the server in turn sends the
message to all the visitors in the world (including you, the original sender). Before your message is placed into
the chat window on someone else's computer, it is passed through this 'chat.fi lterOutput' method, which is
running for your Avatar on their computer. The returned string is what will actually be printed to their chat
window, or no message will be printed at all if the return value is an empty string or false.
chat.fi lterOutput = function(msg)
{
// If the message string contains "MyCoolWave", trigger my
// remote avatar to wave, and strip the "MyCoolWave" text
// out of the message before sending it to the chat
if (msg.match(/MyCoolWave/))
{
doWave(); // Run my wave
msg = msg.replace(/MyCoolWave/, "");
// Strip out "MyCoolWave"
}
return msg;
}
onConnect( )
A callback which is processed when server connection is established. Call createSharedObject() in this function
to establish the objects that will be synchronized. Note that timing limitations exit for script processing, and
attempting to induce extensive server callbacks may fail.
chat.onConnect = function()
{
chat.createSharedObject("myGlobe");
}
onSharedPropertyChange(str objectName, str propertyName, str Value)
This is the main callback which occurs when any visitor updates a property value for any shared object.
chat.onSharedPropertyChange = function(objName, objProp, objValue) { ... }

Math

Rotation

A Rotation object encodes an arbitrary relative geometric rotation. Most objects use a Rotation to specify their
orientation (a rotation relative to the parent or world coordinate frame). A number of methods are provided to make
combining and manipulating Rotations simpler, without regard to their underlying implementation. (Rotations are
257
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents