mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 01:12:39 -05:00
Include note about compiling for Electron.
And some smaller forgotten changes. Closes #1276
This commit is contained in:
parent
26993b2c36
commit
e354bccf69
4 changed files with 16 additions and 3 deletions
|
@ -77,6 +77,8 @@
|
|||
- Hit Tests: Fix stroke hit-testing for rounded shape items (#1207).
|
||||
- Fix matrix cloning for groups with `#applyMatrix = false` ( #1225).
|
||||
- Correctly handle offset in `Curve#divideAt(offset)` (#1230).
|
||||
- Fix issue with `Curve#isStraight()` where handles were checked incorrectly
|
||||
for collinearity (#1269).
|
||||
- Fix `Line#getSide()` imprecisions when points are on the line.
|
||||
- Docs: Fix documentation of `Project#hitTestAll()` (#536).
|
||||
- Docs: Improve description of `option.class` value in `Project#hitTest()`
|
||||
|
|
13
README.md
13
README.md
|
@ -78,7 +78,7 @@ And from there onwards, you should be able to use Bower like this:
|
|||
|
||||
bower search paperjs
|
||||
|
||||
### Installing Paper.js for Node.js through NPM
|
||||
### Installing Paper.js for Node.js
|
||||
|
||||
NPM is used to install Paper.js for use in Node.js. But before installing, you
|
||||
need the Cairo Graphics library installed, see: <http://cairographics.org/>.
|
||||
|
@ -125,6 +125,17 @@ You should now be able to install the Paper.js module from NPM:
|
|||
|
||||
npm install paper
|
||||
|
||||
### Installing Paper.js for Electron
|
||||
|
||||
[Node-Canvas](https://github.com/Automattic/node-canvas) is a native dependency.
|
||||
In order to build it for use in Electron, which is likely to use a different
|
||||
version of V8 than the Node binary installed in your system, you need to
|
||||
manually specify the location of Electron’s headers. Follow these steps to do
|
||||
so:
|
||||
|
||||
[Electron — Using Native Node
|
||||
Modules](https://electron.atom.io/docs/tutorial/using-native-node-modules/)
|
||||
|
||||
## Development
|
||||
|
||||
The main Paper.js source tree is hosted on
|
||||
|
|
|
@ -118,7 +118,7 @@ var SymbolItem = Item.extend(/** @lends SymbolItem# */{
|
|||
return item._getCachedBounds(item._matrix.prepended(matrix), options);
|
||||
},
|
||||
|
||||
_hitTestSelf: function(point, options, viewMatrix, strokeMatrix) {
|
||||
_hitTestSelf: function(point, options, viewMatrix) {
|
||||
var res = this._definition._item._hitTest(point, options, viewMatrix);
|
||||
// TODO: When the symbol's definition is a path, should hitResult
|
||||
// contain information like HitResult#curve?
|
||||
|
|
|
@ -864,7 +864,7 @@ test('#1123', function() {
|
|||
'M100,200v-100h100v100zM180,180v-60h-60v60z');
|
||||
});
|
||||
|
||||
test('#1239', function() {
|
||||
test('#1239 / #1073', function() {
|
||||
var p1 = new Path([[890.91, 7.52, 0, 0, 85.40999999999997, 94.02], [1024, 351.78, 0, -127.03999999999996, 0, 127.14999999999998], [890.69, 696.28, 85.54999999999995, -94.03999999999996, 0, 0], [843.44, 653.28, 0, 0, 75.20000000000005, -82.66999999999996], [960, 351.78, 0, 111.75, 0, -111.63], [843.65, 50.51999999999998, 75.07000000000005, 82.63999999999999, 0, 0], true]);
|
||||
var p2 = new Path([[960, 352, -0.05999999999994543, 111.67999999999995, 0, 0], [1024, 352, 0, 0, -0.05999999999994543, 127.07], [890.69, 696.28, 85.5, -93.98000000000002, 0, 0], [843.44, 653.28, 0, 0, 75.14999999999998, -82.61000000000001], true]);
|
||||
project.activeLayer.scale(0.25);
|
||||
|
|
Loading…
Reference in a new issue