Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Playing With JAX
Search
Yukimitsu Izawa
August 19, 2012
Programming
3
330
Playing With JAX
Lightning talk material.
Yukimitsu Izawa
August 19, 2012
Tweet
Share
More Decks by Yukimitsu Izawa
See All by Yukimitsu Izawa
KVM-Mをつくったはなし
izawa
1
100
RubyでXDPプログラミング
izawa
0
52
軽くて強い素材を求めて(DCFのススメ)
izawa
1
150
指紋認証でsshログイン
izawa
0
410
展示会に出展してみた
izawa
0
220
エアコンの操作についての話
izawa
0
860
SlackにZoomの使用状況を表示したい
izawa
0
250
Kindleページめくり君 Ver.2
izawa
0
270
災害グッズとして見たときのキャンプ用品
izawa
0
340
Other Decks in Programming
See All in Programming
dnx で実行できるコマンド、作ってみました
tomohisa
0
120
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
14k
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
330
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
1.4k
Building AI with AI
inesmontani
PRO
1
460
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
250
スタートアップを支える技術戦略と組織づくり
pospome
8
14k
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
230
connect-python: convenient protobuf RPC for Python
anuraaga
0
330
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
190
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
200
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
2.1k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
68k
We Have a Design System, Now What?
morganepeng
54
7.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
Unsuck your backbone
ammeep
671
58k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Building Adaptive Systems
keathley
44
2.8k
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༵