User Guide
The 3D Cast Member, 3D Text, and 3D Behaviors 459
Textures
Textures are 2D images that are drawn on the surface of a 3D model. Textures can be assigned to
models in your 3D modeling software, or you can use any bitmap cast member in your movie.
The following commands and properties can be used to perform basic texture operations:
newShader
(name,type)
Creates a new shader and adds it to the shader
object list. The type can be #standard, #painter,
#engraver, or #newsprint.
Returns a new shader object with a
unique name. If the name isn’t
unique, returns a Lingo error.
deleteShader
(name)
Deletes the shader named name. Lingo references
to this shader persist but can do nothing.
TRUE (1) if the shader named
name exists. FALSE (0) if the
shader named name
doesn’t exist.
deleteShader
(index)
Deletes the shader with the given index number.
Lingo references to this shader persist but can
do nothing.
TRUE (1) if the shader with this
index number exists. FALSE (0) if
the shader with this index number
doesn’t exist.
Command Function Returns
texture.count Returns the number of textures in the texture object
list of the cast member.
Integer.
texture
(name) Returns the texture object named name. Returns the texture object named
name if it exists. Returns void if the
object does not exist.
texture
[index] Returns the texture at the designated position in the
index. The index number can change if textures are
added or deleted.
Returns the texture object at that
index number if it exists. Returns
void if the object does not exist at
that index number.
newTexture
(name, type, source)
Creates a new texture named name.
The
type can have the following values:
#fromCastmember
#fromImageObject
If type is #from Castmember, source is a cast
member reference. For example,
member(“concrete”) or member[2,3]
If type is #from ImageObject, source is a Lingo
image object.
Returns a new texture object with a
unique name. If the name isn’t
unique, returns a Lingo error.
deleteTexture
(name)
Deletes the texture named name. Lingo references
to this texture persist but can do nothing.
TRUE (1) if the texture named
name exists. FALSE (0) if the
texture named name
doesn’t exist.
deleteTexture
(index)
Deletes the texture with the given index number.
Lingo references to this texture persist but can do
nothing.
TRUE (1) if the texture with this
index number exists. FALSE (0) if
the texture with this index number
doesn’t exist.
Command Function Returns