mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-07 10:44:19 -04:00
Rename Json acronyms in API to JSON.
This commit is contained in:
parent
86e77e12bc
commit
cebeb11301
23 changed files with 62 additions and 62 deletions
|
@ -20,11 +20,11 @@
|
|||
|
||||
var path = new Path.Circle(new Point(50, 50), 25);
|
||||
path.fillColor = 'red';
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
var path2 = new Path.Rectangle([50, 50], [200, 200]);
|
||||
var path3 = new Path.Rectangle([0, 0], [400, 400]);
|
||||
new CompoundPath(path1, path2, path3);
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
var path3 = new Path();
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
destination: path.bounds.rightCenter
|
||||
}
|
||||
path.strokeColor = 'black';
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
group.translate([100, 100]);
|
||||
group.scale(0.5);
|
||||
group.rotate(10);
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
line3.strokeColor = "yellow";
|
||||
line3.strokeWidth = "5";
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
var path = new Path.Star(center, points, radius1, radius2);
|
||||
path.fillColor = 'black';
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
raster.onLoad = function() {
|
||||
raster.position = view.center;
|
||||
raster.rotate(45);
|
||||
window.importJson(project.exportJson());
|
||||
window.importJSON(project.exportJSON());
|
||||
}
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
window.importJson = function(json) {
|
||||
window.importJSON = function(json) {
|
||||
project.activate();
|
||||
console.log(json);
|
||||
project.importJson(json);
|
||||
project.importJSON(json);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
path4.strokeColor= 'yellow';
|
||||
path4.fillColor='purple';
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
rect.fillColor = 'yellow';
|
||||
rect.rotate(-20);
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
p1.rotate(45);
|
||||
var p2 = symbol.place([300, 200]);
|
||||
p2.rotate(-30);
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
text.shear(.85, .15);
|
||||
text.scale(.85, 2);
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
clonedPath.rotate(angle * i, circlePath.bounds.topLeft);
|
||||
};
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
copy.rotate(-45);
|
||||
copy.scale(0.5);
|
||||
|
||||
window._json = project.exportJson();
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJson(window._json);
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue