package { import sandy.materials.attributes.LightAttributes; import sandy.materials.attributes.LineAttributes; import sandy.materials.attributes.PhongAttributes; import sandy.materials.attributes.MaterialAttributes; import sandy.materials.attributes.GouraudAttributes; import sandy.materials.ColorMaterial; import sandy.materials.Appearance; import jiglib.physics.RigidBody; /** * The application is a basic test of the TestBench. * * @author petit@petitpub.com */ public class BounceBall extends TestBench { /** * Set up the test bench and create the experiment */ public function BounceBall(){ super(); createObjects(); } /** * Create the objects for this experiment * Here a bouncing ball */ private function createObjects():void { var attributes:MaterialAttributes = new MaterialAttributes( new LightAttributes(true)); var ballMaterial:ColorMaterial = new ColorMaterial(0xAA1200, 1, attributes); ballMaterial.lightingEnable = true; var sphere2:RigidBody = physics.createSphere("sphere", new Appearance( ballMaterial ), 20, 10, 10); sphere2.x = -100; sphere2.y = 300; sphere2.z = -100; sphere2.mass = 5; sphere2.restitution = 1; } } }