Easy WebGL tool to animate images and videos
curtains.js is a lightweight, vanilla WebGL JavaScript library created by Martin Laxenaire that converts HTML DOM elements containing images, videos, or canvases into 3D WebGL textured planes.
The main features and capabilities of curtains.js include:
DOM-to-WebGL Mapping: Solves the challenge of aligning WebGL meshes with HTML elements by letting you define plane size and positioning directly using CSS.
Media Support: Converts standard HTML images, videos, and <canvas> elements into textured 3D WebGL planes.
Post-Processing & Render Targets: Supports post-processing shader passes, ping-pong shading, custom transform origins, and FBO swapping flowmaps for advanced visual effects.
Framework Integrations: Can be installed via npm (npm i curtainsjs) or loaded via UMD browser scripts, with official React (react-curtains) and Vue (vue-curtains) packages.
Flexible Distribution & Licensing: Released under the open-source MIT license for personal and commercial projects, weighing approximately 122KB for the minified UMD build (curtains.umd.min.js v8.1).