0.2.9 • Published 6 years ago

paper-select-tool v0.2.9

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

paper-select-tool

npm version

A Paper.js based selection tool.

Adds a Paper.js based tool to a canvas. Currently a lasso, rectangle and circle selection tool are implemented.

Install

The paper-select-tool library is available on npm.

npm i @jmatt/paper-select-tool

Usage

To use it, import it and use one of the selection tools.

import * as pst from 'paper-select-tool';

var core = document.getElementById('core'),
    settings;
window.onload = function() {
  settings = Settings();
  pst.lasso(settings, core);
}
// ...
var things = [{ point: new paper.Point(100, 100),
                id: 'big bada boom' }];
var inSelection = pst.pointsFilter(settings, things);
// returns the filtered collection of objects with points in the selection.

Examples

Examples can be found in the examples directory.

License

The MIT License. See the LICENSE file.

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago