User Guide
65
ADOBE ATMOSPHERE
User Guide
Working with subworlds
A subworld is a world that is loaded into the parent world. For example, an avatar is
considered a subworld. A subworld has the same functionality of a parent world, with the
exception of users being able to navigate inside of it. In addition, subworlds can be moved
around (or move themselves around) dynamically, whereas the parent world is static.
Subworlds have their own scripting engine, which is in a separate name space from the
scripting engine of the parent world.
The SubWorld module provides methods and properties for working with subworlds. For
example, the following code adds a subworld that is set to be invisible but made active for
collisions:
ghost = SubWorld("ghost.3da").add();
ghost.visible = false;
ghost.collide = 2; // Other objects collide with the ghost
For more information on the SubWorld module, see the Atmosphere JavaScript API
documentation.
Working with Viewpoint content
Viewpoint content is a 3D scene saved in MTX format. An MTX file contains parameters
describing the scene’s 3D objects and the 3D scene itself. You can use MTX format to
import objects (including animations) that you created in a third-party application into
Atmosphere.
The ViewpointScene module provides methods and properties for interacting with
Viewpoint content in a world. You can use this module to play a named animation (called
a time element), to enumerate animations and instances (geometric components with
associated transforms), and to get and set Viewpoint properties. For example, the
following code attaches a script to the MetaObj in Atmosphere Builder, scales down the
model by a factor of two, and starts the time element that controls walking:
// Scale down the model (i.e. geometric instance) called "BodyModel" by a factor of 2
this.scene.getInstance("BodyModel" ).scale = [0.5, 0.5, 0.5];
// Activate the animation called "Walking"
timeElem = this.scene.getTimeElem("Walking");
timeElem.start();
For more information on the ViewpointScene module, see the Atmosphere JavaScript API
documentation. For more information about MTX format and the Viewpoint API, see the
Viewpoint Web site at www.viewpoint.com.
atmosphere.book Page 65 Wednesday, March 21, 2001 6:14 PM










