From 581f99f345ab072759f1708165766638eca4f166 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sun, 10 Mar 2013 17:05:25 +0100 Subject: [PATCH] Make Phyllotaxis Raster example run a little less hot. --- examples/Rasters/PhyllotaxisRaster.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/Rasters/PhyllotaxisRaster.html b/examples/Rasters/PhyllotaxisRaster.html index a817ecf3..61d40b6b 100644 --- a/examples/Rasters/PhyllotaxisRaster.html +++ b/examples/Rasters/PhyllotaxisRaster.html @@ -51,8 +51,8 @@ return group; } - function colorizePaths() { - for (var i = 0, l = group.children.length; i < l; i++) { + function colorizePaths(offset) { + for (var i = offset % 50, l = group.children.length; i < l; i += 50) { var path = group.children[i]; // Set the path's fill color to the average color of the // raster pixels that fall within it: @@ -86,9 +86,7 @@ group.children[i].rotate(2); } // Colorize the paths every other frame: - if (event.count % 2 == 0) { - colorizePaths(); - } + colorizePaths(event.count); }