Commit graph

134 commits

Author SHA1 Message Date
Jürg Lehni
06366fb0ed Support prefixed UpdateExpressions and fix a bug in suffixed UpdateExpression when assigning to plain variables.
Related #492
2014-07-26 12:40:00 +02:00
Jürg Lehni
54f0197eba Correctly handle UpdateExpressions (a++, a--) that are directly following AssignmentExpressions.
Closes #492
2014-07-26 12:29:05 +02:00
Jürg Lehni
6e6df750f0 Use names less likely to be used in code for Operator Overloading handlers. 2014-07-26 12:28:00 +02:00
Jürg Lehni
0198f4c45f Reuse PaperScope objects when associating multiple scripts with the same canvas.
Closes #504.
2014-07-26 12:03:34 +02:00
Jürg Lehni
dc375d4c76 Correctly match the use of the unary operator $_ in PaperScript.
Closes #502
2014-07-23 12:17:55 +02:00
Jürg Lehni
74d14ecf0c Fix PaperScript support on Node.js
Closes #470.
2014-05-05 20:10:29 +02:00
Jürg Lehni
87e72744ea Fix PaperScript.parse() for use with load.js 2014-04-30 17:08:43 +02:00
Jürg Lehni
735150d165 Minor adjustments in new source map code.
Handle empty code properly.
2014-04-30 17:04:58 +02:00
Jürg Lehni
2d702d0247 Directly expose Acorn parser through PaperScript.parse(), and replace options.inline with options.source. 2014-04-30 16:40:11 +02:00
Jürg Lehni
c36712758b Expose Acorn through PaperScript object. 2014-04-30 16:27:43 +02:00
Jürg Lehni
43f319e762 Remove support for Esprima as Acorn.js does everything we need. 2014-04-30 16:26:04 +02:00
Jürg Lehni
e96ec6a2f1 Remove breakpoint support again in PaperScript as this code is better placed in sketch. 2014-04-30 16:25:38 +02:00
Jürg Lehni
5e6d0377f4 Support adding breakpoints to PaperScript. 2014-04-30 13:37:07 +02:00
Jürg Lehni
9e45d7f5eb Automatically detect PaperScript code inlined on page. 2014-04-30 12:32:08 +02:00
Jürg Lehni
af9b3cd5c6 Simplify source-map support since all browser appear to require the shifting of inlined code. 2014-04-30 11:47:15 +02:00
Jürg Lehni
43bc9f14da Add more comments and clean up code a bit. 2014-04-30 11:39:05 +02:00
Jürg Lehni
d91aac52b4 Check in initial support for source-maps in PaperScript.
Probably needs more testing and work.
2014-04-30 11:34:02 +02:00
Jürg Lehni
8317aacc1b Split Item#hitTest() into separate private function that does need to do arguments reading, for improved performance also when iterating over children. 2014-04-29 20:06:48 +02:00
Jürg Lehni
64aaabbc2e Export PaperScope reference into PaperScript as well, so the global paperalways points to the current scope. 2014-04-07 11:53:32 +02:00
Jürg Lehni
f002c633a7 Remove trailing white spaces and ensure newlines at the end. 2014-04-06 13:48:03 +02:00
Jürg Lehni
4a95f6e4a6 Some more optimizations for JS minifier and V8. 2014-01-05 21:07:11 +01:00
Jürg Lehni
51eff78919 Minor PaperScript clean-ups. 2014-01-05 20:53:18 +01:00
Jürg Lehni
7291956155 Prevent unnecessary beans from being created. 2014-01-05 20:42:28 +01:00
Jürg Lehni
dd37704f2c Use the same filtering for UpdateExpression and AssignmentExpression. 2014-01-05 20:23:11 +01:00
Jürg Lehni
cd7604952c Filter out loop statements in operator overloading code, to optimize loop execution speed. 2014-01-05 20:15:57 +01:00
Jürg Lehni
22e62a0527 Only expose globals if they are in use in the PaperScript code. 2014-01-04 22:22:19 +01:00
Jürg Lehni
227d511fc0 Only include the global handlers in the return statement that actually seem to be defined. 2014-01-04 22:10:16 +01:00
Jürg Lehni
4302682c1c Implement a better way of handling exceptions in PaperScript on Firefox and Chrome.
Use dynamically inserted script tag rather than compiled function since Firefox reports correct line numbers there.
2014-01-04 21:57:29 +01:00
Jürg Lehni
42bed58624 Fix scoping issues in PaperScript code. 2014-01-04 19:01:17 +01:00
Jürg Lehni
e22fa3a664 Update copyright notice. 2014-01-04 01:47:16 +01:00
Jürg Lehni
4594b66fd6 Fix comments. 2014-01-03 19:45:00 +01:00
Jürg Lehni
de939ab939 Clean up code and comments. 2014-01-03 18:31:07 +01:00
Jürg Lehni
f97056e4b7 Change the way PaperScripts are executed in Node.js
Requiring a PaperScript returns an initialize method which receives the Canvas argument.
2013-12-29 16:36:23 +01:00
Jürg Lehni
976b24b34c Execute PaperScript using new Function() rather than eval() and with() {}
This results in some impressive speeding improvements, as modern JS engines are finally able to optimize the resulting code.
2013-12-29 15:32:23 +01:00
Jürg Lehni
a59a42376a Clean up coding style a bit. 2013-12-16 21:40:40 +01:00
Jürg Lehni
6e5d8939d5 Rename View#draw() -> View#update() and remove checkRedraw argument.
We always check for changes, since change propagation should work reliably.
2013-12-08 19:15:58 +01:00
Jürg Lehni
ee7fd8cdbe Use double underscores to avoid clashes between math operators and 'private' methods.
Path already defines a #_add() method...
2013-12-05 21:11:12 +01:00
Jürg Lehni
93d10983ee Update to latest Prepro.js and switch from global options object to __options, to avoid name clashes. 2013-11-29 20:26:38 +01:00
Jürg Lehni
aec19b9494 Make directly setting view.onFrame work again. 2013-11-29 20:03:52 +01:00
Jürg Lehni
79caf66a23 Update to latest Straps.js and remove unnecessary isArray argument in Base.each() 2013-11-29 19:53:48 +01:00
Jürg Lehni
ed8de613c4 Improve error handling of PaperScripts on Firefox. 2013-11-27 19:07:02 +01:00
Jürg Lehni
ff538870e0 Fix error lineNumbers in PaperScript code for Firefox and Chrome. 2013-11-27 16:41:39 +01:00
Jürg Lehni
ca3993fe8e Solve variable scoping issue differently by using Base.each() to provide a local closure scope. 2013-11-26 23:46:53 +01:00
Jürg Lehni
f224bb3e86 Merge github.com:msand/paper.js into msand-master 2013-11-26 23:38:40 +01:00
Jürg Lehni
adac126e6c Rename Ast -> AST 2013-11-25 19:34:39 +01:00
msand
22a918190d Fix indent. 2013-11-24 17:36:35 +02:00
msand
900cea3123 Fix async loading of PaperScript to use correct scope. 2013-11-24 17:19:45 +02:00
Jürg Lehni
8f4b70a7d3 Minor clean up. 2013-11-14 14:42:28 +01:00
Jürg Lehni
b514d04f58 Export Http so the separate PaperScript scope can reach it. 2013-11-06 02:22:24 +01:00
Jürg Lehni
056dcceacc Implement #importSVG() from external URL. 2013-11-02 21:17:11 +01:00