RepositoryJavaScriptCHThụy Sĩ
paperjs

paperjs/paper.js

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey

15.2ksao
1.3kfork
3issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

5
TINIX TRENDING·Quốc gia: CH

#5 Repository Của Tuần

9
TINIX TRENDING·Quốc gia: CH

#9 Repository Của Tuần

2
TINIX TRENDING·Quốc gia: CH

#2 Repository Của Tháng

✂️ Swiss Army Knife for Vector Graphics Scripting

One toolkit for vector graphics in browser or Node.

Paper.js ports Scriptographer to JavaScript and the browser using HTML5 Canvas, created by @lehni & @puckey. It brings Scriptographer-style vector graphics scripting to HTML5 Canvas with targets for both in-browser and Node.js/Electron use.

✨ Highlights

  • Full vs core builds: paper-full.js includes PaperScript support and Acorn.js; paper-core.js drops both to shave off bytes and compilation time.
  • NPM package split: paper for browser/worker; paper-jsdom for headless use with SVG importing/exporting via jsdom; paper-jsdom-canvas for canvas rendering via Node-Canvas plus SVG importing/exporting via jsdom.
  • PaperScript support: Available in the full build via Acorn.js.
  • Native rendering path: paper-jsdom-canvas uses Node-Canvas, which relies on Cairo and Pango.
  • Pre-built dev versions: prebuilt/module and prebuilt/dist branches for latest development builds.
  • Platform install guidance: README covers Node.js/NPM setup and native dependencies for macOS, Debian/Ubuntu Linux, and Electron.

💡 Why it matters

Paper.js keeps the Scriptographer vector scripting workflow for HTML5 Canvas with split builds and explicit Node targets. It fits both in-browser vector graphics and headless rendering when the required native dependencies are installed.


#VectorGraphics #HTML5Canvas #JavaScript #OpenSource #TiniX