|
@@ -1,30 +1,36 @@
|
|
|
var path = new Path({
|
|
|
fillColor: 'black'
|
|
|
});
|
|
|
+var url = 'trame.svg';
|
|
|
+var raster = new Raster(url);
|
|
|
+
|
|
|
var amount = 3
|
|
|
|
|
|
for (var i = 0; i < amount; i++) {
|
|
|
- var point = new Point(600, 650) * Point.random(view.size);
|
|
|
- path.add(point);
|
|
|
- console.log(point);
|
|
|
+ raster.position = new Point(300,600) * Point.random(view.size);
|
|
|
+
|
|
|
+ path.add(raster.position);
|
|
|
var segment = path.segments[i];
|
|
|
}
|
|
|
|
|
|
+path.closed = true;
|
|
|
+path.fullySelected = true;
|
|
|
+path.clipMask = true;
|
|
|
+
|
|
|
function onFrame(event) {
|
|
|
|
|
|
|
|
|
|
|
|
- var sinus = Math.sin(event.time * 3 + i);
|
|
|
+ for (var i = 0; i <= amount; i++) {
|
|
|
+ var sinus = Math.sin(event.time * 1 + i);
|
|
|
|
|
|
|
|
|
- segment.point.y = sinus * 60 + 100;
|
|
|
-}
|
|
|
-
|
|
|
-path.closed = true;
|
|
|
-path.fullySelected = true;
|
|
|
-path.position.x += 1000;
|
|
|
-path.smooth();
|
|
|
+ segment.point.y = sinus * 100 + 100;
|
|
|
+ segment.point.x = sinus * 50 + 150;
|
|
|
|
|
|
+ path.smooth();
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
|