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
Hideyuki Takeuchi
May 22, 2017
Programming
0
540
WhitestormJSを触ってみた
2017/05/22 のThree.js入門者LT大会の資料です。
WhitestormJSを本当に触ってみただけのプレゼンです。
Hideyuki Takeuchi
May 22, 2017
Tweet
Share
More Decks by Hideyuki Takeuchi
See All by Hideyuki Takeuchi
Ktorで認証付きMCPサーバーを作ってみる
chimerast
0
86
Exposed 応用編 〜内部実装 と 魔拡張〜
chimerast
3
2.1k
Delegatesと拡張関数・拡張プロパティその合わせ技
chimerast
0
790
Kotlin Coroutines と Ktor HTTP Client で作るスケールするタスク実行
chimerast
1
2k
UZABASE創業期から10年いるエンジニアから見た「BtoB SaaSのUI/UXってなんだろう?」
chimerast
1
910
暗号通貨の鍵を安全に管理するアーキテクチャを作ってみようとしている話
chimerast
0
440
この素晴らしい Vue.js に祝福を!
chimerast
16
11k
RxJava + Vert.x + jOOλ で Microservice的な何かを作ってみた
chimerast
0
2.8k
40億レコード以上のSPEEDA大規模データを超高速に表示するElasticsearch活用法
chimerast
1
4.1k
Other Decks in Programming
See All in Programming
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
530
AI & Enginnering
codelynx
0
110
SourceGeneratorのススメ
htkym
0
190
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
3
190
CSC307 Lecture 09
javiergs
PRO
1
830
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
240
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
120
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
110
CSC307 Lecture 05
javiergs
PRO
0
490
CSC307 Lecture 01
javiergs
PRO
0
680
Featured
See All Featured
Claude Code のすすめ
schroneko
67
210k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
170
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
Prompt Engineering for Job Search
mfonobong
0
160
Scaling GitHub
holman
464
140k
We Have a Design System, Now What?
morganepeng
54
8k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
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