From b47f30951d47f38f0754b884094bfc8fedd2ad4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Wed, 23 Dec 2015 19:02:16 +0100 Subject: [PATCH] :bulb: Update bundle --- bundle.js | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/bundle.js b/bundle.js index be856cb..0bb5576 100644 --- a/bundle.js +++ b/bundle.js @@ -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]);