mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Scope the compilation of the whole library and inject produced classes into global scope for now, add options later.
This commit is contained in:
parent
80a5e4513e
commit
6923e168ab
1 changed files with 15 additions and 0 deletions
15
src/build.js
15
src/build.js
|
@ -1,3 +1,5 @@
|
||||||
|
(function(scope) {
|
||||||
|
|
||||||
#include "Paper.js"
|
#include "Paper.js"
|
||||||
|
|
||||||
#include "basic/Point.js"
|
#include "basic/Point.js"
|
||||||
|
@ -33,3 +35,16 @@
|
||||||
#include "tool/ToolEvent.js"
|
#include "tool/ToolEvent.js"
|
||||||
#include "tool/ToolHandler.js"
|
#include "tool/ToolHandler.js"
|
||||||
#include "tool/Tool.js"
|
#include "tool/Tool.js"
|
||||||
|
|
||||||
|
// Now inject all these local prototypes into the paper scope.
|
||||||
|
Base.each(['Point', 'Size', 'Rectangle', 'Matrix', 'DocumentView', 'Doc',
|
||||||
|
'Symbol', 'Item', 'Group', 'Layer', 'Raster', 'PlacedSymbol', 'PathStyle',
|
||||||
|
'Segment', 'Curve', 'PathItem', 'Path', 'CompoundPath', 'Color', 'RGBColor',
|
||||||
|
'GrayColor', 'GradientColor', 'Gradient', 'GradientStop', 'ToolEvent',
|
||||||
|
'ToolHandler', 'Tool'],
|
||||||
|
function(name) {
|
||||||
|
scope[name] = eval(name);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
})(this);
|
||||||
|
|
Loading…
Reference in a new issue