Esempio: Texture mapping
import flash.display.Sprite; import flash.events.Event; import org.papervision3d.view.*; import org.papervision3d.scenes.Scene3D; import org.papervision3d.cameras.Camera3D; import org.papervision3d.materials.*; import org.papervision3d.objects.primitives.*; import org.papervision3d.render.BasicRenderEngine; var viewport: Viewport3D; var scena: Scene3D; var camera: Camera3D; var renderer: BasicRenderEngine; viewport = new Viewport3D(400, 200, true, true); addChild(viewport); scena = new Scene3D(); camera = new Camera3D(); renderer = new BasicRenderEngine(); var bitmapFileMaterial = new BitmapFileMaterial("html.it.png"); bitmapFileMaterial.doubleSided = true; var piano = new Plane(bitmapFileMaterial, 400, 200, 10, 10); scena.addChild(piano); addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(e:Event):void { piano.rotationX +=.2; piano.rotationY -=1; piano.rotationZ -=0.3; renderer.renderScene(scena, camera, viewport); }