Papervision3D: BasicView

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 in order to have available the scene, and the viewport room 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 initialization of Papervision3D before greatwhite
* /
initPapervision ( ) : void { initPapervision protected function (): void {
; viewport = new Viewport3D ();
viewport ) ; addChild (viewport);
; Scene3D scenes = new ();
; Camera3D room = new ();
; BasicRenderEngine renderer = new ();
}

Now just use:

1
2
3
4
5
6
7
8
/ *
** @ Name: initPapervision ()
** @ Description: Example of initialization of Papervision3D with 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 the 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 ();