Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / l...
Search
にー兄さん
October 24, 2026
Programming
17
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
Vue Fes Japan 2026でLT登壇した資料です
https://vuefes.jp/2026/speaker/drumath2237
にー兄さん
October 24, 2026
More Decks by にー兄さん
See All by にー兄さん
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
620
ついにAuraも登場したのでJetpack XR SDKについて今一度語りたい / i wanna talk about xreal aura
drumath2237
0
50
『Ground Truth: How We Create Geometrically Accurate Reconstructions (Niantic Spatial Blog)』 を読む / read Ground Truth: How We Create Geometrically Accurate Reconstructions
drumath2237
0
86
この時代にOSS開発に向き合ってみる / face the oss development in this era
drumath2237
0
69
プログラマの職能が代替可能になりつつあるこの時代でプログラムと向き合う修行を積む / dedicating myself to the discipline of programming
drumath2237
0
140
個人的3D Gaussian Splattingニュースをご紹介 / sharing 3d gaussian splatting news
drumath2237
0
690
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
940
XRエンジニアの視点から XRのイマと社会実装の実現について考える / thinking-about-xr-popularization
drumath2237
0
100
軽率にプログラミング言語のシンタックスについて考えてみよう / lets-think-about-programming-lang-syntax
drumath2237
0
150
Other Decks in Programming
See All in Programming
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
34k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
360
ActionController meets Protocol Buffers
sorah
0
660
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
150
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
140
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
130
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
パスワード再設定メールのURLについて知っておこう
uyuki234
0
170
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
2
1.2k
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
We Have a Design System, Now What?
morganepeng
55
8.4k
New Earth Scene 8
popppiees
4
2.7k
Writing Fast Ruby
sferik
630
63k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Being A Developer After 40
akosma
92
590k
Transcript
Web3Dライブラリを作って Vue Custom Renderer の 仕組みを理解しよう にー兄さん@ninisan_drumath Vue Fes Japan
2026
にー兄さん ソフトウェアエンジニア@HoloLab inc. Babylon.js勉強会運営 Iwaken Lab. Microsoft MVP for Developer
Technologies (2024~) 好きな技術 Babylon.js / WebXR Device API / Android XR / 3D Gaussian Splatting @ninisan_drumath @drumath2237 @drumath2237.bsky.social
本日の資料は撮影・SNS共有OKです📸 (公開予定)
本日のお話 最近Custom Rendererを用いた3Dラッパライブラリを作っていた なんとなくCustom Rendererの有志の情報があんまりなさそう → 共有してみよう TresJSなどがどのような仕組みを使っているのか 気になる方に刺さると嬉しい
サンプルプロジェクト https://github.com/drumath2237/vue-custom3d-renderer-sandbox https://github.com/drumath2237/vue-customrenderer-playground
アジェンダ 1. Custom Rendererと Web3Dライブラリについて 2. Custom Rendererによる 3Dシーンの実装 3.
おわりに
Custom Rendererと Web3Dライブラリについて
Vue Custom Rendererとは Vue SFCで構造的なデータを作成・表現できる仕組み @vue/runtime-core で提供されている機能 実際に @vue/runtime-dom ではDOMに対するRendererを実装
DOM以外のデータに対しても自作のRendererが作れる 例) PDF文書 TUI Webメール 設定データ
3Dのシーンもヒエラルキ構造を成す 3Dのシーンにはカメラやライト、 メッシュやエフェクトなどが存在 オブジェクト同士は親子関係を構築できる (Web)3Dライブラリは 手続き的な処理によってこれを実現 Custom Rendererでラップすれば 宣言的に記述可能になりそう Babylon
Liteによるシーン実装例 const engine = await createEngine(renderCanvas) const scene = createSceneContext(engine) const camera = createDefaultCamera(scene) attachControl(camera, renderCanvas, scene) const light = createDirectionalLight([1, -1, 1]) addToScene(scene, light) const box = createBox(engine, 1) const material = createStandardMaterial() box.material = material addToScene(scene, box) const sphere = createSphere(engine) sphere.parent = box await registerScene(scene) await startEngine(engine)
Custom Rendererによる 3Dシーンの実装
createRenderer()でRendererの作成 createRenderer 関数の型定義 createRenderer<HostNode, HostElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>; Rendererを作成してレンダー処理を開始 const
renderer = createRenderer(nodeOps) アプリ全体で を使う場合 // Custom Renderer const app = renderer.createApp(rootComponent) createApp(app).mount('#app') 特定コンポーネントの を として扱う場合 // or slots Custom Renderer renderer.render(rootComponent, rootContainer)
RendererOptionsの実装 createRenderer() が引数に 取るオプション 独自定義のElement/Nodeの動作を定 義するメインの部分 慣習的に nodeOps という名前で定義 される事が多い
RendererOptionsの定義必須の関数たち const nodeOps: RendererOptions = { createElement(type, namespace, isCustomizedBuiltin, props) {...}, createComment(text) {...}, createText(text) {...}, insert(element, parentNode) {...}, nextSibling(node) {...}, parentNode(node) {...}, patchProp(element, key, prevValue, nextValue) {...}, remove(node) {...}, setElementText(node, text) {...}, setText(node, text) {...}, }
要素の作成フローと親子関係の構築(1/3) <SceneVue> <Box> <Material /> <Sphere> <Material /> </Sphere> <Box>
<Material /> </Box> </Box> </SceneVue> 右のようなElementの構造になる
要素の作成フローと親子関係の構築(2/3) <SceneVue> <Box> <Material /> <Sphere> <Material /> </Sphere> <Box>
<Material /> </Box> </Box> </SceneVue> createElement が呼ばれて Elementを作成しておく この時に親子関係などはいったん置いておき、オブ ジェクト単体を作成 ツリーが走査される過程で行きがけ順に呼ばれる
要素の作成フローと親子関係の構築(3/3) <SceneVue> <Box> <Material /> <Sphere> <Material /> </Sphere> <Box>
<Material /> </Box> </Box> </SceneVue> Elementが作成されたら insert が呼ばれる parentのElementがわかるので、ここで親子関係を 構築すると良さそう ツリーが走査される過程で帰りがけ順に呼ばれる
実際のレンダリング結果 <SceneVue> <DirectionalLight :direction="vec3(-0.5, -1, 1)" /> <Box :position="vec3(0, 0.5,
0)" :size="0.5"> <Material :color="{ r: 1, g: 0, b: 0 }" /> <Sphere :diameter="0.3" :position="vec3(0.5, 0, 0)"> <Material :color="{ r: 1, g: 1, b: 1 }" /> </Sphere> <Box :position="vec3(0, -0.5, 0)" :size="0.5"> <Material :color="{ r: 0, g: 0, b: 1 }" /> </Box> </Box> </SceneVue>
おわりに
おわりに DOM以外の表現をしたいときの強力なツールだと感じた Custom Rendererを通してVueのレンダリングの仕組みに興味を持てた HostElement/HostNodeの設計はちょっと迷うなぁ
参考文献 Custom Renderer API https://vuejs.org/api/custom-renderer.html @vue/runtime-dom(github) https://github.com/vuejs/core/tree/main/packages/runtime-dom Building a Vue
3 Custom Renderer(youtube) https://www.youtube.com/playlist?list=PLC2LZCNWKL9b876nPMVULEyBzkVoH8B7n vue-pdf-renderer-demo https://github.com/lmiller1990/vue-pdf-renderer-demo/tree/article-final