Tuesday, December 1, 2009

Perspective Projection

The PerspectiveProjection class provides an easy way to assign or modify the perspective transformations of a display object and all of its children. Once you create a PerspectiveProjection in Flex, you can set the projection to the canvas using the following code. 



/ / Change the perspective 
var pp: PerspectiveProjection = new PerspectiveProjection ();
pp.projectionCenter = new Point( this.width/2 , this.height/2); 
/ / Set the center pp.projectionCenter = new Point (this.width / 2, this.height / 2);
pp.fieldOfView = 1; pp.fieldOfView = 1;
myScene.transform.perspectiveProjection = pp; myScene.transform.perspectiveProjection = pp;
 
More References are here...

Perspective Projection 


Working in 3D with Flash Player 10 / Action Script 3

View the demo 






No comments: