User Guide
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.