Space component

New Space component was added to make Papervision3D implementation easier.
var space:Space = new Space({id:'myScene', width:600, height:500, interactive:false}); addChild(space); var image:ImagePaper = new ImagePaper({id:'myPlane', src:'test.jpg', segmentsW:2, segmentsH:2, animated:true}); space.addPaper(image);
And there you have it, a 3D plane with an image texture on it in a 3D scene. Have even more fun with it when you use the tweening method on ImagePaper,
image.tween({scaleX:.5});
The papervision components can be accessed via publically available properties such as
  • ImagePaper.plane - Plane
  • Space.scene - Scene
  • Space.viewport - ViewPort
  • Space.camera - Camera
It is a very good idea to halt the rendering when not animating. When creating a Space component, it will start rendering automatically. After rendering your objects within a space and all objects have stopped animating call, Space.stop(), this will bring your processor consumption down from usually 200 to about 15. When an animation needs to be run again, simply call Space.start() before tweening. You can tween the objects directly, ImagePaper.tween(tweenParameters:Object), or the camera, new Tween({target:Space.camera, z:100});
VideoPaper, and FlashPaper will be coming up next!

0 comments:

Post a Comment