Skip to content

Instantly share code, notes, and snippets.

@nyakuro
Last active December 26, 2015 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyakuro/484477e684868d4f7b07 to your computer and use it in GitHub Desktop.
Save nyakuro/484477e684868d4f7b07 to your computer and use it in GitHub Desktop.
Snow Particles(CreateJS / canvas / javascript)
var data = {
"images": ["assets/particle_snow_sprite.png"], //画像のパス
"frames": [[0, 0, 100, 100], [100, 0, 100, 100], [200, 0, 100, 100],[300, 0, 100, 100],[400, 0, 100, 100],[500, 0, 100, 100],[600, 0, 100, 100],[700, 0, 100, 100],], //0~7番のフレームの切り出し位置を設定
"animations": {
"bright0":{ //アニメーション名(任意)
frames: [3, 0, 1, 0, 0, 1, 1, 0, 2], //表示するフレームの順番を定義 上の画像の 3->0->1-> ...のように画像が切り替わっていきます。
speed: 1 / 4, //フレームの切り替わる速度の定義
},
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment