
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
.
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...