チェンジセット 3560
- コミット日時:
- 2010/03/16 00:28:50 (3 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/FLARToolKit/trunk/src/examples/FLARTK_Example_SingleNyIDManager.as
r3443 r3560 46 46 import org.papervision3d.render.LazyRenderEngine; 47 47 import org.papervision3d.view.Viewport3D; 48 import org.papervision3d.objects.DisplayObject3D; 49 import org.papervision3d.typography.Font3D; 50 import org.papervision3d.materials.special.Letter3DMaterial; 51 import org.papervision3d.typography.Text3D; 52 import org.papervision3d.typography.fonts.HelveticaBold; 48 53 49 54 import org.libspark.flartoolkit.core.FLARCode; … … 110 115 111 116 private var _plane:Plane; 117 private var _textdata:Text3D; 118 private var _container:DisplayObject3D 112 119 113 120 /** … … 204 211 _markerNode = _scene.addChild(new FLARBaseNode()) as FLARBaseNode; 205 212 213 // モデル格納用のコンテナ作成 214 _container = new DisplayObject3D(); 215 206 216 // Create Plane with same size of the marker with wireframe. 207 217 // ワイヤーフレームで,マーカーと同じサイズを Plane を作ってみる。 … … 209 219 _plane = new Plane(wmat, 80, 80); // 80mm x 80mm。 210 220 _plane.rotationX = 180; 221 222 _container.addChild(_plane); 223 224 // 225 // ID表示用のデータを作成する。 226 var textFormat:Letter3DMaterial = new Letter3DMaterial(0x000000, 0.9); 227 _textdata = new Text3D("aaa", new HelveticaBold(), textFormat, "textdata") 228 _textdata.rotationX = 180; 229 _textdata.rotationZ = 90; 230 _textdata.scale = 0.5; 231 232 _container.addChild(_textdata); 233 211 234 // attach to _markerNode to follow the marker. 212 235 // _markerNode に addChild するとマーカーに追従する。 213 _markerNode.addChild(_ plane);236 _markerNode.addChild(_container); 214 237 215 238 // Place the light at upper front. … … 259 282 } 260 283 trace("[add] : ID = " + this.current_id); 284 285 // IDを表示する。 286 _textdata.text = this.current_id; 287 261 288 this._markerNode.visible = true; 262 289 }

