Improve some comments about new file structure.

This commit is contained in:
Jürg Lehni 2016-01-26 20:14:49 +01:00
parent e1a51f858a
commit 6a099003b2
2 changed files with 8 additions and 5 deletions

View file

@ -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);

View file

@ -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');