07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADOBE DIRECTOR BASICS<br />

3D: Controlling appearance<br />

A visualization of how the extrude3D() command approximates a curved line from a series of straight lines<br />

Geometry<br />

The origin point of the extruder resource is at the bottom left corner of the front face. The width and height of the<br />

resource, in world units, is approximately equal to the width and height of the image of the text, in pixels, after<br />

trimming away all the white space around the edges.<br />

For example, if the text fits into a bounding box with a width of 100 pixels and a height of 64 pixels, the extruder<br />

resource fits into a bounding box that is approximately 100 units wide 64 units high. The length of the extruder<br />

resource depends on its tunnelDepth property (see below).<br />

Here is a Lingo command that you can execute to check this. Launch the 3dExtruder.dir movie and then execute this<br />

command in the Message window:<br />

-- Lingo syntax<br />

do "vImage = member(3).image.trimWhiteSpace()"&RETURN&"put #trimmedImage, vImage.width,<br />

vImage.height"&RETURN&"vBox = GetBoundingBox(member(1).model(1))"&RETURN&"put #boundingBox,<br />

integer(vBox.maxX - vBox.minX), integer(vBox.maxY - vBox.minY)"<br />

-- #trimmedImage 155 75<br />

-- #boundingBox 157 75<br />

The 3dExtruded.dir movie uses the Get Bounding Box script to determine the smallest possible box that fits around<br />

the extruder model. It then creates a group to act as the parent of the extruder model, and places this parent group at<br />

the center of the bounding box. If you rotate the parent group, the extruder model rotates around its center.<br />

Extruder properties<br />

Extruder resources have five properties that you can get and set:<br />

extruderResource.smoothness: An integer value between 1 and 10. This determines how many points are used to<br />

approximate the curved lines between the fixed points. A value of 1 means that only the fixed point is used. The<br />

default value is 5, meaning that 4 additional points are added along the curve.<br />

“Particles” on page 197tunnelDepth: A floating point value between 1.0 and 100.0. The default value is 50.0. This<br />

determines the distance in world units between the front and back faces of the extruded model.<br />

Last updated 8/26/2011<br />

168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!