Commit graph

58 commits

Author SHA1 Message Date
Samuel Asensi
bdc311e99f Fix node tests crash with node latest versions 2019-06-05 19:58:22 +02:00
Jürg Lehni
2cb55a839d Update dependencies 2019-06-05 18:13:22 +02:00
sapics
be4199b6eb Update copyright year to 2019 2018-12-27 16:13:01 +09:00
sapics
cfc5a912da Replace url to avoid redirection
Replace http://jonathanpuckey.com to https://puckey.studio
2018-11-14 11:24:32 +01:00
Jürg Lehni
27b92a6007 Improve handling of push() with lots of items
Improves fix for #1493, should pass CI again
2018-10-03 16:45:38 +02:00
sapics
eb740c2452 Minor fix 2018-09-29 12:29:12 +09:00
Bojan Hribernik
6925888024 Fix Cannot read property 'parent' of undefined in node
This happens in webpack bundle in node server rendering react application:
```js
TypeError: Cannot read property 'parent' of undefined
    at Object.eval (webpack:///./node_modules/paper/dist/node/self.js?:20:28)
    at eval (webpack:///./node_modules/paper/dist/node/self.js?:62:30)
    at Object../node_modules/paper/dist/node/self.js (/home/bojan/www/climbuddy/client/server/map.bundle.js:34531:1)
    at __webpack_require__ (/home/bojan/www/climbuddy/client/server/map.bundle.js:26:30)
    at Object.eval (webpack:///./node_modules/paper/dist/paper-core.js?:35:16)
    at eval (webpack:///./node_modules/paper/dist/paper-core.js?:14798:3)
    at Object../node_modules/paper/dist/paper-core.js (/home/bojan/www/climbuddy/client/server/map.bundle.js:34553:1)
    at __webpack_require__ (/home/bojan/www/climbuddy/client/server/map.bundle.js:26:30)
    at eval (webpack:///./node_modules/react-paper-bindings/lib/View.js?:15:18)
    at Object../node_modules/react-paper-bindings/lib/View.js (/home/bojan/www/climbuddy/client/server/map.bundle.js:37188:1)
```
2018-09-29 12:14:32 +09:00
Jürg Lehni
702ab748a2 JSHint: Fix error 2017-10-05 12:09:07 +02:00
Jürg Lehni
6c5f1dc671 Node.js: Clean up image stream handling 2017-10-04 22:39:19 +02:00
therewasaguy
6939c1674b Node.js: Add JPEG support to exportFrames()
Closes #1166
2017-10-04 22:25:30 +02:00
Jürg Lehni
6ff6e1a05d Improve documentation about new NPM modules.
Relates to #1252
2017-04-19 20:27:14 +02:00
Jürg Lehni
29de03dc30 Node.js: Add code to handle separate shim modules.
Planend are the modules paper-jsdom and paper-jsdom-canvas, as shim modules that require and handle the dependencies as peer dependencies.

Relates to #1252
2017-03-20 12:38:52 +01:00
Jürg Lehni
7a2ccc6d44 More work on supporting hybrid contexts.
Relates to #1252
2017-03-19 16:03:29 +01:00
Jürg Lehni
87fe0dd7cd Fix typo. 2016-12-31 06:50:08 +01:00
Jürg Lehni
753b27afe0 Minor code and comments cleanup. 2016-07-27 14:11:58 +02:00
Jürg Lehni
32d8c969fb Clean up handling of #_set(), #set() and #initialize()
Convention:

