Ad
1: 2015-06-13 (土) 17:05:44 njf ソース バックアップ No.1 を復元して編集 現: 2015-06-14 (日) 01:09:31 njf ソース 編集
Line 1: Line 1:
-Starlingで画像を表示するにはImageを使う。+Starlingで画像を表示するにはImageを使う。ゲーム制作などで最も使う描画オブジェクトである。
テクスチャやビットマップから作成可能。 テクスチャやビットマップから作成可能。
 var image:Image = new Image(assets.getTexture(IMG_NAME));  var image:Image = new Image(assets.getTexture(IMG_NAME));
- + image.x = 10; 
- var texture:Texture = Texture.fromBitmap(new YourBitmap()); + image.y = 20; 
 + yourSprite.addChild(image); 
 + 
ドローコールを減らすために出来るだけテクスチャアトラスから取得した方が良い。 ドローコールを減らすために出来るだけテクスチャアトラスから取得した方が良い。
Line 44: Line 45:
 var filterRed:ColorMatrixFilter = new ColorMatrixFilter();  var filterRed:ColorMatrixFilter = new ColorMatrixFilter();
 filterRed.tint(0xFF0000, 0.8);  filterRed.tint(0xFF0000, 0.8);
 + 
 var redBlock:Image = new Image(blockTexture);  var redBlock:Image = new Image(blockTexture);
 redBlock.filter = filterRed;  redBlock.filter = filterRed;
 + 
色の変更については[[こちら:http://wiki.starling-framework.org/tutorials/modifying_the_color_of_an_image]]を参照のこと。 色の変更については[[こちら:http://wiki.starling-framework.org/tutorials/modifying_the_color_of_an_image]]を参照のこと。


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 3030, today: 3, yesterday: 1
MenuBar
広告

ログイン

ユーザー名:


パスワード:





パスワード紛失

Portuguese | English | German | Greek | Japanese | Korean | Russian | T-Chinese top
NJF