diff --git a/src/build.js b/src/build.js index 8b4680b5..af6ae737 100644 --- a/src/build.js +++ b/src/build.js @@ -1,3 +1,5 @@ +(function(scope) { + #include "Paper.js" #include "basic/Point.js" @@ -33,3 +35,16 @@ #include "tool/ToolEvent.js" #include "tool/ToolHandler.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);