JavaScript Objects for Acrobat 3D¶
Note
A property labeled as R (read-only) is one whose value cannot be set. An object labeled as R (read-only) is one whose reference cannot be modified, though the object itself can be set and its properties may be modified. Unless otherwise indicated, all properties and objects labeled with R/W have read/write access.
Animation¶
A type of SceneObject, used to store keyframe animation sequences of Node
objects in the Scene. In addition to the methods and properties below, it also contains the same methods and properties as a SceneObject
.
Properties
Property |
Type |
Access |
Description |
currentTime |
number |
R/W |
The current time measured in seconds. |
endTime |
number |
R |
The end time of the sequence, measured in seconds. |
framesPerSecond |
number |
R |
The number of frames per second used to author the sequence. |
length |
number |
R |
The length of the |
startTime |
number |
R |
The start time of the sequence, measured in seconds. |
Background¶
Represents the background of a Canvas
. It can be used as a target of a MouseEventHandler
. (See Canvas and MouseEventHandler.)
Properties
Property |
Type |
Access |
Description |
image |
Image |
R/W |
Acrobat 7.0.7 The |
FlashMovie |
FlashMovie |
R/W |
Acrobat 9.0 The |
getColor¶
Obtains the background Color
.
Syntax
getColor()
Returns
A Color
object representing the background color of the Canvas
.
getImage¶
Deprecated
Obtains the background Image
.
Syntax
getImage()
Returns
An Image
object representing the background image of the Canvas
.
setColor¶
Sets the background Color
. If only one color is passed to this method, the background is a constant color. If two colors are passed to this method, the background is a linear gradient from top to bottom, with the first color argument representing the top color and the second representing the bottom color.
Syntax
setColor(topColor, bottomColor)
Parameters
topColor |
A |
bottomColor |
(Optional) A |
Returns
undefined
setImage¶
Deprecated
Sets the background Image.
Syntax
setImage(image)
Parameters
image |
An |
Returns
undefined
Bone¶
A type of Node
used to modify the shape of a Mesh
, and is usually moved over time to create animated characters. It contains the same methods and properties as a Node
.
BoundingBox¶
Represents an axis-aligned bounding box.
Properties
Property |
Type |
Access |
Description |
center |
Vector3 |
R |
Acrobat 7.0.7 The coordinates of the |
max |
Vector3 |
R |
The coordinates of the |
min |
Vector3 |
R |
The coordinates of the |
Camera¶
A Node
that controls the projection from world space to screen space. In addition to the methods and properties below, it also contains the same methods and properties as a Node.
Properties
Property |
Type |
Access |
Description |
absoluteBindingScale |
number |
R/W |
Acrobat 7.0 The absolute binding scale value for the camera. |
binding |
string |
R/W |
The view plane calculation type, which can take one of the following values:
|
BINDING_HORIZONTAL |
string |
R |
Acrobat 7.0.7 A string constant for the binding value of |
BINDING_MAX |
string |
R |
Acrobat 7.0.7 A string constant for the binding value of |
BINDING_MIN |
string |
R |
Acrobat 7.0.7 A string constant for the binding value of |
BINDING_VERTICAL |
string |
R |
Acrobat 7.0.7 A string constant for the binding value of |
far |
number |
R/W |
The distance from the |
fov |
number |
R/W |
The size of the field of view for perspective |
near |
number |
R/W |
The distance from the |
position |
Vector3 |
R |
The position of the origin of the |
positionLocal |
Vector3 |
R |
The position of the origin of the |
projectionType |
string |
R/W |
The type of projection, which can take one of the following values:
|
roll |
number |
R/W |
The roll angle of the |
target |
Node |
R |
The current |
targetPosition |
Vector3 |
R |
The position of the |
targetPositionLocal |
Vector3 |
R/W |
The position of the |
TYPE_ORTHOGRAPHIC |
string |
R |
Acrobat 7.0.7 A string constant for the camera projection type of |
TYPE_PERSPECTIVE |
string |
R |
Acrobat 7.0.7 A string constant for the camera projection type of |
up |
Vector3 |
R |
The up direction in world space. |
upLocal |
Vector3 |
R |
The up direction in local space. |
useAbsoluteBinding |
Boolean |
R |
Acrobat 7.0 Determines whether the camera uses absolute binding for its projection. |
viewPlaneSize |
number |
R/W |
The size of the view plane for orthographic |
getScreenFromPosition¶
Obtains the screen coordinates of the provided 3D position.
Syntax
getScreenFromPosition(position, canvasWidth, canvasHeight)
Parameters
position |
A |
canvasWidth |
The width of the |
canvasHeight |
The height of the |
Returns
A Vector3
object representing the screen coordinates, with x
and y
as pixel positions and z
equal to zero.
See Vector3 for more information on the return object.
getDirectionFromScreen¶
Obtains the direction from the normalized coordinates
Syntax
getDirectionFromScreen(x, y, canvasWidth, canvasHeight)
Parameters
x |
The x-coordinate, measured in pixels. |
y |
The y-coordinate, measured in pixels. |
canvasWidth |
The width of the |
canvasHeight |
The height of the |
Returns
A Vector3
object representing the direction.
See Vector3 for more information on the return object.
CameraEvent¶
Describes the format of the object that is passed as an argument to the onEvent
method of the CameraEventHandler
object.
Properties
Property |
Type |
Access |
Description |
binding |
string |
R |
The view plane calculation type, which can take one of the following values:
|
canvas |
Canvas |
R |
The |
currentTool |
string |
R |
The name of the current tool. |
far |
number |
R |
The distance from the |
fov |
number |
R |
The size of the field of view for perspective |
isNewCanvas |
Boolean |
R |
Deprecated Determines whether this is the first event for this |
near |
number |
R |
The distance from the |
projectionType |
string |
R |
The type of projection, which can take one of the following values:
|
targetDistance |
number |
R |
The distance from the |
transform |
Matrix4x4 |
R |
The Camera object’s transformation matrix. |
view |
View object |
R |
The name of the view being activated. |
viewPlaneSize |
number |
R |
The size of the view plane, measured in scene units. |
CameraEventHandler¶
Exposes a callback mechanism that allows a function to be evaluated when an camera event occurs. Event handlers are registered with the Runtime addEventHandler method.
CameraEventHandler¶
A constructor that creates a new CameraEventHandler
object.
Syntax
new CameraEventHandler()
Returns
A CameraEventHandler
object.
onEvent¶
A method that is called when a view is selected from the list of views on the 3D toolbar or in the context menu for an active 3D annotation.
syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
Canvas¶
Represents a rectangular region into which the Scene
is rendered from the viewpoint of the attached Camera
.
See related objects, Scene and Camera.
Properties
Property |
Type |
Access |
Description |
background |
Background |
R |
The |
getCamera¶
Obtains the Camera
object attached to the Canvas
.
Syntax
getCamera()
Returns
A Camera
object.
setCamera¶
Sets the Camera
object attached to the Canvas
.
Syntax
setCamera(camera)
Parameters
camera |
The |
Returns
undefined
ClippingPlane¶
An object representing a plane, within the Scene
, that clips all geometry on one side of it. It is created by invoking the createClippingPlane method of the Scene
object.
Color¶
An object that represents a RGB encoded color.
Properties
Property |
Type |
Description |
b |
number |
The blue component, which can be a value from |
g |
number |
The green component, which can be a value from |
r |
number |
The red component, which can be a value from |
Color¶
A constructor that creates a Color
object, initialized to black.
Syntax
new Color()
Returns
A Color
object, initialized to black.
Color¶
A constructor that creates a Color
object, initialized to the supplied RGB values.
Syntax
new Color(r, g, b)
Parameters
r |
The red component, which can be a value from |
g |
The green component, which can be a value from |
b |
The blue component, which can be a value from |
Returns
A Color
object, initialized to the supplied RGB values.
set¶
Sets the Color
object’s value using an existing Color
object
Syntax
set(color)
Parameters
color |
The |
Returns
undefined
set¶
Acrobat 7.0.7
Sets the Color
object’s value using the given RGB components.
Syntax
set(r, g, b)
Parameters
r |
The red component, which can be a value from |
g |
The green component, which can be a value from |
b |
The blue component, which can be a value from |
Returns
undefined
set3¶
Deprecated
Sets the Color
object’s value using the given RGB components.
Syntax
set3(r, g, b)
Parameters
r |
The red component, which can be a value from |
g |
The green component, which can be a value from |
b |
The blue component, which can be a value from |
Returns
undefined
Console¶
This object can direct output to the JavaScript console in Acrobat for debugging purposes. The variable console
is a global reference to this object.
print¶
Prints a string to the JavaScript Console.
Syntax
print(string)
Parameters
string |
The text to be printed to the JavaScript Console. |
Returns
undefined
println¶
Prints a string with an accompanying newline to the JavaScript Console.
Syntax
println(string)
Parameters
string |
The text to be printed to the JavaScript Console. |
Returns
undefined
FlashEvent¶
Acrobat 9.0
An object that is passed as an argument to the onEvent method of the FlashEventHandler object.
Properties
Property |
Type |
Access |
Description |
command |
string |
R |
For a To execute the command, run the JavaScript function |
target |
|
R |
The target |
type |
string |
R |
The type of |
TYPE_COMMAND |
string |
R |
A string constant for the |
TYPE_PROGRESS |
string |
R |
A string constant for the |
TYPE_STATECHANGE |
string |
R |
A string constant for the |
value |
integer |
R |
The value for the corresponding type of
|
FlashEventHandler¶
Acrobat 9.0
An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs in a FlashMovie
object. Event handlers are registered with the Runtime. addEventHandler method.
Properties
Property |
Type |
Access |
Description |
target |
|
R/W |
When set, the |
onEvent¶
A method that is called when an ExternalInterface.call
method or MMExecute
command is invoked from the FlashMovie
‘s ActionScript.
Syntax
onEvent(event)
Parameters
event |
A FlashEvent object representing the event. |
Returns
undefined
FlashEventHandler¶
The constructor that creates a new FlashEventHandler
.
Syntax
new FlashEventHandler()
Returns
A FlashEventHandler
object.
FlashMovie¶
Acrobat 9.0
An object that represents a Flash movie in the Scene
.
Properties
Property |
Type |
Access |
Description |
alignMode |
integer |
R/W |
A bit flag that sets the alignment of the movie within the Scene. Values are +1 (left aligned), +2 (right aligned), +4 (top aligned), and +8 (bottom aligned). |
ALIGN_MODE_BOTTOM |
string |
R |
A string constant for the |
ALIGN_MODE_LEFT |
string |
R |
A string constant for the |
ALIGN_MODE_RIGHT |
string |
R |
A string constant for the |
ALIGN_MODE_TOP |
string |
R |
A string constant for the |
backgroundColor |
integer |
R/W |
Override the background color of a movie. An integer of the form (red * 65536 + green * 256 + blue). Use a value of -1 for the default movie color. The values for red, green and blue are integers between 0 and 255, inclusive, and represent the color components of red, green, and blue, respectively, in the RGB color model. |
desiredResolutionX |
integer |
R/W |
The desired resolution width for the |
desiredResolutionY |
integer |
R/W |
The desired resolution height for the |
frameNum |
integer |
R/W |
The frame number of the currently displayed frame of the movie. Setting this property advances or rewinds the movie. |
hitEnabled |
Boolean |
R/W |
Determines whether mouse events travel through the |
id |
integer |
R |
A unique ID for each |
loop |
Boolean |
R/W |
A flag that determines whether the animation loops. If |
opacity |
number |
R/W |
The opacity of the |
percentLoaded |
integer |
R |
The percent of the Adobe Flash Player movie that has streamed into the browser so far with possible values from from 0 to 100. |
playing |
Boolean |
R |
A flag that detects whether the movie is currently playing. If |
quality |
integer |
R/W |
The current rendering quality. Permitted values are |
readyState |
integer |
R |
The state of the |
resolutionType |
string |
R/W |
A string value that specifies the type of resolution to be used for the movie. Recognized values are |
RESOLUTION_TYPE_CUSTOM |
string |
R |
A string constant for the |
RESOLUTION_TYPE_MOVIE |
string |
R |
A string constant for the |
RESOLUTION_TYPE_WINDOW |
string |
R |
A string constant for the |
scaleMode |
string |
R/W |
The scale mode of the movie. The value of this property may be |
SCALE_MODE_EXACT_FIT |
string |
R |
A string constant for the |
SCALE_MODE_NO_BORDER |
string |
R |
A string constant for the |
SCALE_MODE_SHOW_ALL |
string |
R |
A string constant for the |
totalFrames |
integer |
R |
The total number of frames in the movie. This is not available until the movie has loaded. Wait for |
x |
integer |
R/W |
The x-position of the |
y |
integer |
R/W |
The y-position of the |
FlashMovie¶
Creates a new FlashMovie
from a Resource
of type "flash"
.
Syntax
FlashMovie(FlashMovieResource)
Parameters
FlashMovieResource |
A |
Returns
A FlashMovie
object.
call¶
Calls into ActionScript with the ExternalInterface
calling convention to an exposed method (ExternalInterface.addCallback
in ActionScript). The call
method returns the return value of the method specified as the first parameter.
Note
See the Acrobat JavaScript API Reference which has the callAS
method of the AnnotRichMedia object that uses the same mechanism as the call
method.
Syntax
call(functionName, [argument1[, ...,argumentn]])
Parameters
functionName |
A string representing the function name to call in the |
argument1,argument2,…,argumentn |
A comma-delimited list of arguments of varying type to be passed to the function in ActionScript. |
Returns
The return value from the called function, which can be of any type.
getVariable¶
A method that returns the value of the Flash variable specified by varName
, and returns undefined
if the variable does not exist.
Syntax
getVariable(varName)
Parameters
varName |
A string representing the variable requested. |
Returns
A string representing the value of the specified Flash variable, or undefined
.
gotoFrame¶
Activates the frame number specified by frameNumber
in the current movie. If the data for a requested frame is not yet available, the player goes to the last frame available and stops, causing unexpected results during playback. Use the percentLoaded
property to determine if enough of the movie is available to execute the gotoFrame()
method. The argument frameNumber
is zero-based; that is, frameNumber
is 0 in the first frame of the movie, 1 for the second frame, and so on. This differs from the Goto
action within Flash, which begins at 1.
Syntax
gotoFrame(frameNumber)
Parameters
frameNumber |
An integer representing the frame number. |
Returns
undefined
isPlaying¶
A method that returns true
if the movie is currently playing.
Syntax
isPlaying()
Returns
A Boolean type, true
if the movie is playing, false
otherwise.
pan¶
This method pans a zoomed-in movie to the coordinates specified by x
and y
. Use mode
to specify whether the values for x
and y
are pixels or a percentage of the window. The pan
method does not pan beyond the boundaries of the zoomed-in movie.
Syntax
pan(x, y, mode)
Parameters
x |
An integer representing the x coordinate. |
y |
An integer representing the y coordinate. |
mode |
When |
Returns
undefined
setVariable¶
Sets the value of the Flash variable specified by variableName
to the value specified by value
.
Syntax
setVariable(varName, value)
Parameters
varName |
A string representing the variable requested. |
value |
A string value to be set for the provided variable name. |
Returns
undefined
setZoomRect¶
Zooms in on a rectangular area of the movie. The units of the coordinates are measured in twips (1440 units per inch).
Note
To calculate the dimensions of a rectangle in the correct units, set the ruler units to Points and multiply the coordinates by 20 to get twips. (There are 72 points per inch.)
Syntax
setZoomRect(left, top, right, bottom)
Parameters
left |
An integer representing the left side of the rectangle. |
top |
An integer representing the top side of the rectangle. |
right |
An integer representing the right side of the rectangle. |
bottom |
An integer representing the bottom side of the rectangle. |
Returns
undefined
zoom¶
This method zooms the view by a relative scale factor specified by percentage. For example, zoom(50)
doubles the size of the objects in the view, zoom(200
) reduces the size of objects in the view by one half, and zoom(0)
resets the view to 100%. You cannot specify a scale factor that will zoom-out the original content further than 100%.
Syntax
zoom(percentage)
Parameters
percentage |
An integer representing the zoom factor. |
Returns
undefined
HitInfo¶
The object returned when a hit test occurs during a MouseEvent.
Properties
Property |
Type |
Access |
Description |
distance |
number |
R |
The distance from the |
material |
material |
R |
Acrobat 8.1 The material of the node that was hit. |
position |
vector3 |
R |
The position of the point where the hit occurred. |
surfaceNormal |
vector3 |
R |
Acrobat 8.1 The normal direction at the hit location on the world-space surface. |
target |
node |
R |
The target of the hit test. |
textureCoordinate |
vector3 |
R |
Acrobat 8.1 The texture coordinate of the material that was hit. |
Host¶
Acrobat 7.0.7
An object that provides access to the JavaScript engine context and to pertinent objects within it. The variable host
is a global reference to this object. It is a reference to the JavaScript Doc object in which the 3D annotation is contained.
Image¶
An object that represents an image.
Properties
Property |
Type |
Access |
Description |
height |
number |
R |
The image’s height, measured in pixels. |
width |
number |
R |
The image’s width, measured in pixels. |
KeyEvent¶
An object that is passed as an argument to the onEvent method of the KeyEventHandler
object.
Properties
Property |
Type |
Access |
Description |
canvas |
canvas |
R |
The |
canvasPixelHeight |
integer |
R |
The height, measured in pixels, of the |
canvasPixelWidth |
integer |
R |
The width, measured in pixels, of the |
characterCode |
integer |
R |
The value of the character pressed according to Acrobat’s character mapping, as per this listing of Acrobat character codes: |
ctrlKeyDown |
Boolean |
R |
Determines whether the Ctrl key (Windows) or Command key (Mac OS) was pressed.
|
currentTool |
string |
R |
The name of the current tool. |
shiftKeyDown |
Boolean |
R |
Determines whether the Shift key was pressed.
|
KeyEventHandler¶
An object that exposes a callback mechanism that allows a function to be evaluated when a key event occurs. Event handlers are registered with the Runtime addEventHandler method.
KeyEventHandler¶
A constructor that creates a new KeyEventHandler
object.
Syntax
new KeyEventHandler()
Returns
A KeyEventHandler
object.
onEvent¶
A method that is called when a key is pressed.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
Light¶
A Node
object that illuminates meshes in the Scene
.
There are different types of Light
objects, each with their own distinct behavior. Infinite Light
objects behave much like sunlight in that they cast parallel light in a given direction. Spot Light
objects have a fixed cone angle that limits their beam to a conical projection. Point Light
objects act similarly to a light bulb, where the light comes from a specific location in 3D space. Currently, none of the Light
objects cast shadows.
In addition to the methods and properties that follow, the Light
object also contains the same methods and properties as a Node
.
Properties
Property |
Type |
Access |
Description |
attenuationA |
number |
R/W |
The |
attenuationB |
number |
R/W |
The |
attenuationC |
number |
R/W |
The |
attenuationType |
string |
R/W |
The style of attenuation for the
|
ATTENUATION_ABC |
string |
R |
Acrobat 7.0.7 A string constant for the |
ATTENUATION_NONE |
string |
R |
Acrobat 7.0.7 A string constant for the |
brightness |
number |
R/W |
Specifies the brightness of the emission from the |
color |
Color |
R |
Specifies the color of the light. |
direction |
Vector3 |
R |
The direction toward which the light is pointing. |
directionLocal |
Vector3 |
R |
Acrobat 7, but not documented until Acrobat 8.1 The direction toward which the light is pointing relative to its parent |
innerConeAngle |
number |
R/W |
The angle, measured in radians, about the |
innerRadius |
number |
R/W |
The distance within which the light is of uniform full density. |
outerConeAngle |
number |
R/W |
The angle, measured in radians, about the |
outerRadius |
number |
R/W |
The distance beyond which the light’s intensity is zero. |
position |
Vector3 |
R |
The position of the |
positionLocal |
Vector3 |
R |
The position of the |
type |
string |
R/W |
The type of
|
TYPE_INFINITE |
string |
R |
Acrobat 7.0.7 A string constant for the |
TYPE_POINT |
string |
R |
Acrobat 7.0.7 A string constant for the |
TYPE_SPOT |
string |
R |
Acrobat 7.0.7 A string constant for the |
Material¶
A SceneObject
that controls the appearance of materials using the fixed function shader. In addition to the properties below, it contains the same methods and properties as a SceneObject.
Properties
Property |
Type |
Access |
Description |
ambientColor |
Color |
R |
The ambient color. |
ambientTexture |
Texture |
R |
The ambient texture. |
bumpTexture |
Texture |
R |
A texture map whose value is used to describe the roughness of the object. |
diffuseColor |
Color |
R |
The matte color of an object. |
diffuseTexture |
Texture |
R |
A texture map that is used for the matte color of the object. |
emissiveColor |
Color |
R |
Emissive color except that it is does not require that any lighting to display. An object with an emissive color of white and no texture will appear pure white in the scene. |
emissiveTexture |
Texture |
R |
The emissive texture. Emissive texture is similar to ambient color, except that it is does not require that any lighting to display. An object with an emissive color of white and no texture will appear pure white in the scene. |
opacity |
number |
R/W |
The total opacity of the material. |
opacityTexture |
Texture |
R |
A texture map whose brightness is used for the level of opacity of the object. White signifies completely opaque while black signifies completely transparent. |
phongExponent |
number |
R/W |
The Phong exponent. The Phong exponent defines the “tightness” of the highlight. A higher exponent results in a smaller, tighter highlight while a lower exponent results in a broader flatter one. |
reflectionStrength |
number |
R/W |
The reflection level, which can be a value from |
reflectionTexture |
Texture |
R |
The reflection texture, also known as an environment map, the texture is used to store the image of the environment surrounding the rendered object. It simulates the reflection of a mirrored surface |
specularColor |
Color |
R |
The specular color. The |
specularStrength |
number |
R/W |
The specular strength, which is a measure of how shiny the material is. |
attachFlashMovie¶
Acrobat 9.0
Sets the provided FlashMovie
as the diffuse texture for the Material
.
Syntax
attachFlashMovie(movie)
Parameters
movie |
The |
Returns
undefined
Matrix4x4¶
A four-by-four matrix commonly used for transformations.
Properties
Property |
Type |
Access |
Description |
determinant |
number |
R/W |
The determinant of the matrix. |
inverse |
Matrix4x4 |
R |
The inverse of the matrix. |
scaleComponent |
Vector3 |
R |
The scale component of the transformation. |
translation |
Vector3 |
R |
The translation component of the transformation. |
transpose |
Matrix4x4 |
R |
The transpose of the matrix. |
Matrix4x4¶
A constructor that creates a new Matrix4x4
object initialized to the identity matrix.
Syntax
new Matrix4x4()
Returns
A Matrix4x4
object initialized to the identity matrix.
Matrix4x4¶
A constructor that creates a new Matrix4x4
object initialized to the specified matrix.
Syntax
new Matrix4x4(matrix)
Parameters
matrix |
A |
Returns
A Matrix4x4
object initialized to the specified matrix.
isEqual¶
Determines whether the current matrix is equal to the specified matrix.
Syntax
isEqual(matrix)
Parameters
matrix |
A |
Returns
Returns true
if the matrices are equal, false
otherwise.
multiply¶
Multiplies the current matrix by the specified matrix.
Syntax
multiply(matrix)
Parameters
matrix |
A |
Returns
A Matrix4x4
object.
multiplyInPlace¶
Multiplies the current matrix by the specified matrix, and updates the current matrix with the resulting value.
Syntax
multiplyInPlace(matrix)
Parameters
matrix |
A |
Returns
undefined
rotateWithQuaternion¶
Rotates the current matrix using the specified Quaternion
.
Syntax
rotateWithQuaternion(quaternion)
Parameters
quaternion |
A |
Returns
A Matrix4x4
object.
rotateWithQuaternionInPlace¶
Rotates the current matrix using the specified quaternion, and updates the current matrix with the resulting value.
Syntax
rotateWithQuaternionInPlace(quaternion)
Parameters
quaternion |
A |
Returns
undefined
rotateAboutLine¶
Rotates the current matrix about the specified line.
Syntax
rotateAboutLine(angle, start, end)
Parameters
angle |
The angle of rotation, in radians. |
start |
A point described by a |
end |
A point described by a |
Returns
A Matrix4x4
object.
rotateAboutLineInPlace¶
Rotates the current matrix about the specified line, and updates the current matrix with the resulting value.
Syntax
rotateAboutLineInPlace(angle, start, end)
Parameters
angle |
The angle of rotation, in radians. |
start |
A |
end |
A |
Returns
undefined
rotateAboutX¶
Rotates the current matrix about the x axis.
Syntax
rotateAboutX(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
A Matrix4x4
object.
rotateAboutXInPlace¶
Rotates the current matrix about the x axis, and updates the current matrix with the resulting value.
Syntax
rotateAboutXInPlace(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
undefined
rotateAboutVector¶
Rotates the current matrix about the specified vector.
Syntax
rotateAboutVector(angle, axis)
Parameters
angle |
The angle of rotation, in radians. |
axis |
A |
Returns
A Matrix4x4
object.
rotateAboutVectorInPlace¶
Rotates the current matrix about the specified vector, and updates the current matrix with the resulting value.
Syntax
rotateAboutVectorInPlace(angle, axis)
Parameters
angle |
The angle of rotation, in radians. |
axis |
A |
Returns
undefined
rotateAboutY¶
Rotates the current matrix about the y axis.
Syntax
rotateAboutY(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
A Matrix4x4
object.
rotateAboutYInPlace¶
Rotates the current matrix about the y axis, and updates the current matrix with the resulting value.
Syntax
rotateAboutYInPlace(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
undefined
rotateAboutZ¶
Rotates the current matrix about the z axis.
Syntax
rotateAboutZ(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
A Matrix4x4
object.
rotateAboutZInPlace¶
Rotates the current matrix about the z axis, and updates the current matrix with the resulting value.
Syntax
rotateAboutZInPlace(angle)
Parameters
angle |
The angle of rotation, in radians. |
Returns
undefined
scale¶
Scales the current matrix using the specified scaling components.
Syntax
scale(x, y, z)
Parameters
x |
The scaling component in the x direction. |
y |
The scaling component in the y direction. |
z |
The scaling component in the z direction. |
Returns
A Matrix4x4
object.
scaleInPlace¶
Scales the current matrix using the specified scaling components, and updates the current matrix with the resulting value.
Syntax
scaleInPlace(x, y, z)
Parameters
x |
The scaling component in the x direction. |
y |
The scaling component in the y direction. |
z |
The scaling component in the z direction. |
Returns
undefined
set¶
Sets the value of the current matrix using the specified matrix.
Syntax
set(matrix)
Parameters
matrix |
The matrix whose value is copied into the current matrix. |
Returns
undefined
set¶
Acrobat 8.1
Sets the value of the current matrix using an array.
Syntax
set( array )
Parameters
array |
The array of length 16 whose values are copied into the current matrix. |
Returns
undefined
set¶
Acrobat 8.1
Sets the value of the current matrix using 16 numeric values.
Syntax
set(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
Parameters
v0-v15 |
Number values for the given indices of the matrix. |
Returns
undefined
setIdentity¶
Sets the value of the current matrix to the identity matrix.
Syntax
setIdentity()
Returns
undefined
setView¶
Sets the current matrix according to the specified component vectors.
Syntax
setView(position, direction, up)
Parameters
position |
A |
direction |
A |
up |
A |
Returns
undefined
transformDirection¶
Transforms the specified vector by the current matrix.
Syntax
transformDirection(vector)
Parameters
vector |
The |
Returns
A Vector3
object.
transformPosition¶
Transforms the specified position by the current matrix.
Syntax
transformPosition(position)
Parameters
position |
A |
Returns
A Vector3
object.
translate¶
Translates the current matrix by the components of the specified vector.
Syntax
translate(translation)
Parameters
translation |
The |
Returns
A Matrix4x4
object.
translateInPlace¶
Translates the current matrix by the components of the specified vector, and updates the current matrix with the resulting value.
Syntax
translateInPlace(translation)
Parameters
translation |
The |
Returns
undefined
transposeInPlace¶
Sets the value of the current matrix to its transpose.
Syntax
transposeInPlace()
Returns
undefined
Mesh¶
A Node
object that contains geometry. A Mesh
object with no geometry has children Node
objects that can be transformed as a group. In addition to the methods and properties below, it contains the same methods and properties as a Node.
Properties
Property |
Type |
Description |
faceCount |
number object |
The number of faces the 3D mesh has. |
material |
material |
The |
renderMode |
string |
The
|
computeBoundingBox¶
Acrobat 7.0.7
Computes the bounds of the Node
object.
Syntax
computeBoundingBox()
Returns
A BoundingBox
object.
setColor¶
Acrobat 11
Sets the color, either for the entire mesh or for any one of the faces of the mesh. setColor
can be called several time for the same mesh, either to change the color of the entire mesh or to change the color of the faces.
Syntax
setColor(color,faceIndex)
Parameters
color |
(Optional) A |
faceIndex |
(Optional) The index representing the face whose color is to be changed. Omit this parameter to change the color of the entire mesh. If |
Returns
undefined.
MouseEvent¶
An object that is passed as an argument to the onEvent
method of the MouseEventHandler object.
Properties
Property |
Type |
Access |
Description |
canvas |
Canvas |
R |
The |
canvasPixelHeight |
integer |
R |
The height, measured in pixels, of the |
canvasPixelWidth |
integer |
R |
The width, measured in pixels, of the |
ctrlKeyDown |
Boolean |
R |
Determines whether the Ctrl key (Windows) or Command key (Mac OS) was pressed. |
currentTool |
string |
R |
The name of the current tool. |
hits |
Array |
R |
A set of |
isDoubleClick |
Boolean |
R |
Determines whether a double-click event occurred |
isMouseDown |
Boolean |
R |
Determines whether the mouse button was pressed |
isMouseHit |
Boolean |
R |
Determines whether the target is under the mouse cursor. |
isMouseMove |
Boolean |
R |
Determines whether the mouse position changed. |
isMouseOut |
Boolean |
R |
Determines whether the mouse position moved off the target. |
isMouseOver |
Boolean |
R |
Determines whether the mouse position moved onto the target. |
isMouseUp |
Boolean |
R |
Determines whether the mouse button was released. |
leftButtonDown |
Boolean |
R |
Determines whether the left mouse button was pressed. |
mouseX |
integer |
R |
The x position of the mouse cursor in the |
mouseY |
integer |
R |
The y position of the mouse cursor in the |
rightButtonDown |
Boolean |
R |
Version 7.0.1 Determines whether the right mouse button was pressed. |
shiftKeyDown |
Boolean |
R |
Determines whether the Shift key was pressed. |
MouseEventHandler¶
An object that exposes a callback mechanism that allows a function to be evaluated when a mouse event occurs. The handler may be customized to filter out certain event types. Event handlers are registered with the Runtime addEventHandler method.
Properties
Property |
Type |
Access |
Description |
onMouseDoubleClick |
Boolean |
R/W |
When set to true, the handler is called back when a mouse button is clicked twice in rapid successionon the target object. If no target is specified, the handler calls back on any double-click. |
onMouseDown |
Boolean |
R/W |
When set to true, the handler is called back when a mouse button is initially pressed while the cursor is over the target object. If no target is specified, the handler calls back on any button press. |
onMouseHit |
Boolean |
R/W |
When set to true, the handler is called back continuously when the cursor is over the target object. In the case of onMouseHit, it does not matter if the target object is behind another object in the scene. The list of resultant hit objects are provided in the |
onMouseMove |
Boolean |
R/W |
When set to true, the handler is called back when the cursor moves over the target object. If no target is specified, the handler calls back on any mouse movement over the 3D annotation. |
onMouseOut |
Boolean |
R/W |
When set to true, the handler is called back once when the cursor moves off of the target object. To be called back, the target must be the frontmost object. To exclude objects, use the |
onMouseOver |
Boolean |
R/W |
When set to true, the handler is called back once when the cursor moves over the target object. |
onMouseUp |
Boolean |
R/W |
When set to true, the handler is called back when a mouse button is initially released. If a target is specified, it calls back only when the cursor is over the handler’s target. |
reportAllTargets |
Boolean |
R/W |
Determines whether a hit test is performed. When set to
|
target |
object |
R/W |
The |
MouseEventHandler¶
A constructor that creates a new MouseEventHandler
object.
Syntax
new MouseEventHandler()
Returns
A MouseEventHandler
object.
onEvent¶
A method that is called when a mouse event occurs.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
Node¶
An object within the Scene
hierarchy (a SceneObject
) that has a 3D representation. The following objects are considered Node
objects:
To obtain a Node
object’s type, use the standard JavaScript constructor
property. For example, the following syntax prints the Node
object’s type to the console:
console.println(myNode.constructor.name);
In addition to the methods and properties below, it contains the same methods and properties as a SceneObject.
Properties
Property |
Type |
Access |
Description |
firstChild |
Node (if the first child exists), None otherwise |
R |
The |
hitEnabled |
Boolean |
R/W |
Determines whether the |
info |
string |
R |
Acrobat 7.0.7 Information associated with the |
metadataString |
string |
R |
Acrobat 8.1 A string containing |
nextSibling |
Node (if the next sibling exists), None otherwise |
R |
The next sibling. |
opacity |
number |
R/W |
Acrobat 7.0.7 The |
parent |
object |
R |
The |
transform |
Matrix4x4 |
R |
The local to world transformation matrix for the |
wireframeColor |
Color |
R |
The |
visible |
Boolean |
R/W |
Determines whether the |
detachFromCurrentAnimation¶
Removes the ability of the currently active Animation
of the Node
object to transform the Node
.
Syntax
detachFromCurrentAnimation()
Returns
undefined
Procedural¶
Deprecated
A Node
object used to represent procedurally created geometry, such as constructive solid geometry (CSG) solids, procedural spheres, or NURB objects (a 3D curve or surface). A Procedural
object contains the same methods and properties as a Node.
Quaternion¶
Represents a rotation in 3D space, and allows for smooth interpolation (blending) between orientations of subjects. A Quaternion
is typically used for animating a Camera
or Mesh
over time, and can be converted to and from angles of rotation about the axes.
Quaternion¶
A constructor that initializes the object with the identity matrix.
Syntax
new Quaternion()
Returns
A Quaternion
object.
Quaternion¶
A constructor that initializes the object with the specified rotation matrix.
Syntax
new Quaternion(matrix)
Parameters
matrix |
A |
Returns
A Quaternion
object.
Quaternion¶
A constructor that initializes the object with the specified Quaternion
.
Syntax
new Quaternion(quaternion)
Parameters
quaternion |
A |
Returns
A Quaternion
object.
interpolate¶
Creates a Quaternion
object interpolated from the current and specified Quaternion
objects and a
.
Syntax
interpolate(quaternion, a)
Parameters
quaternion |
A |
a |
A number value, from |
Returns
A Quaternion
object.
interpolateInPlace¶
Creates a Quaternion
object interpolated from the current and specified Quaternion
objects and a
, and updates the current Quaternion
object with the new value.
Syntax
interpolateInPlace(quaternion, a)
Parameters
quaternion |
A |
a |
A number value, from |
Returns
A Quaternion
object.
RenderEvent¶
An object that is passed as an argument to the onEvent
method of the RenderEventHandler
object .
Properties
Property |
Type |
Access |
Description |
canvas |
Canvas |
R |
The |
canvasPixelHeight |
integer |
R |
The height, measured in pixels, of the |
canvasPixelWidth |
integer |
R |
The width, measured in pixels, of the |
currentTool |
string |
R |
The name of the current tool. |
RenderEventHandler¶
An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs. Event handlers are registered with the Runtime addEventHandler method. It issues a callback just before each Canvas
is rendered.
RenderEventHandler¶
A constructor that creates a new RenderEventHandler
object.
Syntax
new RenderEventHandler()
Returns
A RenderEventHandler
object.
onEvent¶
A method that is called immediately before the Canvas
is rendered.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
RenderOptions¶
An object that describes the style with which to render Node
objects in the Scene
.
Properties
Property |
Type |
Access |
Description |
boundingBoxColor |
Color |
R |
A |
clippingPlaneColor |
Color |
R |
A |
clippingPlaneIntersectionColor |
Color |
R |
A |
defaultAmbientColor |
Color |
R |
A |
defaultDiffuseColor |
Color |
R |
A |
defaultEmissiveColor |
Color |
R |
A |
defaultSpecularColor |
Color |
R |
A |
illustrationRenderModeFaceColor |
Color |
R |
Acrobat 7.0.7 The color of the faces when the render mode is Illustration. |
illustrationRenderModeLineColor |
Color |
R |
A |
pointsRenderModeColor |
Color |
R |
A |
shadedIllustrationRenderModeLineColor |
Color |
R |
A |
solidGridColorEven |
Color |
R |
Acrobat 7.0.7 The color of the even squares of the checkered grid when drawn in solid mode. |
solidGridColorOdd |
Color |
R |
Acrobat 7.0.7 The color of the odd squares of the checkered grid when drawn in solid mode. |
solidRenderModeLineColor |
Color |
R |
A |
transparentBoundsRenderModeColor |
Color |
R |
A |
transparentGridColorEven |
Color |
R |
Acrobat 7.0.7 The color of the even squares of the checkered grid when drawn in transparent mode. |
transparentGridColorOdd |
Color |
R |
Acrobat 7.0.7 The color of the odd squares of the checkered grid when drawn in transparent mode. |
wireframeRenderModeColor |
Color |
R |
Acrobat 7.0.7 The color of the wires when the render mode is Wireframe. |
xAxisColor |
Color |
R |
Acrobat 7.0.7 The color of the x axis. |
yAxisColor |
Color |
R |
Acrobat 7.0.7 The color of the y axis. |
zAxisColor |
Color |
R |
Acrobat 7.0.7 The color of the z axis. |
Resource¶
An object that creates an abstraction for loading behavior in files and streams.
Properties
Property |
Type |
Access |
Description |
type |
string |
R |
The type of
|
TYPE_IMAGE |
string |
R |
Acrobat 7.0.7 A string constant for the |
TYPE_MODEL |
string |
R |
Acrobat 7.0.7 A string constant for the |
TYPE_UNKNOWN |
string |
R |
Acrobat 7.0.7 A string constant for the |
TYPE_FLASH |
string |
R |
Acrobat 9.0 A string constant for the Resource type of |
Resource¶
A constructor that creates a new Resource
.
Syntax
new Resource(pathname)
Parameters
pathname |
A string representing the path of the file or stream. Can load embedded resources only from within the PDF file. The pathname string must start with pdf://. |
Returns
A Resource
object.
Runtime¶
An object that represents the run-time instance of the player. Each Runtime
object can have its own unique script engine and set of annotations. The variable runtime
is a global reference to this object.
Properties
Property |
Type |
Access |
Description |
BUTTON_TYPE_PUSH |
string |
R |
Acrobat 7.0.7 A string constant for the custom tool button type of push button. It is used with the |
BUTTON_TYPE_TOOL |
string |
R |
Acrobat 7.0.7 A string constant for the custom button type of tool button. It is used with the |
canvasCount |
number |
R |
Acrobat 8.1 The number of Canvases that are attached to the active 3D annotation. |
ctrlKeyDown |
Boolean |
R |
Determines whether the Ctrl key (Windows) or Command key (Mac OS) was pressed. |
eventHandlerCount |
integer |
R |
The number of registered event handlers. |
instances |
Array |
R |
Acrobat 7.0.7 An array of JavaScript |
MENU_ITEM_TYPE_CHECKED |
string |
R |
Acrobat 7.0.7 A string constant for the custom menu item type of checked. It is used with the |
MENU_ITEM_TYPE_DEFAULT |
string |
R |
Acrobat 7.0.7 A string constant for the custom menu item type of default. It is used with the |
overrideFlyTool |
Boolean |
R/W |
Acrobat 9.0 Determines whether to override the built-in Fly tool behavior. |
overrideNavTools |
Boolean |
R/W |
Determines whether to disable all default navigation behavior.
|
overridePanTool |
Boolean |
R/W |
Determines whether to override the built-in Pan tool behavior.
|
overrideRotateTool |
Boolean |
R/W |
Determines whether to override the built-in Rotate tool behavior. |
overrideSelection |
Boolean |
R/W |
Acrobat 7.0.7 Determines whether to override the built-in Selection tool behavior. |
overrideSpinTool |
Boolean |
R/W |
Acrobat 8.0 Determines whether to override the built-in Spin tool behavior. |
overrideViewChange |
Boolean |
R/W |
Determines whether to override the setting of Views from Acrobat. |
overrideWalkTool |
Boolean |
R/W |
Determines whether to override the built-in Walk tool behavior. |
overrideScrollWheel |
Boolean |
R/W |
Acrobat 8.1 Determines whether to override the built-in scroll-wheel behavior. |
overrideZoomTool |
Boolean |
R/W |
Determines whether to override the built-in Zoom tool behavior.
|
scrollWheelSpeed |
number |
R/W |
Acrobat 8.1 A speed multiplier for the value of the scroll-wheel motion. |
shiftKeyDown |
Boolean |
R |
Determines whether the Shift key was pressed. |
speedThreshold |
number |
R/W |
Acrobat 8.1 A length (based upon the diagonal of the scene’s bounding box) under which the Walk tool’s motion is scaled relative to the size of the model. The Walk tool’s motion is constant based upon the scene’s scale factor, such that it emulates a natural pace relative to the model’s size. This works well for architectural models that are created with a defined scale. However, the walk motion is too quick for very small models. |
strafeSpeed |
number |
R/W |
Acrobat 8.1 A speed multiplier for the lateral motion while using the Walk tool. |
TOOL_NAME_FLY| |
string |
R |
Acrobat 9.0 A string constant for the name of the fly tool. Its value is |
TOOL_NAME_MEASURE |
string |
R |
Acrobat 7.0.7 A string constant for the name of the measure tool. Its value is |
TOOL_NAME_PAN |
string |
R |
Acrobat 7.0.7 A string constant for the name of the pan tool. Its value is “ |
TOOL_NAME_ROTATE |
string |
R |
Acrobat 7.0.7 A string constant for the name of the rotate tool. Its value is |
TOOL_NAME_SPIN |
string |
R |
Acrobat 8.0 A string constant for the name of the Spin tool. Its value is |
TOOL_NAME_WALK |
string |
R |
Acrobat 7.0.7 A string constant for the name of the walk tool. Its value is |
TOOL_NAME_ZOOM |
string |
R |
Acrobat 7.0.7 A string constant for the name of the zoom tool. Its value is |
version |
number |
R |
The number corresponding to the version of the |
viewCount |
integer |
R |
Acrobat 9.0 The number of named views for the annotation. |
walkSpeed |
number |
R/W |
Acrobat 8.1 A speed multiplier for the forward/backward motion while using the Walk tool. |
addCustomToolButton¶
Creates a custom tool button in the 3D toolbar.
Syntax
addCustomToolButton(name, label, type)
Parameters
name |
A string identifying the tool button. |
label |
A string appearing on the tool button. |
type |
A string indicating whether it is a tool button or a push button. Its possible values are: - |
Returns
undefined
addEventHandler¶
Registers the provided event handler.
Syntax
addEventHandler(eventHandler)
Parameters
eventHandler |
The event handler object to be registered. |
Returns
undefined
disableTool¶
Disables the tool with the specified ID.
Syntax
disableTool(toolName)
Parameters
toolName |
A string identifying the tool. |
Returns
undefined
enableTool¶
Enables the tool with the specified ID.
Syntax
enableTool(toolName)
Parameters
toolName |
A string identifying the tool. |
Returns
undefined
getEventHandler¶
Obtains the event handler corresponding to the specified index.
Syntax
getEventHandler(index)
Parameters
index |
An integer identifying the event handler. |
Returns
An event handler object.
getRendererName¶
Obtains the name of the current renderer.
Syntax
getRendererName()
Returns
A string containing the current renderer’s name.
getView¶
Acrobat 9.0
Gets the indicated view for the annotation by its index.
See the related method, setView, for setting the view by its index.
Syntax
getView( index )
Parameters
index |
The integer index of the view. |
Returns
View
getView¶
Acrobat 9.0
Gets the indicated view for the annotation by its name.
See the related method, setView, for setting the view by its name.
Syntax
getView( name )
Parameters
name |
The string name of the view. |
Returns
View
pause¶
Acrobat 9.0
Pauses the runtime. This is the same as selecting the Pause toolbar button or menu item.
Syntax
pause()
Returns
undefined
play¶
Acrobat 9.0
Resumes playback of the runtime. This is the same as selecting the Play toolbar button or menu item.
Syntax
play()
Returns
undefined
refresh¶
Version 7.0.1
Marks the render area dirty so that it is redrawn. This is useful when something changes in the scene but the annotation is in a Loaded and not Live state.
Syntax
refresh()
Returns
undefined
removeEventHandler¶
Unregisters the specified event handler.
Syntax
removeEventHandler(handler)
Parameters
handler |
An event handler object representing the event handler. |
Returns
undefined
removeCustomToolButton¶
Removes the custom tool button with the specified ID.
Syntax
removeCustomToolButton(toolName)
Parameters
toolName |
A string identifying the custom tool button. |
Returns
undefined
setCurrentTool¶
Sets the current tool to the one with the specified ID.
Syntax
setCurrentTool(toolName)
Parameters
toolName |
A string identifying the tool. |
Returns
undefined
setView¶
Acrobat 9.0.
Sets the current view for the annotation.
See the related method, getView, for getting the view by its index.
Syntax
setView( index, animate)
Parameters
index |
The integer index of the view to be set . |
animate |
(Optional) A Boolean value, when |
Returns
undefined
setView¶
Acrobat 9.0
Sets the current view for the annotation.
See the related method, getView, for getting the view by its name.
Syntax
setView( name, animate)
Parameters
menuItemName |
The string name of the view to be set. |
checkedState |
(Optional) A Boolean value, when |
Returns
undefined
Scene¶
An object that represents the hierarchy of the 3D related content, including Animation
, Light
, Material
, and Mesh
objects. The variable scene
is a global reference to this object.
Related objects are Animation, Light, Material and Mesh.
Properties
Property |
Type |
Access |
Description |
ambientIlluminationColor |
Color |
R |
Modulates the ambient |
animations |
SceneObjectList |
R |
A list of all |
cameras |
SceneObjectList |
R |
A list of all |
defaultRenderOptions |
RenderOptions |
R |
A set of all default rendering options for the |
gridMode |
string |
R/W |
Acrobat 7.0.7 The display style of the grid that represents a portion of the ground plane in the
|
GRID_MODE_OFF |
string |
R |
Acrobat 7.0.7 A string constant for the grid mode of |
GRID_MODE_SOLID |
string |
R |
Acrobat 7.0.7 A string constant for the grid mode of |
GRID_MODE_TRANSPARENT |
string |
R |
Acrobat 7.0.7 A string constant for the grid mode of |
GRID_MODE_WIRE |
string |
R |
Acrobat 7.0.7 A string constant for the grid mode of |
gridSize |
number |
R |
Acrobat 7.0.7 The number of squares on the ground plane grid. |
lengthUnits |
number |
R |
The scale of a unit of length, specified in meters. |
LIGHT_MODE_FILE |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_NONE |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_WHITE |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_DAY |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_BRIGHT |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_RGB |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_NIGHT |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_BLUE |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_RED |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_CUBE |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_CAD |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
LIGHT_MODE_HEADLAMP |
string |
R |
Acrobat 7.0.7 A string constant for the light mode of |
lights |
SceneObjectList |
R |
A list of all |
lightScaleFactor |
number |
R/W |
A uniform scale factor for all |
lightScheme |
string |
R/W |
Acrobat 7.0.7 The current, preconfigured lighting scheme for the It can take one of the following values:
|
materials |
SceneObjectList |
R |
A list of all |
meshes |
SceneObjectList |
R |
A list of all |
nodes |
SceneObjectList |
R |
A list of all |
outlineAngle |
number |
R/W |
Acrobat 7.0.7 The crease angle (in degrees) for the appearance of lines in Illustration render modes. |
showGrid |
Boolean |
R/W |
Acrobat 7.0.7 Determines whether the ground plane grid is displayed. |
renderDoubleSided |
Boolean |
R/W |
Acrobat 8.1 Toggles if backfacing polygons are rendered. |
renderMode |
string |
R/W |
Acrobat 7.0.7 The default rendering type for all objects in the
|
RENDER_MODE_DEFAULT |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_BOUNDING_BOX |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_TRANSPARENT_BOUNDING_BOX |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_TRANSPARENT_BOUNDING_BOX_OUTLINE |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_VERTICES |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SHADED_VERTICES |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_WIREFRAME |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SHADED_WIREFRAME |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SOLID |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_TRANSPARENT |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SOLID_WIREFRAME |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_TRANSPARENT_WIREFRAME |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_ILLUSTRATION |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SOLID_OUTLINE |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_SHADED_ILLUSTRATION |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
RENDER_MODE_HIDDEN_WIREFRAME |
string |
R |
Acrobat 7.0.7 A string constant for the render mode of |
selectedNode |
Node |
R/W |
Acrobat 8.1 The currently selected Node. |
showAxes |
Boolean |
R/W |
Acrobat 7.0.7 Determines whether the world axes are displayed. |
showOrientationAxes |
Boolean |
R/W |
Acrobat 9.0 Determines whether the orientation axes are displayed. |
smoothing |
Boolean |
R/W |
Acrobat 7.0.7 When |
smoothingAngle |
number |
R/W |
Acrobat 7.0.7 The default smoothing angle (in degrees) for meshes in the scene. |
smoothingOverride |
Boolean |
R/W |
Acrobat 7.0.7 When set to |
activateAnimation¶
Sets the given Animation
to be active on its Node
objects.
Syntax
activateAnimation(animation)
Parameters
animation |
The |
Returns
undefined
addFlashForeground¶
Acrobat 9.0
Adds the provided FlashMovie
as a foreground element within the 3D scene.
Syntax
addFlashForeground(movie)
Parameters
movie |
The |
Returns
undefined
addModel¶
Adds a model Resource
to the top level of the Scene
.
Syntax
addModel(modelRes)
Parameters
modelRes |
The |
Returns
A Node
object representing the top-level Mesh
of the loaded model.
createClippingPlane¶
Creates a new clipping plane.
Syntax
createClippingPlane()
Returns
A ClippingPlane
object.
createLight¶
Creates a new Light
and attaches it to the Scene.
Syntax
createLight()
Returns
A Light
object.
createSquareMesh¶
Creates a Mesh
that is a unit square. The default UV parameterization fits once in U and V.
Syntax
createSquareMesh(sizeX, sizeY, name)
Parameters
sizeX |
Model units in the x direction used to size the |
sizeY |
Model units in the y direction used to size the |
name |
(Optional) The name that is assigned to the |
Returns
A Mesh
object.
computeBoundingBox¶
Computes the BoundingBox
of the Scene.
Syntax
computeBoundingBox()
Returns
A BoundingBox
object.
SceneObject¶
The base type for objects within the Scene
, including Animation
, Material
, and Node
objects.
Related objects are Scene, Animation, Light, Material, and Mesh.
Properties
Property |
Type |
Description |
name |
string |
The name of the |
objectGUID |
string |
Deprecated A value that uniquely identifies the |
objectID |
integer |
An unsigned 32-bit value that uniquely identifies the |
SceneObjectList¶
A structure that contains references to several SceneObject
objects.
Properties
Property |
Type |
Access |
Description |
count |
integer |
R |
The number of elements in the |
getByGUID¶
Deprecated
Obtains the specified SceneObject
object from the list.
Syntax
getByGUID(guid)
Parameters
guid |
A string representing the GUID for the specified element. |
Returns
A SceneObject
object.
getByID¶
Obtains the specified SceneObject
object from the list
Syntax
getByID(id)
Parameters
id |
An integer representing the object identifier for the specified |
Returns
A SceneObject
object.
getByIndex¶
Obtains the specified SceneObject
object from the list.
Syntax
getByIndex(index)
Parameters
index |
An integer representing the index of the specified |
Returns
A SceneObject
object.
getByName¶
Obtains the specified SceneObject
object from the list.
Syntax
getByName(name)
Parameters
name |
A string representing the name of the specified |
Returns
A SceneObject
object.
removeAll¶
Deprecated
Removes all the SceneObject
objects from the list, but does not delete them from the Scene
.
Syntax
removeAll()
Returns
undefined
removeByIndex¶
Deprecated
Removes the specified SceneObject
object from the list, but does not delete it from the Scene
.
Syntax
removeByIndex(index)
Parameters
index |
An index to the specified element. |
Returns
undefined
removeItem¶
Deprecated
Removes a SceneObject
object from the list, but does not delete it from the Scene
.
Syntax
removeItem(scene)
Parameters
scene |
A scene object that is to be removed. |
Returns
undefined
ScrollWheelEvent¶
(Acrobat 8.1) An object that is passed as an argument to the onEvent
method of the ScrollWheelEventHandler object. A ScrollWheelEvent
object is created when the mouse scroll wheel is activated over an active 3D Canvas
object.
Properties
Property |
Type |
Access |
Description |
canvas |
Canvas |
R |
The |
canvasPixelHeight |
integer |
R |
The height, measured in pixels, of the |
canvasPixelWidth |
integer |
R |
The width, measured in pixels, of the |
ctrlKeyDown |
Boolean |
R |
Determines whether the Ctrl key (Windows) or Command key (Mac OS) was pressed. |
currentTool |
string |
R |
The name of the current tool. |
deltaY |
number |
R |
The amount the scroll wheel was moved in the Y direction. |
shiftKeyDown |
Boolean |
R |
Determines whether the Shift key was pressed. |
ScrollWheelEventHandler¶
(Acrobat 8.1) An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs. Event handlers are registered with the Runtime
method addEventHandler.
ScrollWheelEventHandler¶
A constructor that creates a new ScrollWheelEventHandler
.
Syntax
new ScrollWheelEventHandler()
Returns
A ScrollWheelEventHandler
object.
onEvent¶
A method that is called when the scroll wheel is used in an active 3D annotation.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
SelectionEvent¶
(Acrobat 8.1) An object that is passed as an argument to the onEvent
method of the SelectionEventHandler object.
A SelectionEvent
object is created when an object is selected from an active 3D Canvas
object or from a model tree. If the selection is made from a Canvas
object, a MouseEvent
is also created.
Properties
Property |
Type |
Access |
Description |
node |
Node |
R |
The Node that is the target of the selection change. |
selected |
Boolean |
R |
The selected state of the target Node. |
SelectionEventHandler¶
(Acrobat 8.1) An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs. Event handlers are registered with the Runtime
method addEventHandler
.
SelectionEventHandler¶
A constructor that creates a new SelectionEventHandler
object.
Syntax
new SelectionEventHandler()
Returns
A SelectionEventHandler
object.
onEvent¶
A method that is called when the selection state changes in an active 3D annotation.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
StateEvent¶
Acrobat 9.0
An object that is passed as an argument to the onEvent
method of the StateEventHandler
object. A StateEvent
object is created when state data must be stored or loaded for the scene, such as when a new comment view is created or invoked for the annotation.
Properties
Property |
Type |
Access |
Description |
stateString |
string |
R |
If the |
type |
string |
R |
The type of |
TYPE_LOAD |
string |
R |
A string constant for the The state data that was stored as part of the original |
TYPE_SAVE |
string |
R |
A string constant for the |
StateEventHandler¶
Acrobat 9.0
An object that exposes a callback mechanism that allows a function to be evaluated when a state event occurs. Event handlers are registered with the Runtime
method addEventHandler
.
onEvent¶
A method that is called when state data must be stored or loaded for the annotation. The return value is stored as the stateString
for the given StateEvent
.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
string or undefined
StateEventHandler¶
The constructor that creates a new StateEventHandler
.
Syntax
new StateEventHandler()
Returns
A StateEventHandler
object.
Texture¶
A Texture
object represents the mapping of a texture. All Texture
properties have read-write permissions.
Properties
Property |
Type |
Description |
amount |
number |
The degree to which the |
angle |
number |
The rotation angle, measured in degrees, of the map. |
clampU |
Boolean |
Determines whether the map should be clamped in the U direction. |
clampV |
Boolean |
Determines whether the map should be clamped in the V direction. |
image |
Image |
Acrobat 7.0.7 The |
modulate |
Boolean |
Determines whether to set the blend mode of the |
uOffset |
number |
The U-offset of the given map. |
uScale |
number |
The U-scale of the given map. |
use3DSStyleMapping |
Boolean |
Determines whether to use 3D Studio style map parameterizations. |
vOffset |
number |
The V-offset of the given map. |
vScale |
number |
The V-scale of the given map. |
getImage¶
Deprecated
Gets the Image
currently used by the Texture
.
Syntax
getImage()
Returns
The Image currently being used.
setImage¶
Deprecated
Sets the Image
to be used by the Texture
.
Syntax
setImage(image)
Parameters
image |
The |
Returns
undefined
TimeEvent¶
An object that is passed as an argument to the TimeEventHandler
object’s onEvent
method.
Properties
Property |
Type |
Access |
Description |
deltaTime |
number |
R |
The difference between the current time and the last time. |
time |
number |
R |
The current time. |
TimeEventHandler¶
An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs. Event handlers are registered with the Runtime
addEventHandler
method.
TimeEventHandler¶
A constructor that creates a new TimeEventHandler
object.
Syntax
new TimeEventHandler()
Returns
A TimeEventHandler
object.
onEvent¶
A method that is called when simulation time is incremented in an active 3D annotation.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
ToolEvent¶
An object that is passed as an argument to the onEvent
method of the ToolEventHandler object.
Properties
Property |
Type |
Access |
Description |
canvas |
Canvas |
R |
The |
canvasPixelHeight |
integer |
R |
The height, measured in pixels, of the |
canvasPixelWidth |
integer |
R |
The width, measured in pixels, of the |
currentTool |
string |
R |
The name of the current tool. |
toolName |
string |
R |
The name of the tool that was clicked. |
ToolEventHandler¶
An object that exposes a callback mechanism that allows a function to be evaluated when an event occurs. Event handlers are registered with the Runtime
addEventHandler method.
ToolEventHandler¶
A constructor that creates a new ToolEventHandler
object.
Syntax
new ToolEventHandler()
Returns
A ToolEventHandler
object.
onEvent¶
A method that is called when a tool button is pressed on the 3D toolbar.
Syntax
onEvent(event)
Parameters
event |
A |
Returns
undefined
Vector3¶
An object comprised of three values that represent a point in space or a direction and magnitude.
Properties
Property |
Type |
Access |
Description |
x |
number |
R/W |
The x component of the |
y |
number |
R/W |
The y component of the |
z |
number |
R/W |
The z component of the |
length |
number |
R |
The length of the |
Vector3¶
A constructor that initializes the new object to (0.0, 0.0, 0.0)
.
Syntax
new Vector3()
Returns
A Vector3
object.
Vector3¶
A constructor that initializes the new object to the specified components.
Syntax
new Vector3(x, y, z)
Parameters
x |
The x component used to initialize the new object. |
y |
The y component used to initialize the new object. |
z |
The z component used to initialize the new object. |
Returns
A Vector3
object.
add¶
Adds the specified Vector3
to the current one.
Syntax
add(offset)
Parameters
offset |
The |
Returns
A Vector3
object.
addInPlace¶
Adds the specified Vector3
to the current one, and updates the current Vector3
with the resulting value.
Syntax
addInPlace(offset)
Parameters
offset |
The |
Returns
undefined
addScaled¶
Adds the specified Vector3
with the scaled offset to the current one.
Syntax
addScaled(offset, scale)
Parameters
offset |
The |
scale |
The scaling factor for the |
Returns
A Vector3
object.
addScaledInPlace¶
Adds the specified Vector3
with the scaled offset to the current one, and updates the current Vector3
with the resulting value.
Syntax
addScaledInPlace(offset, scale)
Parameters
offset |
The |
scale |
The scaling factor for the |
Returns
undefined
blend¶
Blends the current and specified Vector3
by the specified degree.
Syntax
blend(vec, blendFactor)
Parameters
vec |
The |
blendFactor |
The degree of blending to be applied, which can be a value from |
Returns
A Vector3
object.
blendInPlace¶
Blends the current and specified Vector3
by the specified degree, and updates the current Vector3
with the resulting value.
Syntax
blendInPlace(vec, blendFactor)
Parameters
vec |
The |
blendFactor |
The degree of blending to be applied, which can be a value from |
Returns
undefined
cross¶
Calculates the cross product between the specified Vector3
and the current one.
Syntax
cross(vec)
Parameters
vec |
The |
Returns
A Vector3
object.
dot¶
Calculates the dot product between the specified Vector3
and the current one.
Syntax
dot(vec)
Parameters
vec |
The |
Returns
A number value representing the scalar dot product.
scale¶
Scales the current Vector3
.
Syntax
scale(scale)
Parameters
scale |
A number value used to scale the current |
Returns
A Vector3
object.
scaleInPlace¶
Scales the current Vector3
, and updates the current Vector3
with the resulting value.
Syntax
scaleInPlace(scale)
Parameters
scale |
A number value used to scale the current |
Returns
undefined
set¶
Sets the current Vector3
to the value contained in the specified Vector3
.
Syntax
set(vec)
Parameters
vec |
The Vector3 used to set the current |
Returns
undefined
set¶
Acrobat 7.0.7
Sets the current Vector3
to the values contained in the specified components.
Syntax
set(x, y, z)
Parameters
x |
The x component used to set the current |
y |
The y component used to set the current |
z |
The z component used to set the current |
Returns
undefined
set3¶
Deprecated
Sets the current Vector3
to the values contained in the specified components.
Syntax
set3(x, y, z)
Parameters
x |
The x component used to set the current |
y |
The y component used to set the current |
z |
The z component used to set the current |
Returns
undefined
subtract¶
Subtracts the specified Vector3
from the current one.
Syntax
subtract(offset)
Parameters
offset |
The |
Returns
A Vector3
object.
subtractInPlace¶
Subtracts the specified Vector3
from the current one, and updates the current Vector3
with the resulting value.
Syntax
subtractInPlace(offset)
Parameters
offset |
The |
Returns
undefined