This commit is contained in:
2018-06-28 16:58:31 +02:00
parent ba3916e3b5
commit f0a0b0f948
2 changed files with 4045 additions and 11 deletions
+17 -11
View File
@@ -1,31 +1,37 @@
var path = new Path({ var path = new Path({
fillColor: 'black' fillColor: 'black'
}); });
var url = 'trame.svg';
var raster = new Raster(url);
var amount = 3 var amount = 3
for (var i = 0; i < amount; i++) { for (var i = 0; i < amount; i++) {
var point = new Point(600, 650) * Point.random(view.size); raster.position = new Point(300,600) * Point.random(view.size);
path.add(point); // var point = new Point(600, 650) * Point.random(view.size);
console.log(point); path.add(raster.position);
var segment = path.segments[i]; var segment = path.segments[i];
} }
path.closed = true;
path.fullySelected = true;
path.clipMask = true;
function onFrame(event) { function onFrame(event) {
// Loop through the segments of the path: // Loop through the segments of the path:
// A cylic value between -1 and 1 // A cylic value between -1 and 1
var sinus = Math.sin(event.time * 3 + i); for (var i = 0; i <= amount; i++) {
var sinus = Math.sin(event.time * 1 + i);
// Change the y position of the segment point: // Change the y position of the segment point:
segment.point.y = sinus * 60 + 100; segment.point.y = sinus * 100 + 100;
segment.point.x = sinus * 50 + 150;
path.smooth();
}
} }
path.closed = true;
path.fullySelected = true;
path.position.x += 1000;
path.smooth();
+4028
View File
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 176 KiB