Divine.js is a next-generation, high-performance design tool built from the ground up with WebGPU, delivering native-level performance for professional graphic workflows directly in your browser.
Status: This project is under active development. We're building the future of web-based design tools.
Traditional web design tools hit performance ceilings with Canvas 2D or WebGL. Divine.js breaks through these limits by leveraging WebGPU, offering:
- GPU-Powered Everything - Rendering, filtering, compositing - all accelerated
- Real-Time Performance - Smooth 60fps+ editing even with complex 4K+ documents
- Professional Format Support - Work directly with industry-standard files
- Framework Agnostic - Pure WebGPU, no heavy dependencies
Import and edit professional design files directly:
| Format | Status | Notes |
|---|---|---|
| PNG/JPEG/WebP | โ Full Support | Hardware-accelerated decoding |
| SVG | โ Full Support | GPU-accelerated vector rendering |
| โ Supported | Vector & raster content extraction | |
| PSD | โ Supported | Layer preservation & blending modes |
| AI | Via export conversion (see notes) |
Note on AI files: Native
.aiparsing is challenging. We recommend exporting to SVG/PDF from Illustrator for best results.
- Unified WebGPU Pipeline - Single render path for all content types
- SDF Text Rendering - Crisp typography at any scale
- Instanced Drawing - Thousands of objects, minimal draw calls
- Compute Shaders - Real-time filters & effects
- Worker-Based Decoding - Never block the UI thread
- Texture Atlasing - Minimize GPU state changes
- Hierarchical Culling - Only render what's visible
- Incremental Updates - Smart re-rendering
- Bรฉzier curve manipulation
- Boolean operations
- Path simplification
- Live shape tools
- Full layer stack
- Blending modes
- Layer effects
- Grouping & masking
- Rich text formatting
- OpenType features
- Text on path
- Variable font support
src/
โโโ core/ # WebGPU render engine
โ โโโ renderer/ # Core rendering pipeline
โ โโโ resources/ # GPU resource management
โ โโโ scene/ # Scene graph implementation
โโโ importers/ # File format processors
โ โโโ raster/ # PNG/JPEG/WebP
โ โโโ vector/ # SVG/PDF
โ โโโ professional/ # PSD/AI
โโโ tools/ # Editor tools
โ โโโ selection/ # Selection & transform
โ โโโ vector/ # Pen, shape tools
โ โโโ text/ # Text editing
โโโ ui/ # Editor interface
โโโ utils/ # Shared utilities
- Browser with WebGPU support (Chrome 113+, Edge 113+, Safari 17+)
- Node.js 18+ & npm/yarn/pnpm
# Clone the repository
git clone https://github.com/canzoneyu/divine.git
cd divine
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildimport { DesignEditor } from "Divine";
// Initialize with a canvas element
const editor = new DesignEditor({
canvas: document.getElementById("editor-canvas"),
backgroundColor: "#ffffff",
resolution: 2, // Retina support
});
// Load a design file
await editor.loadFile("design.psd");
// Export your work
const pngData = await editor.exportToPNG();
const svgData = await editor.exportToSVG();# Install dependencies
npm install
# Start development server with hot reload
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Generate documentation
npm run docs| Script | Purpose |
|---|---|
npm run dev |
Start development server |
npm run build |
Build production bundle |
npm run test |
Run test suite |
npm run benchmark |
Run performance benchmarks |
npm run lint |
Code quality check |
| Operation | Divine.js | Canvas 2D | Improvement |
|---|---|---|---|
| 1000 Layer Render | 16ms | 120ms | 7.5x |
| Gaussian Blur | 4ms | 45ms | 11x |
| SVG Complex Render | 8ms | 65ms | 8x |
| Text Rendering (10k chars) | 3ms | 85ms | 28x |
Benchmarks run on MacBook Pro M2, Chrome 120
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- โ Core WebGPU renderer
- โ๏ธ SVG/PDF importers
- ๐ PSD/AI support
- ๐จ UI/UX polish
- ๐ฑ Mobile optimization
This project is licensed under the MIT License - see the LICENSE file for details.
- The WebGPU Working Group
- Adobe for format documentation
- Contributors and testers
- v0.5.0 - Core rendering engine stable
- v0.8.0 - Complete vector editing suite
- v1.0.0 - Full PSD/AI support
- v1.5.0 - Plugin ecosystem
- v2.0.0 - Collaborative editing
Built with โค๏ธ for the future of web design.
Star this repo to follow our progress!