Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WhitestormJSを触ってみた
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hideyuki Takeuchi
May 22, 2017
Programming
550
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WhitestormJSを触ってみた
2017/05/22 のThree.js入門者LT大会の資料です。
WhitestormJSを本当に触ってみただけのプレゼンです。
Hideyuki Takeuchi
May 22, 2017
More Decks by Hideyuki Takeuchi
See All by Hideyuki Takeuchi
Ktorで認証付きMCPサーバーを作ってみる
chimerast
0
180
Exposed 応用編 〜内部実装 と 魔拡張〜
chimerast
3
2.2k
Delegatesと拡張関数・拡張プロパティその合わせ技
chimerast
0
810
Kotlin Coroutines と Ktor HTTP Client で作るスケールするタスク実行
chimerast
1
2.1k
UZABASE創業期から10年いるエンジニアから見た「BtoB SaaSのUI/UXってなんだろう?」
chimerast
1
950
暗号通貨の鍵を安全に管理するアーキテクチャを作ってみようとしている話
chimerast
0
460
この素晴らしい Vue.js に祝福を!
chimerast
16
11k
RxJava + Vert.x + jOOλ で Microservice的な何かを作ってみた
chimerast
0
2.9k
40億レコード以上のSPEEDA大規模データを超高速に表示するElasticsearch活用法
chimerast
1
4.2k
Other Decks in Programming
See All in Programming
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
590
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
280
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
360
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
5.9k
Oxcを導入して開発体験が向上した話
yug1224
4
320
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
Agentic UI
manfredsteyer
PRO
0
180
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
So, you think you're a good person
axbom
PRO
2
2.1k
From π to Pie charts
rasagy
0
210
For a Future-Friendly Web
brad_frost
183
10k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Design in an AI World
tapps
1
250
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Are puppies a ranking factor?
jonoalderson
1
3.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Transcript
WhitestormJS を触ってみた たけうち ひでゆき @chimerast @chimerast 1
注意 今回の勉強会のために WhitestormJS を 初めて触ったので 今日の発表は間違ったことを言っているかも しれないのでご容赦ください @chimerast 2
自己紹介 たけうちさんは縮退しました @chimerast 株式会社ユー ザベー ス 社内ニー ト 全方位型エンジニア G
ダライアスというSTG で3D に目覚める @chimerast 3
3D プログラミング遍歴 2000 年頃にDirectX6 で3D 横スクロー ルシュー ティングを作る Immediate Mode
というポリゴンや行列をごりごり触るやつ たまに3D のプログラムが書きたくなってOpenGL とか触る 2011 年頃Scala でMMD の旧ファイル形式のロ ー ダ& レンダラを実装してみるも、IK ボー ン、 物理演算で挫折 OpenGL with GLSL OpenGL ライブラリとしてLWJGL を使用 @chimerast 4
その昔 Three.js で作ってみたもの @chimerast 5
今日のお題: WhitestormJS @chimerast 6
@chimerast 7
なんかすごそう!! Three.js のさらに wrapper 物理演算がビルトイン! なんかReact Like にも書けるらしい → 実際のデモを見てみる
@chimerast 8
@chimerast 9
物理演算!! @chimerast 10
@chimerast 11
軟体物理!! @chimerast 12
とりあえず触ってみる npm install whs とかでかでかと書いてあるけど、webpack の設定が どう考えても大変なのでJS を直接読み込む <script src="vendor/three.js"></script>
<script src="vendor/whitestorm.js"></script> TUTORIALS の Getting Started → Hello World example に書いてあ るコー ドを試してみる @chimerast 13
@chimerast 14
なんか出力例と違う(TT) ライティングのコー ドがどう考えてもたりない @chimerast 15
いろいろやってみたけど const app = new WHS.App( new WHS.BasicAppPreset() // setup
for : // ElementModule // SceneModule // CameraModule // RenderingModule ); というプリセット設定は動作せず。 @chimerast 16
気を取り直して物理演算 @chimerast 17
ドキュメントがなくて非常に困る ビルトインと書いてありながら実は physics-module.js というものが 必要 ちなみにGitHub のmaster に上がっているものでは動作しない ついでになんだか ammo.js
というのが中でロー ドされている ammo.js は、Bullet 物理エンジンのJS 実装 この辺は、GitHub のREADME から飛べるCodepen から無理矢理推測 @chimerast 18
なんとか動いた。。。 @chimerast 19
const sphere = new WHS.Sphere({ // Create sphere comonent. geometry:
{ radius: 5, widthSegments: 32, heightSegments: 32 }, modules: [ new PHYSICS.SphereModule({ mass: 10 }) ], material: new THREE.MeshPhongMaterial({ color: 0xF2F2F2 }), position: new THREE.Vector3(0, 15, 0) }) @chimerast 20
v2-beta.8 なので今後に期待 @chimerast 21
みていて良さそうなところ モジュー ルベー スでプログラムが構成されている プリセット設定が多く、Three.js ほど複雑にならなさそう 物理演算がなんか気持ちいい プリセットの設定があらかじめ用意されている React っぽい書き方ができるモジュー
ルがあるっぽい ES6 ベー ス @chimerast 22
export class Application extends Component { render() { return (
<App modules={[ new WHS.SceneModule(), new WHS.CameraModule({ position: { z: 20 } }), new WHS.RenderingModule(), new WHS.OrbitControlsModule() ]}> <Sphere geometry={[3, 32, 32]} material={new THREE.MeshBasicMaterial({color: 0xffffff})} key="1" /> </App> ) @chimerast 23
今回時間が無くて試せなかったこと 3D モデルファイルのロー ド アニメー ションの動作確認 @chimerast 24
まとめ まだだいぶ人柱感が強い ドキュメントが追いついていないのがつらい モジュー ルでマウスコントロー ルなんかも簡単につけられる @chimerast 25