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
290
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
23
指紋認証でsshログイン
izawa
0
150
展示会に出展してみた
izawa
0
100
エアコンの操作についての話
izawa
0
430
SlackにZoomの使用状況を表示したい
izawa
0
130
Kindleページめくり君 Ver.2
izawa
0
150
災害グッズとして見たときのキャンプ用品
izawa
0
210
アレクサがカメラ女子になった日
izawa
0
220
2019年上半期のキャンプお買い物ベスト8
izawa
0
240
Other Decks in Programming
See All in Programming
Elm Form Validation
bkuhlmann
0
510
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
180
Goのエラースタックトレースの歴史と今後
sonatard
9
1.5k
Ruby Pattern Matching
bkuhlmann
0
930
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Apache Hive 4 on Treasure Data
ryukobayashi
0
340
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
340
Git Lint
bkuhlmann
4
750
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
250
Goのmultiple errorsについて (2024年4月版)
syumai
4
920
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Happy Clients
brianwarren
92
6.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
Docker and Python
trallard
34
2.7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
2
1.3k
Unsuck your backbone
ammeep
663
57k
Rails Girls Zürich Keynote
gr2m
91
13k
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༵