2026-02-28 05:12:18 +00:00
|
|
|
# OpenPencil
|
Initial commit: Tauri + CanvasKit + React editor scaffold
- Tauri v2 desktop shell with 1280x800 window
- CanvasKit WASM (Skia) rendering via WebGL2
- Scene graph with typed nodes (Frame, Rectangle, Ellipse, Line, etc.)
- Skia renderer with fills, strokes, rounded corners, opacity, rotation
- Selection system with resize handles
- Undo/redo manager (inverse command pattern with batching)
- Bottom toolbar (Select, Frame, Rect, Ellipse, Line) matching Figma UI3
- Left layers panel, right properties panel
- Pan (scroll), zoom (Ctrl+scroll toward cursor)
- Keyboard shortcuts: V/F/R/O/L for tools, Cmd+Z undo, Backspace delete
- 5 demo shapes rendered on canvas
2026-02-27 12:48:29 +00:00
|
|
|
|
2026-02-28 05:12:18 +00:00
|
|
|
Open-source, AI-native design editor. Figma alternative built from scratch with full .fig file compatibility.
|
Initial commit: Tauri + CanvasKit + React editor scaffold
- Tauri v2 desktop shell with 1280x800 window
- CanvasKit WASM (Skia) rendering via WebGL2
- Scene graph with typed nodes (Frame, Rectangle, Ellipse, Line, etc.)
- Skia renderer with fills, strokes, rounded corners, opacity, rotation
- Selection system with resize handles
- Undo/redo manager (inverse command pattern with batching)
- Bottom toolbar (Select, Frame, Rect, Ellipse, Line) matching Figma UI3
- Left layers panel, right properties panel
- Pan (scroll), zoom (Ctrl+scroll toward cursor)
- Keyboard shortcuts: V/F/R/O/L for tools, Cmd+Z undo, Backspace delete
- 5 demo shapes rendered on canvas
2026-02-27 12:48:29 +00:00
|
|
|
|
2026-02-28 05:12:18 +00:00
|
|
|
> **Status:** Active development. Not ready for production use.
|
Initial commit: Tauri + CanvasKit + React editor scaffold
- Tauri v2 desktop shell with 1280x800 window
- CanvasKit WASM (Skia) rendering via WebGL2
- Scene graph with typed nodes (Frame, Rectangle, Ellipse, Line, etc.)
- Skia renderer with fills, strokes, rounded corners, opacity, rotation
- Selection system with resize handles
- Undo/redo manager (inverse command pattern with batching)
- Bottom toolbar (Select, Frame, Rect, Ellipse, Line) matching Figma UI3
- Left layers panel, right properties panel
- Pan (scroll), zoom (Ctrl+scroll toward cursor)
- Keyboard shortcuts: V/F/R/O/L for tools, Cmd+Z undo, Backspace delete
- 5 demo shapes rendered on canvas
2026-02-27 12:48:29 +00:00
|
|
|
|
2026-02-28 05:12:18 +00:00
|
|
|
## Features
|
|
|
|
|
|
2026-02-28 05:14:28 +00:00
|
|
|
- **Figma .fig file import** — open native Figma files directly
|
|
|
|
|
- **Figma clipboard** — copy/paste between OpenPencil and Figma
|
|
|
|
|
- **Vector networks** — complex boolean shapes and open paths, like Figma
|
|
|
|
|
- **Auto-layout** — constraint-based layout matching Figma behavior
|
|
|
|
|
- **Pen tool** — bezier curves with tangent handles
|
|
|
|
|
- **Inline text editing** — multi-line text with Inter font
|
|
|
|
|
- **Undo/redo** — all operations are undoable
|
|
|
|
|
- **Snap guides** — edge and center snapping
|
|
|
|
|
- **Color picker** — HSV, hue/alpha sliders, hex input
|
2026-02-28 05:12:18 +00:00
|
|
|
|
|
|
|
|
## Tech Stack
|
|
|
|
|
|
|
|
|
|
| Layer | Tech |
|
|
|
|
|
|-------|------|
|
|
|
|
|
| UI | Vue 3, VueUse, Reka UI |
|
|
|
|
|
| Styling | Tailwind CSS 4 |
|
2026-02-28 05:14:28 +00:00
|
|
|
| Rendering | Skia (CanvasKit WASM) |
|
2026-02-28 05:12:18 +00:00
|
|
|
| Layout | Yoga WASM |
|
2026-02-28 05:14:28 +00:00
|
|
|
| File format | Kiwi binary (vendored) + Zstd + ZIP |
|
2026-02-28 05:12:18 +00:00
|
|
|
| Color | culori |
|
|
|
|
|
| Desktop | Tauri v2 |
|
2026-02-28 05:14:28 +00:00
|
|
|
| Testing | Playwright (visual regression), bun:test (unit) |
|
2026-02-28 05:12:18 +00:00
|
|
|
| Tooling | Vite 7, oxlint, oxfmt, typescript-go |
|
|
|
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
bun install
|
2026-02-28 05:14:28 +00:00
|
|
|
bun run dev
|
2026-02-28 05:12:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Scripts
|
|
|
|
|
|
2026-02-28 05:14:28 +00:00
|
|
|
| Command | Description |
|
|
|
|
|
|---------|-------------|
|
|
|
|
|
| `bun run dev` | Dev server at http://localhost:1420 |
|
|
|
|
|
| `bun run build` | Production build |
|
|
|
|
|
| `bun run check` | Lint + typecheck |
|
|
|
|
|
| `bun run test` | E2E visual regression |
|
|
|
|
|
| `bun run test:update` | Regenerate screenshot baselines |
|
|
|
|
|
| `bun run test:unit` | Unit tests |
|
|
|
|
|
| `bun run tauri dev` | Desktop app (requires Rust) |
|
|
|
|
|
|
2026-02-28 07:05:25 +00:00
|
|
|
## Desktop App
|
2026-02-28 05:14:28 +00:00
|
|
|
|
2026-02-28 07:05:25 +00:00
|
|
|
Requires [Rust](https://rustup.rs/), the Tauri CLI, and platform-specific prerequisites ([Tauri v2 guide](https://v2.tauri.app/start/prerequisites/)).
|
2026-02-28 05:14:28 +00:00
|
|
|
|
2026-02-28 05:12:18 +00:00
|
|
|
```sh
|
2026-02-28 07:05:25 +00:00
|
|
|
cargo install tauri-cli --version "^2"
|
|
|
|
|
bun run tauri dev # Dev mode with hot reload
|
|
|
|
|
bun run tauri build # Production build
|
2026-02-28 05:14:28 +00:00
|
|
|
bun run tauri build --target universal-apple-darwin # macOS universal
|
2026-02-28 05:12:18 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-28 05:14:28 +00:00
|
|
|
Cross-compilation to other platforms requires their respective toolchains or CI (e.g. GitHub Actions).
|
|
|
|
|
|
2026-02-28 05:12:18 +00:00
|
|
|
## Project Structure
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
src/
|
|
|
|
|
components/ Vue SFCs (canvas, panels, toolbar, color picker)
|
|
|
|
|
composables/ Canvas input, keyboard shortcuts, rendering
|
|
|
|
|
stores/ Editor state (Vue reactivity)
|
|
|
|
|
engine/ Scene graph, renderer, layout, clipboard, undo, vector, snap
|
2026-02-28 05:14:28 +00:00
|
|
|
kiwi/ Figma file format (Kiwi codec, .fig import)
|
|
|
|
|
kiwi-schema/ Vendored from evanw/kiwi
|
|
|
|
|
types.ts Shared types
|
|
|
|
|
constants.ts UI colors, defaults, thresholds
|
2026-02-28 05:12:18 +00:00
|
|
|
desktop/ Tauri v2 (Rust + config)
|
|
|
|
|
tests/
|
2026-02-28 05:14:28 +00:00
|
|
|
e2e/ Playwright visual regression
|
|
|
|
|
engine/ Unit tests
|
2026-02-28 05:12:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
MIT
|