0.0.6 • Published 7 years ago
ember-paperjs v0.0.6
ember-paperjs
Ember components for using the excellent canvas SVG drawing library: PaperJS. A work in progress. Contributions welcomed.
Installation
ember install ember-paperjsUsage
Initialise a blank Paper canvas
{{ paperjs-canvas }}Events
onInit=(action "onBeforeEvent")provides thecanvaselementonInit=(action "onInitEvent")provides thepaperscope object
Create a Paper component that you can draw on
{{ paperjs-drawing }}Options for paperjs-drawing
closed=true|false// automatically close shapessmoothed=true|false// smooth shapes when completesimplified=true|false// simplify shapes when complete (should accept a tolerances but doesn't)compoundPaths=true|false// Create compound shapes (like Illustrator--not like PaperJS). Drawing inside another shape creates a boolean subtraction.minDistance=5// minimum drawing distance for each part of a pathmaxDistance=100// maximum drawing distance for each part of a pathstrokeColor="black"fillColor="rgba(255, 255, 244, 0.4)"
Events
onInit=(action "onBeforeEvent")provides thecanvaselementonInit=(action "onInitEvent")provides thepaperscope objectonClosed=(action "onClosedEvent")provides the path and the scope
Contributing
Installation
git clone <repository-url>cd ember-paperjsnpm install
Linting
npm run lint:jsnpm run lint:js -- --fix
Running tests
ember test– Runs the test suite on the current Ember versionember test --server– Runs the test suite in "watch mode"ember try:each– Runs the test suite against multiple Ember versions
Running the dummy application
ember serve- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
License
This project is licensed under the MIT License.