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
Enchant your website with VFX-JS
Search
Amagi
August 29, 2024
Technology
0
150
Enchant your website with VFX-JS
Presentation at VanJS, 2024-08-28.
https://lu.ma/gykjonp2?tk=5KKH7K
Amagi
August 29, 2024
Tweet
Share
More Decks by Amagi
See All by Amagi
How to hack VS Code: evil ways (Japanese)
fand
5
3.7k
READY FOR THE BATTLE? -Introduction to Live Coding-
fand
1
580
GLSL PostEffect in TouchDesigner
fand
2
2.1k
VEDA GLSL Livecoding workshop
fand
2
5.4k
PWA 方法 無料 今すぐ
fand
3
1.5k
Have you ever heard GPUs cry?
fand
2
3.9k
Real World GLSL
fand
0
300
APIs for VJ-ing
fand
1
7.1k
Style your Components with styled-component!
fand
1
850
Other Decks in Technology
See All in Technology
Claude Code 2026年 最新アップデート
oikon48
12
9.8k
Lambda Web AdapterでLambdaをWEBフレームワーク利用する
sahou909
0
120
Shifting from MCP to Skills / ベストプラクティスの変遷を辿る
yamanoku
4
840
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
210
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
AI実装による「レビューボトルネック」を解消する仕様駆動開発(SDD)/ ai-sdd-review-bottleneck
rakus_dev
0
130
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
450
堅牢.py#2 LT資料
t3tra
0
140
非情報系研究者へ送る Transformer入門
rishiyama
11
7.5k
Abuse report だけじゃない。AWS から緊急連絡が来る状況とは?昨今の攻撃や被害の事例の紹介と備えておきたい考え方について
kazzpapa3
1
670
フロントエンド刷新 4年間の軌跡
yotahada3
0
160
組織全体で実現する標準監視設計
yuobayashi
3
490
Featured
See All Featured
Paper Plane
katiecoart
PRO
0
48k
Facilitating Awesome Meetings
lara
57
6.8k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
71
[SF Ruby Conf 2025] Rails X
palkan
2
830
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Code Reviewing Like a Champion
maltzj
528
40k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
A Tale of Four Properties
chriscoyier
163
24k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
310
Transcript
VanJS 2024-08-28 Enchant your website with
Hi👋 I’m Amagi • Freelance Web Developer • Web, Unity,
TouchDesigner…. • Loves VJ / LiveCoding
Working for InVideo AI https://ai.invideo.io/
I love VJ / LiveCoding
None
None
None
None
None
WebGL?
WebGL • Graphics API for Web (= OpenGL for Web)
• Web site, Game, Generative Art, Demoscenes…. • GPGPU (AI / ML, Physics simulation, etc)
WebGL is powerful, but… • WebGL API is too low-level
• Three.js solves many problems, but.. • Still have to set up Camera, Renderer, Scene, Texture…. • Loading / Unloading resources are HARD!!
None
None
None
https://amagi.dev/vfx-js/
Shader?
Shader is for shading
Fragment Shader • Special program that runs on GPU •
Fragment shader determines pixel colors •It runs for every pixel, every frame!!! • FullHD 60Hz -> 124,416,000 times / sec
https://images.nvidia.com/aem-dam/Solutions/Data-Center/l4/nvidia-ada-gpu-architecture-whitepaper-v2.1.pdf NVIDIA RTX4090
None
Shaders can be used for image effects Input image Output
image
GLSL - OpenGL Shading Language
Sinewave effect
How VFX-JS works
What VFX-JS does under the hood… • Load <img> /
<video> as a WebGL texture • Add 3D planes to the element positions • Sync with the original <img> / <video> • Apply shader effects
Syncing 3D planes to HTML elements • Cover entire window
with a WebGL canvas
Syncing 3D planes to HTML elements • Cover entire window
with a WebGL canvas • Sync element position / size to 3D planes
Syncing 3D planes to HTML elements • Cover entire window
with a WebGL canvas • Sync element position / size to 3D planes • Hide the original HTML elements
Syncing 3D planes to HTML elements • Cover entire window
with a WebGL canvas • Sync element position / size to 3D planes • Hide the original HTML elements
None
Text effects…? • Text can’t be loaded as a texture
in WebGL • VFX-JS converts DOM elements to SVG image • SVG’s <foreignObject>
None
None
None
Limitations • Deeply nested DOM tree • Can’t use Web
fonts…!!
None
None
None
Try VFX-JS now! https://codepen.io/fand/pen/ZENvdEM
REACT-VFX
None
The Book of Shaders
Tutorial by kishimisu
Check the website! https://amagi.dev/vfx-js