You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
© 2012 Tizen Project, a Linux Foundation Project. All Rights Reserved. Linux is a registered trademark of Linus Torvalds. Tizen is a registered trademark of The Linux Foundation. * Other names and brands may be claimed as the property of others. Except as noted, this content is licensed under Creative Commons Attribution 3.0. For details, see the Content License.
Box2dWebの世界へようこそ! 今回から数回に渡って、私の備忘録も兼ねてenchant.jsでBox2dWebを利用する手順を書いてゆこうと思います。 先日も書いた通り、enchant.jsには@kassy708さんが作成されたbox2d.enchant.jsがpluginとして提供されています。しかしこのプラグインがサポートしているのは、静的・動的オブジェクト同士の衝突のみであり、もうひとつのキモであるジョイントについてはサポートされていません。 ここでは、直接Box2dWebを利用し、ジョイントの動作を楽しむにはどうしたらいいかをまとめてゆきたいと思います。 物理エンジンのプログラミングは以下のような流れになります。 1.物理演算を行う空間を用意する 2.オブジェクトを空間内に配置する 3.演算を行う 4.画面に結果を反映させる 3〜4の繰り返し まずは下準備。 index.htm
Google developer advocate Seth Ladd has quietly but consistently been producing an excellent series of articles on his blog about a JavaScript port of Box2D, the physics engine used in Angry Birds. Box2D is written and maintained by its original author, Erin Catto. Erin, who works for Blizzard Entertainment, built the library for a physics tutorial at GDC back in March 2006. Erin Catto is a bit of
「Box2D」はもともとC++で開発された2次元空間の物理演算エンジンです[*1]。重力と物体の質量や摩擦、弾性にもとづく位置と動きの物理計算を行い、シミュレーションしてくれます。ActionScript 3.0やJava、C#、Pythonなど、さまざまな言語に移植されています。JavaScriptのライブラリとしても、いくつか公開されてきました。その中でも対応するバージョンが新しく、解説も整っているBox2dWebを使ってみましょう。 01 物理空間と剛体を定める 物理演算エンジンというのは、物体の位置や動きの数値計算をするだけで、オブジェクトの座標を変えたりはしません。つまり、エンジンがいくら演算を進めても、コンテンツの見た目は止まったままです。演算結果をオブジェクトの座標に与えて、初めてアニメーションとして動きます。 物理演算のシミュレーションをする前に、定めておかなければならない
iio.js is a framework for HTML5 Canvas
Learn how to setup and use the JS port of Box2D for physics. CreateJS integration will be covered in part 2.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く