[prev in list] [next in list] [prev in thread] [next in thread] 

List:       osflash-sandy
Subject:    [Sandy] [sandy commit] r907 - in trunk/sandy/haxe/trunk/tutos:
From:       codesite-noreply () google ! com (codesite-noreply at google ! com)
Date:       2009-02-06 7:14:02
Message-ID: 000e0cd4cd4efeb35d04623ac383 () google ! com
[Download RAW message or body]

Author: cyanescent
Date: Thu Feb  5 22:30:36 2009
New Revision: 907

Removed:
    trunk/sandy/haxe/trunk/tutos/extrusion/bin/
    trunk/sandy/haxe/trunk/tutos/extrusion/obj/AdvancedLibrary.old
Modified:
    trunk/sandy/haxe/trunk/tutos/dice_demo/Dice.hx
    trunk/sandy/haxe/trunk/tutos/dice_demo/dice.hxml
    trunk/sandy/haxe/trunk/tutos/example09/desertshapes.hxml
    trunk/sandy/haxe/trunk/tutos/example24/BasketBall.hx

Log:
Changes to accommodate 0.4 release. Javascript is still
too experimental to be used in examples.



Modified: trunk/sandy/haxe/trunk/tutos/dice_demo/Dice.hx
==============================================================================
--- trunk/sandy/haxe/trunk/tutos/dice_demo/Dice.hx	(original)
+++ trunk/sandy/haxe/trunk/tutos/dice_demo/Dice.hx	Thu Feb  5 22:30:36 2009
@@ -12,6 +12,7 @@
  import sandy.events.SandyEvent;
  import sandy.parser.IParser;
  import sandy.parser.Parser;
+import sandy.parser.ColladaParser;
  import sandy.parser.ParserEvent;
  import flash.display.Sprite;
  import sandy.view.ViewPort;
@@ -19,6 +20,7 @@
  import flash.Lib;


+
  class Dice extends Sprite
  {

@@ -41,10 +43,14 @@
      private function loadCollada()
      {

-        var parser: IParser = Parser.create( "../assets/dice.dae",  
Parser.COLLADA );
-		untyped( parser.addEventListener( ParserEvent.FAIL, onError ) );
-        untyped( parser.addEventListener( ParserEvent.INIT, create3d ) );
+        var parser: ColladaParser = Parser.create( "./dice.dae",  
Parser.COLLADA );
+								parser.addEventListener( ParserEvent.FAIL, onError );
+        parser.addEventListener( ParserEvent.INIT, create3d );
+								try {
          parser.parse();
+								} catch (e:Dynamic) {
+										trace(e);
+								}

      }

@@ -60,13 +66,19 @@

      private function create3d( pEvt: ParserEvent ) : Void
      {
-
-        camera = new Camera3D( 0, 0, -10);
-        camera.viewport = new ViewPort( 320, 240 );
+        camera = new Camera3D( 0, 0, -8);
+        camera.viewport = new ViewPort( 400, 300 );
+								camera.lookAt(0,160,0);
+								camera.y = -160;

          var root:   Group = pEvt.group;

          cube = cast( root.children[ 0 ], Shape3D );
+								/*
+								cube.rotateX = 126;
+								cube.rotateY = 30;
+								cube.rotateY = 180;
+								*/

          cube.enableBackFaceCulling = true;

@@ -74,26 +86,36 @@

          scene = new Scene3D( "scene", this, camera, root );

-        addEventListener( Event.ENTER_FRAME, enterFrameHandler );
-
-        Lib.current.stage.addChild( this );
+								Lib.current.stage.addEventListener( Event.ENTER_FRAME,  
enterFrameHandler );
+        Lib.current.addChild( this );

      }


-    private function enterFrameHandler( event : Event ) : Void
+				static var count : Int = 0;
+    private function enterFrameHandler( ?event : Event ) : Void
      {

          scene.render();
+								cube.rotateY += 1;
+								/*
          cube.pan  += 1;
          cube.tilt += 1.1;
          cube.roll += 1.2;
+
+								*/
+								//if ( ++count == 1000 ) trace( flash.Lib.getTimer() );

      }


      static function main()
      {
+#if js
+						haxe.Firebug.redirectTraces();
+				neash.Lib.Init("Container", 400, 400);
+				neash.Lib.Run();
+#end

          new Dice();


Modified: trunk/sandy/haxe/trunk/tutos/dice_demo/dice.hxml
==============================================================================
--- trunk/sandy/haxe/trunk/tutos/dice_demo/dice.hxml	(original)
+++ trunk/sandy/haxe/trunk/tutos/dice_demo/dice.hxml	Thu Feb  5 22:30:36  
2009
@@ -1,6 +1,6 @@
  -cp ../../src
  -cp ../assets
--lib xpath
--lib nme
+-swf-header 500:300:1000:ffffff
  -swf9 dice.swf
--main Dice.hx
+-main Dice
+

Modified: trunk/sandy/haxe/trunk/tutos/example09/desertshapes.hxml
==============================================================================
--- trunk/sandy/haxe/trunk/tutos/example09/desertshapes.hxml	(original)
+++ trunk/sandy/haxe/trunk/tutos/example09/desertshapes.hxml	Thu Feb  5  
22:30:36 2009
@@ -1,5 +1,4 @@
  -cp ../../src
--lib xpath
  -swf9 desertshapes.swf
  -swf-lib palm.swf
  -main DesertShapes

Modified: trunk/sandy/haxe/trunk/tutos/example24/BasketBall.hx
==============================================================================
--- trunk/sandy/haxe/trunk/tutos/example24/BasketBall.hx	(original)
+++ trunk/sandy/haxe/trunk/tutos/example24/BasketBall.hx	Thu Feb  5  
22:30:36 2009
@@ -29,7 +29,7 @@
  		private var plane:Plane3D;
  		private var tg1:TransformGroup;
  		private var tg2:TransformGroup;
-		private var bounce:Sound3D;
+		private var bounce:Sound3D<Sound>;

  		private var scene:Scene3D;
  		private var camera:Camera3D;
@@ -82,7 +82,7 @@
  				sphereS.y = 0;
  				sphereS.z = 0;

-				plane = new Plane3D( "thePlane", 300, 500, 15, 15, Plane3D.ZX_ALIGNED  
);
+				plane = new Plane3D( "thePlane", 300, 500, 2, 2, Plane3D.ZX_ALIGNED );
  				plane.y = -100;
  				plane.rotateY = 0;

@@ -93,7 +93,7 @@
  				plane.enableBackFaceCulling = false;
  				plane.appearance = app2;

-				bounce = new Sound3D("bounce", sound, 1, 3, 1500);
+				bounce = new Sound3D<Sound>("bounce", sound, 1, 3, 1500);
  				bounce.type = Sound3D.SPEECH;
  				bounce.loops = 0;



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic