Papervision3D 2.0 (GreatWhite) is continuously developing and there are many functions that are added almost weekly. In April, was inaugurated on the developer blog ( http://dev.papervision3d.org/ ), however, the 2.0 release has not yet been released OFFICIALLY is often difficult to snatch the true potential. One of the recent innovations introduced, however, is the new object BasicView an environment that creates 3D with very few lines of code. It is enough to create this object to have on hand scene, viewport and bedroom in one fell swoop.
Normally you had to manually create the basic objects to make a scene:
1 2 3 4 5 6 7 8 9 10 11 | / * ** @ Name: initPapervision () ** @ Description: example of initializing Papervision3D before GreatWhite * / initPapervision ( ) : void { initPapervision protected function (): void { ; viewport = new Viewport3D (); viewport ) ; addChild (viewport); ; Scene3D scene = new (); ; Room Camera3D = new (); ; BasicRenderEngine renderer = new (); } |
Now just use:
1 2 3 4 5 6 7 8 | / * ** @ Name: initPapervision () ** @ Description: example of initializing with Papervision3D GreatWhite * / initPapervision ( ) : void { initPapervision protected function (): void { 640 , 480 , false , true ) ; bv = new BasicView (640, 480, false, true); bv ) ; addChild (bv); } |
From BasciView you can access all objects that were previously created manually, for example:
1 2 3 4 5 6 7 8 | ... zoom = 2 ; bv. room. zoom = 2; ... addChild ( photo1 ) ; bv. scenes. addChild (photo1); ... target = mytarget ; bv. cameraAsCamera3D. MyTarget target =; ... ; bv. singleRender (); |










There are no comments for this post
Leave a comment