mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-09 06:12:34 -05:00
13 lines
280 B
JavaScript
13 lines
280 B
JavaScript
|
var paper = require('paper');
|
||
|
paper.setup(new paper.Canvas(1024, 768));
|
||
|
var scope = {};
|
||
|
paper.install(scope);
|
||
|
with (scope) {
|
||
|
var circle = new Path.Circle({
|
||
|
center: [100, 100],
|
||
|
radius: 50,
|
||
|
fillColor: 'red'
|
||
|
});
|
||
|
var svg = project.exportSVG();
|
||
|
console.log(svg.outerHTML);
|
||
|
};
|