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
Playing With JAX
Search
Yukimitsu Izawa
August 19, 2012
Programming
340
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Playing With JAX
Lightning talk material.
Yukimitsu Izawa
August 19, 2012
More Decks by Yukimitsu Izawa
See All by Yukimitsu Izawa
マイコン内蔵フルカラーLEDを ピカピカ光らせるぞ!
izawa
0
26
3Dプリンター未経験者が初めてプリントできた道のり
izawa
0
46
Rubyで守る我が家の安心: IoTセンサ ーネットワーク『ゆきそっく』の実践
izawa
0
280
KVM-Mをつくったはなし
izawa
1
160
RubyでXDPプログラミング
izawa
0
87
軽くて強い素材を求めて(DCFのススメ)
izawa
2
200
指紋認証でsshログイン
izawa
0
480
展示会に出展してみた
izawa
0
270
エアコンの操作についての話
izawa
0
950
Other Decks in Programming
See All in Programming
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
360
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
600
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
260
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
360
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
520
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
590
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
340
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
520
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
290
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
410
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
900
Six Lessons from altMBA
skipperchong
29
4.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
410
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
360
Transcript
2012.08.18 Kanazawa.rb #1 Playing with JAX Yukimitsu Izawa 128݄19༵
What’s JAX ✤ JAX is a development framework ✤ for
JavaScript-driven WebGL applications ✤ JAX has MVC architecture ✤ JAX lives with RoR source tree ✤ app/assets/jax/{controllers,models,views,etc.} 128݄19༵
What’s WebGL ✤ WebGL(Web Graphics Library) is a JavaScript API
✤ for rendering 3D/2D graphics within any compatible Web browser ✤ for more info. ✤ http://www.khronos.org/webgl/ 128݄19༵
Hands on! 128݄19༵
Teatime ✤ Initialize Gemfile: gem ’jax’, ’>=2.0’ % bundle %
rails generate jax:install or % gem install jax % jax new demo 128݄19༵
Teatime ✤ Generate % jax generate scaffold teapot % jax
generate light sun directional % jax generate light candle point 128݄19༵
Teatime ✤ Code (Controller) app/assets/jax/controllers/ teapot_controller.js.coffee @world.addObject Teapot.find "actual" @world.addLightSource
"sun" @world.addLightSource "candle" 128݄19༵
Teatime ✤ Code (Model) app/assets/jax/models/ teapot.js.coffee after_initialize: -> @mesh =
new Jax.Mesh.Teapot size: this.size material: "teapot" update: () -> @camera.rotate 0.05, [0,1,0] 128݄19༵
Teatime ✤ Code (teapot’s resources) app/assets/jax/resources/teapots/ actual.resource size: 1.0 position:
x: 0 y: 0 z: -5 128݄19༵
Teatime ✤ Code (candle’s resources) app/assets/jax/resources/light_sources/ candle.resource position: x: -1.2
y: -1.2 z: -4.0 color: ambient: red: 1.0 green: 0.2 blue: 0.2 128݄19༵
Teatime ✤ run % jax server (access localhost:3000 with browser)
128݄19༵
Teatime ✤ You can see, Pink Rotation Teapot :) 128݄19༵
References ✤ Getting Started with JAX ✤ http://guides.jaxgl.com/getting_started.html ✤ JAX
Source Code in Github ✤ https://github.com/sinisterchipmunk/jax ✤ Forum ✤ http://blog.jaxgl.com/forum/jax-group1/jax-forum1/ ✤ API ✤ http://guides.jaxgl.com/api/js/index.html 128݄19༵