💡 Update bundle

This commit is contained in:
Mattéo Delabre 2015-12-23 19:02:16 +01:00
parent 7019b4c40a
commit b47f30951d
1 changed files with 2 additions and 26 deletions

View File

@ -637,33 +637,9 @@ function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.const
// => newCenter = mouse * zoom - mouse * newZoom + center
center = [mouse[0] * zoom - mouse[0] * newZoom + center[0], mouse[1] * zoom - mouse[1] * newZoom + center[1]];
if (newZoom > zoom) {
_chaos.applyChaos.apply(undefined, [points, Math.floor((newZoom - zoom) * 1000)].concat(_toConsumableArray(_ifs.sierpinski)));
} else {
// points = points.slice(0, points.length + Math.floor((newZoom - zoom) * 1000));
}
zoom = newZoom;
// time for some GC
if (points.length > 1000000) {
var length = points.length;
var newPoints = [];
var i = 0;
for (i = 0; i < length; i += 1) {
var x = Math.floor(points[i][0] * zoom + center[0]);
var y = height - Math.floor(points[i][1] * zoom + center[1]);
if (x >= 0 && x < width && y >= 0 && y < height) {
newPoints.push(points[i]);
}
}
points = newPoints;
}
render();
event.preventDefault();
});
@ -691,7 +667,7 @@ function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.const
}
});
_chaos.applyChaos.apply(undefined, [points, 200000].concat(_toConsumableArray(_ifs.sierpinski)));
_chaos.applyChaos.apply(undefined, [points, 200000].concat(_toConsumableArray(_ifs.barnsley)));
window.onresize = resize;
resize();
}, { "./chaos": 6, "./ifs": 7, "the-dom": 1 }] }, {}, [8]);