This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#本を参考にIKを作っていきます。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Cannon.jsで物理演算Demo2 | |
[こちらの記事を参考](http://www56.atwiki.jp/threejs/pages/85.html)に、勉強のためにちょっと手を加えたものです。 | |
また、[質量などの設定はこれを参考](http://stackoverflow.com/questions/16424500/what-would-be-realistic-values-for-gravity-mass-and-contact-material-in-canno)にしました。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CSS3DRenderer使ってみました | |
あまり複雑なモデルなどは表現できませんが、ちょっとした形のものとか | |
立体感のある演出、くらいなら問題なく使えそうです。 | |
Cannon.jsと組み合わせてサイコロを振ったような演出を作ってみました。 | |
CSSレンダリングなのでもちろんiPhoneでも動きます。 | |
画面をクリックすることで、サイコロを追加することができます。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#パシフィック・リムのイェーガーのモデルデータが配布されていたのでThree.jsで読み込ませてみた。 | |
[更新履歴] | |
* [2013.08.27] 視点を変えてダイナミックに見えるように修正。 | |
* [2013.08.26] Walkアニメーションをちょっとだけ最適化。ビル群モデルを追加。 | |
* [2013.08.24] BlenderのIKを使ってアニメーションをつけてみた。だいぶぎこちないけどw | |
TrackballControlsを使ってカメラの位置をマウスから操作できるようにした。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Three.js x CSS3DRendererでサイコロ | |
今回は投げたサイコロにカメラを追従させて、 | |
実際に出た目を確認できる仕様にしてみました。 | |
[2013.08.29] サイコロを何度でも振れるよう修正。 | |
[2013.08.27 追記] サイコロの目をプログラム側で識別できるよう修正。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ジプシー・デンジャーを歩けるようにしていきます。 | |
まずはキー押下時に歩くモーション、なにもしていないときは待機モーションになるようにしました。 | |
モデルの移動方向については、ヨモツ先生のこちらを参考にしました → http://yomotsu.github.io/threejs-examples/tps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ホーミングレーザーを作ってみる | |
Unity本を参考にホーミングレーザーを作ってみました。 | |
実装はレーザーの進行方向を判断したのち、回転させる角度を係数によって制御すること。 | |
例えば、レーザーの進行方向からみて50度の位置に敵がいた場合に、 | |
そのまま50度分の回転をさせるのではなく、係数をかけて徐々に角度になるように制御する。 | |
ただ、係数が一定だと延々と敵の周りを回り続ける場合があるので、 | |
時間が経つにつれて係数の度合いを変化させ、いずれはしっかりと敵に向かうようにするところがポイント。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#簡易なポップアップウィンドウを実装する | |
比較的シンプルなポップアップウィンドウを実装します。 | |
できることはYES/NOボタンの配置、コンテンツとタイトルの変更、タイトル部分ドラッグでの移動のみです。 | |
こちらは記事用サンプルです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#WebP Converter | |
なんかよさげなコンバータがなかったのでJSで作ってみた。 | |
Chrome限定だけど、そもそもWebP見れるブラウザ限定なので問題ないかな。 | |
今のところ、WebPからPNGに変換して自動的にダウンロードが開始されます。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Easing playground | |
イージングの仕方のチェックするためのツール。 | |
イージング関数の中身を書き、現在の位置を返す関数を作ればイージングが実行されます。 | |
渡される引数は初期位置(a)と終了位置(b)、そして現在の時間(0 〜 1)です。 |