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
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
270
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
690
Site Reliability Engineering for GMO
pyama86
8
1k
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
26
8.2k
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
230
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
320
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
Code Reviews
bkuhlmann
4
890
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
180
Goのmultiple errorsについて (2024年4月版)
syumai
3
670
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
How GitHub (no longer) Works
holman
304
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Web development in the modern age
philhawksworth
202
10k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
A designer walks into a library…
pauljervisheath
200
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
40
4.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
What the flash - Photography Introduction
edds
64
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
24
2k
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༵