YAIMO BLOG
会津の大食いFlasher!! WordPress, iPhone, Progression, FlashDevelop他
particleMaterialのBitmapバージョン
BitmapParticleMaterial -> ParticleMaterial を継承
A Particle material that is made from BitmapData object

参考:http://wonderfl.net/code/0688c09a8c7f1400f72b89ffdf41954bb1284ed9

BitmapParticleMaterial(bitmap:BitmapData)




こんな感じに使えばおk

private var field:ParticleField;
var mat2:BitmapParticleMaterial = new BitmapParticleMaterial(target.bitmapData );
//mat2.doubleSided = true;
field = new ParticleField(mat2, 50, 1, 1000, 1000, 1000);



Read the rest of the entry »


Tags:
BitmapData.perlinNoiseのperlinNoiseを知っておくと今後のパーティクルにとっても役に立つらしい。
まだわからないけどw


[勉強]perlinNoiseを動かす(の解説を初級者がしてみる)


ここがとてもいい解説。



Pointはaddした方が遅い気がしなくもない。PerlinNoiseおもたいなぁw
より軽くするために精進します。

Read the rest of the entry »


Tags: , ,
BitmapData.draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null,
blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void

ブログ拝見してて、このエントリーみておれもコレやりたい!っておもってたんでBitmapDataの勉強にやってみました!
最初はRectangleでもできる?の?って思ってRectangleでやってみたけど、スマートにできない感なのですっぱりやめて
もとのmatrixを使っての方法で。

一枚の画像を分轄してそれをパーティクルのように移動させるには?

  1. MatrixとRectangleの基準点はdraw(Displayobject)で読み込んだソースの基準点になるので注意が必要。

  2. Matrixで変形後 -> colorTransformで色を変えて -> Rectangleで切り取るというイメージ

  3. 切り取りなどはちゃんと int 整数で切り取って扱う事、じゃないとサンプルのように線が見えてしまう。


Read the rest of the entry »


Tags: , , ,
いまさらながらMatrixをやってみようかと。。一応何となくやってたのですが、
そろそろちゃんと覚えようかと。。BitmapData.draw()の引数にMatrixがあるので覚えておくべき!
これも全部BitmapとParticleのため!がんばるぞ

Matrixについての基本的な考えとかは、以下のエントリーがGood


それで色々注意した方がいいことは、

Read the rest of the entry »


Tags: , , ,
カラーの勉強第2段!!次はColorTransformについて勉強!
ColorTransformについて、ColorMatrixFilterはあくまでフィルター、ColorTransformはプロパティ
プロパティ->詳細->拡張効果の所と同じ場所。
ColorTransformにはややこしい所があって。
DisplayObjectのColorTransformとBitmapDataのColorTransformのでは設定の仕方と具合が少し違うという点

    DisplayObjectのColorTransform

  1. DisplayObject.transform.colorTransform=colorTransformで代入

  2. ColorTransform(1, 1, 1, 1, 0, 0, 0, 0) でDisplayObjectの元の色に戻すことは可能
    BitmapDataのColorTransform

  1. colorTransform(rect:Rectangle, colorTransform:ColorTransform):void
    colorTransform() メソッドによるビットマップイメージの特定領域のカラー値を調整

  2. ColorTransform(1, 1, 1, 1, 0, 0, 0, 0) で色に戻すことは不可能

以下のデモは、DisplayObjectとBitmapDataに対して、
ColorTransform(0.5, 0.5, 0.5)を適用したもの(以下コードのコメントアウト適用した場合)
ColorTransform(0.5, 0.5, 0.5)を適用した後に、new ColorTransform(1, 1, 1)を行い色を元に戻そうとしたもの(コードのコメントアウトを取った場合)
以下コードのコメントアウト適用した場合
以下コードのコメントアウトを取った場合

【ColorMatrixFilterとColorTransformはどっちが速い?】

ColorTransformの方がはやい!!


Read the rest of the entry »


Tags: , ,
Bitmap と Particleの勉強すれば、なんだって怖いものはなくなるようなきがする。。
だからちょっとづつ勉強をしようと決起。苦手意識があるMatrixとかColorTransformとかを
がんばって覚えよう!

ParticleにはBitmapの操作、フィルター、最適化、色の操作がきっとキモだと思う。

手始めにColorMatrixFilterを勉強。

flash.filters.ColorMatrixFilter

むっちゃわかりやすい!!Matrixが少し怖くなくなった。



Read the rest of the entry »


Tags: , ,

Powered by Wordpress
Theme © 2005 - 2009 FrederikM.de
BlueMod is a modification of the blueblog_DE Theme by Oliver Wunder