504
Alternatively, the rotation may also be specified as a rotation about an arbitrary axis. This axis is
defined in space by
positionVector
and
directionVector
. The amount of rotation about this
axis is specified by
angle
.
Node
may be a reference to a model, group, light, or camera
Example
The following statement performs a rotation of 20° about each axis. Since the model’s
transform
property is its position, rotation, and scale offsets relative to that model’s parent, and
preRotate
applies the change in orientation prior to any existing effects of that model's
transform
, this will
rotate the model in place rather than orbiting around its parent.
member("scene").model("bip01").transform.preRotate(20, 20, 20)
Note that the above is equivalent to:
member("scene").model("bip01").rotate(20,20,20).
Generally
preRotate()
is only useful when dealing with transform variables. This line will orbit
the camera about the point (100, 0, 0) in space, around the y axis, by 180°.
t = transform()
t.position = member("scene").camera[1].transform.position
t.preRotate(vector(100, 0, 0), vector(0, 1, 0), 180)
member("scene").camera[1].transform = t
See also
rotate
previous
See
go previous
preScale()
Syntax
transformReference
.preScale(
xScale
,
yScale
,
zScale
)
transformReference
.preScale(
vector
)
member(
whichCastmember
).
node
.transform.preScale(
xScale
, \
yScale
,
zScale
)
member(
whichCastmember
).
node
.transform.preScale(
vector
)
Description
3D transform command; applies a scale prior to the existing positional, rotational, and scaling
effects of the given transform.
Node
may be a reference to a model, group, light, or camera.
Example
Line 1
of the following Lingo creates a duplicate of Moon1’s transform. Remember that access to a
model’s transform property is by reference.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...