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
軽率にVue 3で リアルタイム3Dアプリを作れる ライブラリを作ってみた/vue-with-...
Search
にー兄さん
March 06, 2024
Programming
2.5k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
軽率にVue 3で リアルタイム3Dアプリを作れる ライブラリを作ってみた/vue-with-3d-app
v-tokyoにてLT登壇した資料です
にー兄さん
March 06, 2024
More Decks by にー兄さん
See All by にー兄さん
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
94
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
650
ついにAuraも登場したのでJetpack XR SDKについて今一度語りたい / i wanna talk about xreal aura
drumath2237
0
53
『Ground Truth: How We Create Geometrically Accurate Reconstructions (Niantic Spatial Blog)』 を読む / read Ground Truth: How We Create Geometrically Accurate Reconstructions
drumath2237
0
88
この時代に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
710
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
950
XRエンジニアの視点から XRのイマと社会実装の実現について考える / thinking-about-xr-popularization
drumath2237
0
100
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
220
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1.3k
sbt 2.0: takeoff
eed3si9n
0
170
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
380
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
Kotlinの15年とServer-Side Kotlin
n_takehata
1
170
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
110
Domain-Driven Transformation
hschwentner
2
2.3k
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
110
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1.1k
Modernizing iOS Apps
seyfoyun
0
120
JIS keyboard support in Omarchy
lef237
0
160
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
The Cult of Friendly URLs
andyhume
79
7k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Everyday Curiosity
cassininazir
0
370
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Curse of the Amulet
leimatthew05
3
16k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Transcript
軽率にVue 3で リアルタイム3Dアプリを作れる ライブラリを作ってみた にー兄さん(@ninisan_drumath) Vue.js v-tokyo Meetup #19
にー兄さん(@ninisan_drumath) ソフトウェアエンジニア 株式会社ホロラボ / Iwaken Lab. / Babylon.js勉強会 お仕事ではUnityを使ったxR開発がメイン 趣味ではBabylon.jsをよく触る
うちの猫たち→
本日の話 Vue.js × 3DCG(Babylon.js)
本日の話 Vue.js × 3DCG(Babylon.js) Web3D, Babylon.js面白そう と思ってもらえると嬉しいです
アジェンダ - VueでWeb3Dがしたい! - BabyuewJSの紹介 - おわりに
VueでWeb3Dがしたい!
Webブラウザ上でのリアルタイム3DCG ここでのWeb3Dとは、WebGL(WebGPU)を使って リアルタイムレンダリングによって3Dシーンを扱うこと 昨今のブラウザやデバイスの進化によって Web上でもリッチなグラフィクスを実現できるように フレームワークとしてThree.jsが一番有名 本日の主役はBabylon.js (Babylon.jsはいいぞ!!)
JSフレームワークと3D連携 pmndrs/react-three-fiber - React + Three.js - Reactのコンポーネントとして3Dシーンを扱える - GitHub
starは25.5K Tresjs/tres - Vue + Three.js - 同じくVueコンポーネントとして3Dシーンを扱える - アプデ頻度も高くドキュメントもしっかししていてすごい
TresJSがイケてる <script setup> import { TresCanvas } from '@tresjs/core' </script>
<template> <TresCanvas clear-color=”#82DBC5” window-size> <TresPerspectiveCamera /> <TresMesh @click=”onClick” > <TresBoxGeometry :args="[1, 1, 1]" /> <TresMeshNormalMaterial /> </TresMesh> </TresCanvas> </template> 公式サイトからコードを引用https://tresjs.org/
TresJSがイケてる <script setup> import { TresCanvas } from '@tresjs/core' </script>
<template> <TresCanvas clear-color=”#82DBC5” window-size> <TresPerspectiveCamera /> <TresMesh @click="onClick" > <TresBoxGeometry :args="[1, 1, 1]" /> <TresMeshNormalMaterial /> </TresMesh> </TresCanvas> </template> 公式サイトからコードを引用https://tresjs.org/ どんなオブジェクトがあるのか パッと見でわかりやすい propsにリアクティブな オブジェクトをバインドできる
BabyuewJSの紹介
BabyuewJS概要 α版をGitHub・npmで公開中 https://github.com/drumath2237/BabyuewJS モチベーション: Vue × Babylon.jsなフレームワークを作ってみたい 実現したいこと: Babylon.jsによる3Dシーンの構築を Vueコンポーネントを使って実現したい
素のBabylon.jsのコード import { Engine, MeshBuilder, Scene } from "@babylonjs/core"; const
main = () => { const renderCanvas = document.querySelector<HTMLCanvasElement>("#renderCanvas"); if (!renderCanvas) { return; } const engine = new Engine(renderCanvas); const scene = new Scene(engine); scene.createDefaultCameraOrLight(true, true, true); MeshBuilder.CreateBox("box", { size: 0.2 }); window.addEventListener("resize", () => engine.resize()); engine.runRenderLoop(() => scene.render()); }; main(); canvasを取得し、 engineやsceneを初期化して サイズ0.2のCubeを表示する
BabyuewJSのコード <template> <BabyuewScene antialias> <ArcRotateCamera name="camera" :alpha="Math.PI / 3" :beta="Math.PI
/ 3" :radius="0.5" :target="[0, 0.05, 0]" > </ArcRotateCamera> <DirectionalLight name="light" :direction="[0.25, -1, -0.6]" :intensity="1" ></DirectionalLight> <Box name="my-box" :position="[0, 0.05, 0]" :size="0.1"> </Box> </BabyuewScene> </template> Sceneコンポーネントの子に カメラ、ライト、Boxがある
まだ機能は不十分......。 - 現状まだ簡単な形状やライトなどを置くことしかできない - ???「たぶん動くと思うからリリースしようぜ」 - コンポーネントの追加実装をしていきたい - コード自動生成ができるといいかもしれない -
GitHub Projectsを公開しています - https://github.com/users/drumath2237/projects/9
技術的な詳細について 前回の技術書典15で本を出していますので もしよければ... https://techbookfest.org/product/4tAihHPnGQ9wL6nAMZ1s91?productVariantID=j EN8uRgQmjPELRjF4KQ2tw 気になる部分あれば お気軽にお声がけください!
おわりに
Vue ❤ 3D
参考 drumath2237/BabyuewJS https://github.com/drumath2237/BabyuewJS 『Vue3 + Babylon.jsなOSSライブラリをリリースするまでの開発録』 https://techbookfest.org/product/4tAihHPnGQ9wL6nAMZ1s91?productVariantID=jEN8uRgQmjPELRjF4KQ2tw 開発時に使っていた作業ログ( Zenn) https://zenn.dev/drumath2237/scraps/c32dde3c04deba
TresJS https://tresjs.org/ React Three Fiber Documentation https://docs.pmnd.rs/react-three-fiber/getting-started/introduction