mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-14 14:11:18 -04:00
Examples: replace use of deprecated functions.
This commit is contained in:
parent
874cf5713f
commit
c167920480
5 changed files with 6 additions and 6 deletions
examples/Scripts
|
@ -21,7 +21,7 @@
|
|||
path.arcTo(point + vector, true);
|
||||
}
|
||||
}
|
||||
project.activeLayer.appendBottom(path);
|
||||
project.activeLayer.insertChild(0, path);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -46,7 +46,7 @@ function onMouseMove(event) {
|
|||
var topLeft = bounds.topLeft.floor();
|
||||
var path = new Path.Rectangle(topLeft, size.ceil());
|
||||
path.fillColor = raster.getAverageColor(path);
|
||||
path.moveBelow(child);
|
||||
path.insertBelow(child);
|
||||
|
||||
var secondPath = path.clone();
|
||||
size = size.floor();
|
||||
|
@ -54,7 +54,7 @@ function onMouseMove(event) {
|
|||
? [size.width, 0]
|
||||
: [0, size.height];
|
||||
secondPath.fillColor = raster.getAverageColor(secondPath);
|
||||
secondPath.moveBelow(path);
|
||||
secondPath.insertBelow(path);
|
||||
|
||||
// Remove the path which was split:
|
||||
child.remove();
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
var cornerSize = new Size(radius / 4);
|
||||
var path = new Path.RoundRectangle(rectangle, cornerSize);
|
||||
path.rotate(i * rotation + 45);
|
||||
group.appendTop(path);
|
||||
group.addChild(path);
|
||||
}
|
||||
return group;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue