
342
Chapter 16: Working with Models and Model Resources
Mesh generator methods
Use these methods to work with mesh primitives:
Particle system properties
Particle systems are unique among model resources in that they include animation by default.
Particle systems, whose
type
is
#particle
, can have an almost infinite variety of appearances,
simulating fire, smoke, running water, and other streaming or bursting effects.
Use these properties to work with particle systems:
Method
Description
Returns
build()
Builds the mesh according to the current property
values. (The mesh construction properties specified
in the previous table have no effect until
build()
is called.)
Generates a script error if any properties specify an
invalid list.
Nothing
generateNormals
(
style
)
Generates a new normal for every vertex in every
triangle. The
style
parameter can be
#flat
, so that
each triangle is clearly delineated, or
#smooth
. The
method assumes that all triangles were specified in a
clockwise order.
Nothing
Property
Access
Description
Value Range
lifetime
Get and set
Lifetime of all particles emitted, in
milliseconds.
Positive integer. The
default is
10.000
ms.
colorRange.
end
Get and set
Color value of a particle at the end
of its life.
Any color value. The
default is
color(255,
255, 255)
.
colorRange.
start
Get and set
Color value of a particle at the start of its
life.
Any color value. The
default is
color(255,
255, 255)
.
tweenMode
Get and set
The variation of a particle’s color
throughout its life. The change can be
based on either velocity or age.
#velocity
:
Alter particle color
between
colorRange.
start
and
colorRange.
end
based on velocity.
#age:
Alter particle color
between
colorRange.start
and
colorRange.end
based on the
particle’s lifetime.
sizeRange.
start
Get and set
The size of a particle at the start of its life. Positive integer.
The default is
1
.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...