From c622d1419aad93aa0d7c757d3f2cf3f6ae5f324e Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Wed, 29 Jun 2011 13:30:04 +0200 Subject: [PATCH] Improve RadialRainbows example. --- examples/Animated/RadialRainbows.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/Animated/RadialRainbows.html b/examples/Animated/RadialRainbows.html index 00247d80..3160430f 100644 --- a/examples/Animated/RadialRainbows.html +++ b/examples/Animated/RadialRainbows.html @@ -9,10 +9,11 @@ var point = view.center; var colors = []; + var cycles = 4; for (var i = 0, l = 60; i < l; i++) { - var color = new RGBColor(1, 0, 0); - var cycles = 4; - color.hue = i / l * cycles * 360; + var brightness = 1 - (i / l) * 1.5; + var hue = i / l * cycles * 360; + var color = new HSBColor(hue, 1, brightness); colors.push(color); }