mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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
|
window: window
|
||||||
}))();
|
}))();
|
||||||
|
|
||||||
// If we're on node, require some additional functionality now (PaperScript
|
// If we're on node, require some additional functionality now before finishing:
|
||||||
// support in require() with sourceMaps, and exportFrames / exportImage on
|
// - PaperScript support in require() with sourceMaps
|
||||||
// CanvasView)
|
// - exportFrames / exportImage on CanvasView
|
||||||
if (paper.agent.node)
|
if (paper.agent.node)
|
||||||
require('./node/extend')(paper);
|
require('./node/extend')(paper);
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,11 @@
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Node.js emulation layer of browser based environment, based on node-canvas
|
// Here we only make sure that there's a window and document object in the node
|
||||||
// and jsdom.
|
// 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 */
|
/* global document:true, window:true */
|
||||||
window = window || require('./node/window');
|
window = window || require('./node/window');
|
||||||
|
|
Loading…
Reference in a new issue