mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Examples: Move away from using a symlink to be able to require('paper') from within examples.
- Node 5 / NPM 3 struggles with it - It never worked on Windows
This commit is contained in:
parent
e4ece39603
commit
e232ebc443
10 changed files with 41 additions and 17 deletions
|
@ -1,4 +1,7 @@
|
|||
var paper = require('paper');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
paper.setup(new paper.Size(1024, 768));
|
||||
|
||||
var layer = paper.project.activeLayer;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var http = require('http');
|
||||
var paper = require('paper');
|
||||
|
||||
http.createServer(function(request, response) {
|
||||
var canvas = paper.createCanvas(800, 800);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
var paper = require('paper'),
|
||||
path = require('path'),
|
||||
fs = require('fs');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
var canvas = paper.createCanvas(612, 792, 'pdf');
|
||||
paper.setup(canvas);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,7 @@
|
|||
var paper = require('paper');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var fs = require('fs');
|
||||
|
||||
var canvas = paper.createCanvas(800, 600);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
var paper = require('paper'),
|
||||
path = require('path'),
|
||||
fs = require('fs');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
with (paper) {
|
||||
paper.setup(new Size(300, 600));
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
var paper = require('paper'),
|
||||
path = require('path'),
|
||||
fs = require('fs');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
paper.setup(new paper.Size(300, 600));
|
||||
paper.project.importSVG('file://' + path.resolve(__dirname, 'in.svg'), {
|
||||
paper.project.importSVG(/*'in.svg'*/'file://' + path.resolve(__dirname, 'in.svg'), {
|
||||
onLoad: function(item) {
|
||||
paper.view.exportFrames({
|
||||
amount: 1,
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
var paper = require('paper');
|
||||
// Please note: When loading paper as a normal module installed in node_modules,
|
||||
// you would use this instead:
|
||||
// var paper = require('paper');
|
||||
var paper = require('../../dist/paper-full.js');
|
||||
var scope = require('./Tadpoles.pjs')(new paper.Size(1024, 768));
|
||||
|
||||
scope.view.exportFrames({
|
||||
|
|
1
node_modules/paper
generated
vendored
1
node_modules/paper
generated
vendored
|
@ -1 +0,0 @@
|
|||
../
|
|
@ -15,7 +15,8 @@
|
|||
],
|
||||
"main": "dist/paper-full.js",
|
||||
"scripts": {
|
||||
"lint": "jshint src"
|
||||
"lint": "jshint src",
|
||||
"prepublish": "gulp build"
|
||||
},
|
||||
"files": [
|
||||
"AUTHORS.md",
|
||||
|
|
Loading…
Reference in a new issue