- #_set() is for actually setting properties, e.g. on Point, Size, so that derived classes can reuse other parts (e.g. SegmentPoint)
- #set() is a shortcut to #initialize() on all basic types, to offer the same amount of flexibility when setting values.
2016-07-18 20:11:01 +02:00
Jürg Lehni
89c60b1a05 Loosely couple Node.js code to canvas module.
Treat absence of canvas module like a web worker context.
Relates to #1103
2016-07-12 19:11:09 +02:00
Jürg Lehni
f04dd14309 Remove jsdom legacy code. 2016-07-03 14:16:17 +02:00
Jürg Lehni
df8969f1c4 Switch to jsdom v9.4.0 with native DOMParser support.
Closes #1093
2016-07-03 13:39:05 +02:00
sapics
7b91e41131 Fix variable leak 2016-06-14 12:20:58 +09:00
Jürg Lehni
345730f634 Merge pull request #1002 from sapics/curve-divide
Call curve._changed at curve.divideAtTime
2016-04-06 20:24:55 -07:00
Jürg Lehni
5a9f3dfb27 Improve handling of local paths and CORS on Node.js 2016-04-05 12:11:54 -07:00
Jürg Lehni
f4e4e7ab9c Switch to jsdom v8.3.0, now that it includes our node-canvas PR.
See https://github.com/tmpvar/jsdom/pull/1366
2016-04-04 17:55:43 -07:00
Jürg Lehni
e054b760ed Fix cases where toolPoint was null. 2016-03-27 21:41:22 -07:00
sapics
60f1e78889 Call curve._changed at curve.divideAtTime 2016-03-05 12:23:02 +09:00
Jürg Lehni
c35814f94f Node.js: Fix bug when using paper-core.js
And improve Node.js examples. Closes #975
2016-02-15 23:59:31 +01:00
Jürg Lehni
50843d8f87 Node: Switch to jsdom v8.0.1 with patched-in image support.
And fix XMLSerializer#serializeToString() to work with it.
2016-01-31 22:47:57 +01:00
Jürg Lehni
e02e9f4643 Node: Improve DOMParser#parseFromString() polyfill for Node.js
And no need to move imported SVG nodes into document, since we don't have styling in Node.js
2016-01-31 12:43:38 +01:00
Jürg Lehni
fadef949ff Node: Fix display of percentage in Node.js frames export. 2016-01-31 12:42:53 +01:00
Jürg Lehni
0455d39e33 Automatically determine correct padding for numbers in View#exportFrames() 2016-01-27 13:38:04 +01:00
Jürg Lehni
85d60e199e Get View#exportFrames() to work again on Node.js 2016-01-27 13:27:11 +01:00
Jürg Lehni
b56d18d6a4 Override DomEvent.requestAnimationFrame() in Node.js to avoid setInterval() timers 2016-01-27 13:02:50 +01:00
Jürg Lehni
414742459d Make sure PDF support actually works. 2016-01-27 12:51:26 +01:00
Jürg Lehni
1e649362bd Fix issue in View#exportImage() 2016-01-27 12:51:02 +01:00
Jürg Lehni
e722be5b62 Add support for PDF canvas on Node.js again. 2016-01-27 09:34:37 +01:00
Jürg Lehni
e1a51f858a More work on unified version for browsers and node.
Relates to #739
2016-01-26 20:02:23 +01:00
Jürg Lehni
4f5dac8567 Improved PrePro to be able to dynamically load Node.js code too, and improve load.js to handle both environments.
Also moved PaperScript .pjs extension code to PaperScript, and DOM related Node.js code to dom/node.js
2013-06-27 13:49:04 -07:00
Jürg Lehni
35f17979df Improve Node.js XMLSerializer workaround for lowercased tagNames. 2013-06-11 14:39:34 -07:00
Jürg Lehni
75eddbcdba Minor code clean ups. 2013-06-02 16:18:40 -07:00
Jürg Lehni
6fa6c022c9 Rename options.server to options.node 2013-05-28 00:01:55 -07:00
Jürg Lehni
b92be7ecf3 Set options.stats = false for build.sh and Node.js 2013-05-27 15:33:28 -07:00
Jürg Lehni
d577b1bf48 Share one options.js file describing Paper.js options for Node.js, build.sh and the dev version. 2013-05-27 15:11:32 -07:00
Jürg Lehni
6ac5463630 Switch to using common string format for paper.version (major.minor.build) 2013-05-27 14:27:05 -07:00
Jürg Lehni
fef22f25e8 Remove node.js specific version of Base.isPlainObject(), since straps.js can handle it now. 2013-05-27 14:10:38 -07:00
Jürg Lehni
502c76dbce Start merging fat-line clipping code into Curve class.
And add a prepro option for now.
2013-05-24 22:30:13 -07:00
Jürg Lehni
7f00ef8f05 Fix white-spaces. 2013-05-24 22:25:22 -07:00
Jürg Lehni
c70b985911 Make sure the Base class is exposed in Node.js 2013-05-12 14:29:21 -07:00
Jürg Lehni
dd96d67fe1 Further refine Node.js integration. 2013-05-09 16:06:45 -07:00
Jürg Lehni
82b9cb3dbf Improve the Node version of Base.isPlainObject() 2013-05-09 15:30:18 -07:00
Jürg Lehni
e2f4eb5a56 Improve Node's Base.isPlainObject() to rule out arrays. 2013-05-09 01:56:47 -07:00