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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
560
ホロラボでの HoloLens アプリ開発技術 / App Development at HoloLab
tarukosu
1
3.7k
Other Decks in Programming
See All in Programming
初めてのKubernetes 本番運用でハマった話
oku053
0
130
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
400
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
霧の中の代数的エフェクト
funnyycat
1
410
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.8k
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
290
フィードバックで育てるAI開発
kotaminato
1
120
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Balancing Empowerment & Direction
lara
6
1.2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
The SEO Collaboration Effect
kristinabergwall1
1
510
AI: The stuff that nobody shows you
jnunemaker
PRO
8
830
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
370
The Invisible Side of Design
smashingmag
301
52k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
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