A plugin collection for paint.js.
Plugins can add effects, adjustments, and file-type support. Users can install them through the plugin browser in paint.js or by importing a .paintjs package directly.
Each plugin has its own directory under plugins/:
plugins/example-plugin/
├── plugin.json
├── plugin.js
├── package.json
└── assets/
└── icon.png
plugin.jsoncontains the plugin metadata.plugin.jsregisters the plugin and implements its behavior.package.jsonis only needed when the plugin uses npm dependencies.assets/is optional and contains images or other files used by the plugin.
Use paintDotJs.asset("icon.png") to reference a packaged asset from plugin.js.
Install the dependencies and build the plugin catalog:
npm ci
npm run buildThe generated .paintjs packages and catalog.json are written to dist/.
To test a plugin, open Settings → Plugins in paint.js and either drop the generated .paintjs file onto the page or select Install plugin….
- Create a new directory under
plugins/. - Add
plugin.jsonandplugin.js. - Add any optional files to
assets/. - Run
npm run build. - Install the generated package from
dist/and test it in paint.js.
Use another plugin in this repository as a starting point. Keep metadata in plugin.json; plugin.js should contain only the implementation and registration.
The paint.js plugin API guide explains plugin registration, effects, controls, whole-image rendering, file types, assets, and workers.
Format plugin source files with:
npm run format