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
3
300
Playing With JAX
Lightning talk material.
Yukimitsu Izawa
August 19, 2012
Tweet
Share
More Decks by Yukimitsu Izawa
See All by Yukimitsu Izawa
軽くて強い素材を求めて(DCFのススメ)
izawa
1
67
指紋認証でsshログイン
izawa
0
230
展示会に出展してみた
izawa
0
140
エアコンの操作についての話
izawa
0
590
SlackにZoomの使用状況を表示したい
izawa
0
160
Kindleページめくり君 Ver.2
izawa
0
190
災害グッズとして見たときのキャンプ用品
izawa
0
260
アレクサがカメラ女子になった日
izawa
0
270
2019年上半期のキャンプお買い物ベスト8
izawa
0
290
Other Decks in Programming
See All in Programming
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
440
フロントエンドの現在地とこれから
koba04
10
4.7k
Vue :: Better Testing 2024
up1
1
420
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
0
300
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1.1k
The future of development – Are our jobs getting harder or easier?
hollycummins
1
190
Програмиране с Rust, ФМИ, 2024
nikolads
0
120
いかにして不足・不整合なくデータ移行したか
tjmtmmnk
1
850
Memory API: Patterns, Use Cases, and Performance
josepaumard
2
200
テスト駆動開発✅️
akitoshiga
1
170
学生の時に開催したPerl入学式をきっかけにエンジニアが組織に馴染むために勉強会を主催や仲間と参加して職能間の境界を越えていく
ohmori_yusuke
2
330
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
410
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Optimizing for Happiness
mojombo
375
69k
Why Our Code Smells
bkeepers
PRO
334
57k
We Have a Design System, Now What?
morganepeng
50
7.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
GitHub's CSS Performance
jonrohan
1030
450k
A Philosophy of Restraint
colly
203
16k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.5k
How GitHub (no longer) Works
holman
311
140k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Writing Fast Ruby
sferik
626
60k
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༵