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 />

Default values<br />

By default, the camera of a new #shockwave3d member is set to show a #perspective projection, with a projectionAngle<br />

of 34.5160°. This makes for a natural-looking view.<br />

v3DMember = new(#shockwave3d)<br />

vCamera = v3DMember.camera(1)<br />

put vCamera.projection<br />

-- #perspective<br />

put vCamera.projectionAngle<br />

-- 34.5160<br />

The camera's orthoHeight is already set to a default value, even if it is not yet in use:<br />

put vCamera.orthoHeight<br />

-- 200.0000<br />

A camera created by the member3D.newCamera() function has a different projectionAngle of 30° by default:<br />

vNewCamera = v3DMember.newCamera("Test")<br />

put vNewCamera.projection<br />

-- #perspective<br />

put vNewCamera.projectionAngle<br />

-- 30.0000<br />

put vNewCamera.orthoHeight<br />

-- 200.0000<br />

Examples<br />

The following example changes the projection mode of the camera of sprite(“3D”) to #perspective and sets the<br />

camera's projectionAngle to 30°:<br />

-- Lingo<br />

vCamera = sprite("3D").camera<br />

vCamera.projection = #perspective<br />

vCamera.projectionAngle = 30.0 -- degrees<br />

// JavaScript<br />

vCamera = sprite("3D").camera;<br />

vCamera.projection = symbol("perspective");<br />

vCamera.projectionAngle = 30.0; // degrees<br />

The following example changes the projection mode of the camera of sprite(“3D”) to #orthographic and sets the<br />

camera's orthoHeight to 200:<br />

-- Lingo<br />

vCamera = sprite("3D").camera<br />

vCamera.projection = #orthographic<br />

vCamera.orthoHeight = 200.0 -- world units<br />

// JavaScript<br />

vCamera = sprite("3D").camera;<br />

vCamera.projection = symbol("orthographic");<br />

vCamera.orthoHeight = 200.0; // world units<br />

Multiple cameras<br />

By default, a 3D sprite displays the view from only one camera. Every 3D member has a camera named “Default View”.<br />

The view from this camera fills the entire area of the sprite. In a 3D design application, you can create more than one<br />

camera and export it as an object in the W3D file. You can change the camera that is used to create the main view for<br />

the 3D sprite to any of these cameras.<br />

Last updated 8/26/2011<br />

103

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

Saved successfully!

Ooh no, something went wrong!