Adobe ATMOSPHERE User Manual page 328

Table of Contents

Advertisement

316
APPENDIX E
and position. Primitives may be accessed via the root primitive, which is the top of the tree of primitives for the solid
object. Objects within this tree may be accessed using the fi nd method of Primitive.
By default, a solid object will be rendered using the light map computed in the Builder to modulate the surface
texture, if present. By setting the fl ag "useDynamicLighting" to true, the rendering will scale the surface light map by
the value of lightMapBrightness, and will add the contribution of any dynamic lights in the scene. For the current
release, only a single DistantLight is supported, and that is owned by the stage SceneGroup. The ambient color is
added to the diffuse color times the light contribution. These are then both added to the scaled light map color. In
this way it is possible to have realistic diffuse lighting effects on objects that are being animated using a script or
using a physical model. For objects that will be rotated in a world, it is best to light it in the Builder using only the
background light and not the sun. The effect of the sun can then be approximated using a distant light in the script.
Note that SolidObjects are not solid, and the description is not based on whether they have a physical model. A solid
object is defi ned by a geometry which has an enclosed volumes (allowing boolean operations such as subtractions).
Surface objects, in contrast may have open surfaces, and do not support boolean operations.
Properties
type
The object's type. Returns "SolidObject".
if (foo.type == 'SolidObject') { ... }
name
Returns the name of the SolidObject assigned in the Application.
if (foo.name == 'myCoolSolidObject') { ... }
loaded
Returns true once the object has fi nished loading.
if (myObject.loaded) { ... }
parent
A reference to the SceneGroup containing the SolidObject
objectParent = solidObject.parent;
root
Is the primitive representing the root of the geometry of the SolidObject.
car = SceneGroup("car.aer");
car.onLoad = function()
{
this.wheel = this.getSolidObject(0).root.fi nd(".../wheel");
}
addAnimator(car);
rootPrimitive
The top-level group of a Solid Object.

Advertisement

Table of Contents
loading

Table of Contents