チェンジセット 4056: as3/FLARToolKit

差分発生行の前後
無視リスト:
コミット日時:
2010/07/07 23:44:00 (3 年前)
コミッタ:
rokubou
ログメッセージ:

FLARBaseNodeの修正とサンプルコードの修正

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/FLARToolKit/trunk/src/examples/FLARTK_Example_Single_SimpleCube_Away3DLite.as

    r3901 r4056  
    321321                         
    322322                        // 微調整 
    323                         this.view3d.scaleX = this.canvasWidth; 
    324                         this.view3d.scaleY = this.canvasHeight; 
    325 //                      this.view3d.x = this.canvasWidth/_viewportToSourceWidthRatio ; 
    326 //                      this.view3d.y = this.canvasHeight/_viewportToSourceWidthRatio; 
     323                        this.view3d.x = 0.5 * this.canvasWidth as Number; 
     324                        this.view3d.y = 0.5 * this.canvasHeight as Number; 
    327325                        this.view3d.z = 0; 
    328326                         
     
    337335                protected function createObject():void 
    338336                { 
    339                          
    340                         // ワイヤーフレームで,マーカーと同じサイズを Plane を作ってみる。 
    341                         var wmat:WireframeMaterial = new WireframeMaterial(0x0000ff); 
    342                         // 透過度を設定 
    343                         wmat.alpha = 1; 
    344                          
    345                         var _plane:Plane = new Plane(); // 80mm x 80mm。 
    346                         _plane.width = 80; 
    347                         _plane.height = 80; 
    348                         _plane.material = wmat; 
    349                          
    350337                        // Cube 
    351338                        var mat:WireColorMaterial = new WireColorMaterial(0xFF1919, 1, 0x730000); 
    352339                        var _cube:Cube6 = new Cube6( mat, 40, 40, 40); 
    353                         _cube.y = -20 
     340                        _cube.z = -20 
    354341                         
    355342                        // _container に 追加 
    356                         this.container.addChild(_plane); 
    357343                        this.container.addChild(_cube); 
    358344                } 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/support/away3d_lite/FLARBaseNode.as

    r3901 r4056  
    5050                 
    5151                public function setTransformMatrix(r:FLARTransMatResult):void { 
    52 //                      var m:Matrix3D = new Matrix3D(Vector.<Number>([ 
    53 //                                       r.m00,  r.m10,  r.m20, 0, 
    54 //                                      -r.m01, -r.m11, -r.m21, 0, 
    55 //                                      -r.m02, -r.m12, -r.m22, 0, 
    56 //                                       r.m03,  r.m13,  r.m23, 1 
    57 //                                      ])); 
    5852                        var m:Matrix3D = new Matrix3D(Vector.<Number>([ 
    5953                                         r.m00,  r.m10,  r.m20, 0, 
     54                                        -r.m01, -r.m11, -r.m21, 0, 
    6055                                        -r.m02, -r.m12, -r.m22, 0, 
    61                                          r.m01,  r.m11,  r.m21, 0, 
    6256                                         r.m03,  r.m13,  r.m23, 1 
    6357                                        ]));