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
AR 世界を Web 化するには / ar-web
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
tarukosu
December 05, 2020
Programming
690
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AR 世界を Web 化するには / ar-web
tarukosu
December 05, 2020
More Decks by tarukosu
See All by tarukosu
HoloLens と Power Platform / HoloLens and Power Platform
tarukosu
0
580
ホロラボでの HoloLens アプリ開発技術 / App Development at HoloLab
tarukosu
1
3.7k
Other Decks in Programming
See All in Programming
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
120
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
300
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.3k
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
140
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
330
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
120
Press start. Python's next generation.
willingc
PRO
3
300
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
440
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
120
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
For a Future-Friendly Web
brad_frost
183
10k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Ruling the World: When Life Gets Gamed
codingconduct
0
320
Side Projects
sachag
455
43k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Talk to Developers About Accessibility
jct
2
540
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Everyday Curiosity
cassininazir
0
310
Design in an AI World
tapps
1
300
Transcript
Copyright© HoloLab Inc. 2020 All rights reserved 1 AR 世界を
Web 化するには 株式会社ホロラボ Researcher 古田裕介 たるこす(@tarukosu)
近い将来、一般ユーザーが空間に紐づいたコンテンツを投稿し、 スマートフォンやグラス型デバイスを使って閲覧するようなサービス が普及するのではないか SNS: その場所で投稿されたメッセージや写真が見られる レビューサービス: 目の前の店の評価が見られる
3D データとテキストやノードベースのプログラムをユーザーが アップロードし、他のユーザーが表示することができるサービスも 増えるのではないか VRChat のようなイメージ
個人開発のARアプリも増えてくるはず
こうなってほしい ・別々のサービスが提供しているコンテンツを同時に表示したい ・ユーザーが作成したデータやスクリプトはいろいろなアプリケーショ ンで表示できてほしい(特定のサービス専用になってほしくない) ・コンテンツ側で自由にプログラムが書ける Web における ブラウザと Web ページのような仕組みが必要
課題 ・プロトコル、フォーマットが標準化されていない ・スクリプトの動的ローディングをどう実現するか Web AR 世界の Web ネットワークプロトコル HTTP HTTP
? コンテンツ HTML ? スクリプト JavaScript WebAssembly (wasm) ? 3D モデル GLB ? WebAssembly はWebブラウザ上で動作する低水準言語 ブラウザ外(サーバアプリ、クライアントアプリ)での利用のための標準化も行われている
プロトタイプを作ってみた Copyright© HoloLab Inc. 2020 All rights reserved 7
UniWasm WebAssembly が Unity アプリ上で動けば、 スクリプトの動的ローディングが実現できるのでは https://github.com/tarukosu/UniWasm Web UniWasm ネットワークプロトコル
HTTP HTTP コンテンツ HTML XML [独自フォーマット] スクリプト JavaScript WebAssembly (wasm) WebAssembly (wasm) 3D モデル GLB [予定]
コンテンツ 構成図 Copyright© HoloLab Inc. 2020 All rights reserved 9
WebAssembly (wasm) XML A-Frame (ブラウザ) Unity Rust AssemblyScript ノードエディタ
コンテンツ定義 独自フォーマットの XML <body> <primitive type="cube"> <script src="./translate_x.wasm"/> </primitive> <element
position.x="3"> <primitive type="cube"> <script src="./circular_motion.wasm"/> </primitive> </element> </body> 動作を定義した WebAssembly 立方体を配置
WebAssembly でオブジェクトを動かす仕組み Copyright© HoloLab Inc. 2020 All rights reserved 11
WebAssembly (wasm) WebAssembly では、外部で定義した関数の呼び出しや、 外部から WebAssembly 側の関数の呼び出しが可能 アプリケーション内 のコード Update (毎フレーム呼び出される) GetPosition (オブジェクト位置の取得) SetPosition (オブジェクト位置を更新)
Rust による動作定義 Update 関数内で毎フレームのオブジェクトの移動を実装 circular_motion.rs translate_x.rs
ブラウザで動作するノードエディタ Copyright© HoloLab Inc. 2020 All rights reserved 13 export
declare function transform_set_local_position(x: f32, y: f32, z: f32): void; ... export function update(): void { const number1num = 1.2 as f32; const number2num = -1 as f32; const number3num = 3 as f32; const number4num = 0.01 as f32; ... ノード定義を AssemblyScript に変換し、 WebAssembly にコンパイル
Unity での動作デモ
A-Frame での動作デモ Copyright© HoloLab Inc. 2020 All rights reserved 15
まとめ • WebAssembly を使うことで、スクリプトの動的ローディングが行えた • WebAssembly を介することで、コンテンツ側で利用できる言語の幅 が広がり、また、実行できるプラットフォームの幅も広がる • 今後は
WebAssembly 側のコードで通信ができるようにしたい Copyright© HoloLab Inc. 2020 All rights reserved 16