User Guide

ancestor 631
For example, if the color of the ambient light is rgb(255, 255, 255) and the value of the
ambient property of the shader is rgb(255, 0, 0), the shader will reflect all of the red
component of the light that the shaders colors can reflect. However, it will reflect none of the
blue and green components of the light, regardless of the colors of the shader. In this case, if there
are no other lights in the scene, the blue and green colors of the shader will reflect no light, and
will appear black.
The default value of this property is
rgb(63,63,63).
Example
This statement sets the ambient property of the model named Chair to rgb(255, 255, 0).
Chair will fully reflect the red and green components of the ambient light in the scene and
completely ignore its blue component.
member("Room").model("Chair").shader.ambient = rgb(255, 0, 0)
See also
ambientColor, newLight, type (light), diffuse, specular (shader)
ambientColor
Usage
member(whichCastmember).ambientColor
Description
3D cast member property; indicates the RGB color of the default ambient light of the
cast member.
The default value for this property is rgb(0, 0, 0). This adds no light to the scene.
Example
This statement sets the ambientColor property of the cast member named Room to rgb(255, 0,
0). The default ambient light of the cast member will be red. This property can also be set in the
Property inspector.
member("Room").ambientColor = rgb(255, 0, 0)
See also
directionalColor, directionalPreset, ambient
ancestor
Usage
property {optionalProperties} ancestor
Description
Object property; allows child objects and behaviors to use handlers that are not contained within
the parent script or behavior.
The
ancestor property is typically used with two or more parent scripts. You can use this
property when you want child objects and behaviors to share certain behaviors that are inherited
from an ancestor, while differing in other behaviors that are inherited from the parents.