mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Improve some comments about new file structure.
This commit is contained in:
parent
e1a51f858a
commit
6a099003b2
2 changed files with 8 additions and 5 deletions
|
@ -27,9 +27,9 @@ paper = new (PaperScope.inject(Base.exports, {
|
|||
window: window
|
||||
}))();
|
||||
|
||||
// If we're on node, require some additional functionality now (PaperScript
|
||||
// support in require() with sourceMaps, and exportFrames / exportImage on
|
||||
// CanvasView)
|
||||
// If we're on node, require some additional functionality now before finishing:
|
||||
// - PaperScript support in require() with sourceMaps
|
||||
// - exportFrames / exportImage on CanvasView
|
||||
if (paper.agent.node)
|
||||
require('./node/extend')(paper);
|
||||
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
* All rights reserved.
|
||||
*/
|
||||
|
||||
// Node.js emulation layer of browser based environment, based on node-canvas
|
||||
// and jsdom.
|
||||
// Here we only make sure that there's a window and document object in the node
|
||||
// environment. We can't do this directly in src/paper.js, due to the nature of
|
||||
// how Prepro.js loads the include() files in the various scenarios. E.g. on
|
||||
// Node.js,only the files included in such a way see each other's variables in
|
||||
// their shared scope.
|
||||
|
||||
/* global document:true, window:true */
|
||||
window = window || require('./node/window');
|
||||
|
|
Loading…
Reference in a new issue