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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yukimitsu Izawa
August 19, 2012
Programming
3
340
Playing With JAX
Lightning talk material.
Yukimitsu Izawa
August 19, 2012
Tweet
Share
More Decks by Yukimitsu Izawa
See All by Yukimitsu Izawa
3Dプリンター未経験者が初めてプリントできた道のり
izawa
0
30
Rubyで守る我が家の安心: IoTセンサ ーネットワーク『ゆきそっく』の実践
izawa
0
220
KVM-Mをつくったはなし
izawa
1
130
RubyでXDPプログラミング
izawa
0
72
軽くて強い素材を求めて(DCFのススメ)
izawa
2
170
指紋認証でsshログイン
izawa
0
450
展示会に出展してみた
izawa
0
250
エアコンの操作についての話
izawa
0
890
SlackにZoomの使用状況を表示したい
izawa
0
260
Other Decks in Programming
See All in Programming
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.1k
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
550
Ruby x Terminal
a_matsuda
7
590
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
CSC307 Lecture 14
javiergs
PRO
0
470
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
390
AI 開発合宿を通して得た学び
niftycorp
PRO
0
100
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.6k
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
830
Windows on Ryzen and I
seosoft
0
280
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
Designing for Timeless Needs
cassininazir
0
160
How to make the Groovebox
asonas
2
2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
230
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
The agentic SEO stack - context over prompts
schlessera
0
690
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
120
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
100
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༵