428
Line 17
calls the
build
command to construct the mesh.
nm = member("Shapes").newMesh("pyramid",6 , 5, 0, 3)
nm.vertexList = [ vector(0,0,0), vector(40,0,0), \
vector(40,0,40), vector(0,0,40), vector(20,50,20) ]
nm.colorList = [ rgb(255,0,0), rgb(0,255,0), rgb(0,0,255) ]
nm.face[1].vertices = [ 4,1,2 ]
nm.face[2].vertices = [ 4,2,3 ]
nm.face[3].vertices = [ 5,2,1 ]
nm.face[4].vertices = [ 5,3,2 ]
nm.face[5].vertices = [ 5,4,3 ]
nm.face[6].vertices = [ 5,1,4 ]
nm.face[1].colors = [3,2,3]
nm.face[2].colors = [3,3,2]
nm.face[3].colors = [1,3,2]
nm.face[4].colors = [1,2,3]
nm.face[5].colors = [1,3,2]
nm.face[6].colors = [1,2,3]
nm.generateNormals(#flat)
nm.build()
nm = member("Shapes").newModel("Pyramid1", nm)
See also
newModelResource
newModel
Syntax
member(
whichCastmember
).newModel(
newModelName
\
{,
whichModelResource
} )
Description
3D command; creates a new model in the referenced cast member. The
newModelName
must be
unique, as the command fails if a model by that name already exists. All new models have their
resource property set to void by default. You can use the optional second parameter to specify a
model resource to create the model from.
Examples
This statement creates a model called New House within the cast member 3D World.
member("3D World").newModel("New House")
Alternatively, the model resource for the new model can be set with the optional
whichModelResource
parameter.
member("3D World").newModel("New House", member("3D \
World").modelResource("bigBox"))
Summary of Contents for DIRECTOR MX-LINGO DICTIONARY
Page 1: ...Lingo Dictionary Macromedia Director MX...
Page 756: ...Index 756...