Revision: 12431
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 13, 2009 14:58 by allnatural
Initial Code
package com { import org.papervision3d.lights.PointLight3D; import org.papervision3d.view.BasicView; import org.papervision3d.objects.primitives.Sphere; import org.papervision3d.materials.shaders.PhongShader; import org.papervision3d.materials.shadematerials.PhongMaterial; import org.papervision3d.core.proto.MaterialObject3D; public class View3D extends BasicView { private var light:PointLight3D; private var phongMaterial:MaterialObject3D; public function View3D() { super(); createSomeObjectsOnTheScene(); this.startRendering(); } public function createSomeObjectsOnTheScene():void { phongMaterial = new PhongMaterial(light, 0x6654FF, 0x060433, 150); light = new PointLight3D(); light.x = 1000; light.y = 5000; light.z = -6000; scene.addChild(light); var tSphere:Sphere = new Sphere(phongMaterial, 50, 10, 10); scene.addChild(tSphere); } } }
Initial URL
Initial Description
Basic 3D View Class, puts a light & sphere on the stage.
Initial Title
Papervision3D View3D Class
Initial Tags
Initial Language
ActionScript 3