From cb392d95007f70c6c92b0d81b2d6bdbd523fbad4 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 22 Jun 2019 12:07:14 +0200 Subject: [PATCH] performance optimization --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 07f389c..8440bc2 100644 --- a/index.html +++ b/index.html @@ -63,10 +63,10 @@ } display(){ this.b = 0; - for (var r = this.radius; r > 0; r-=1) { + for (var r = this.radius; r > this.radius/2; r-=2) { fill(255,this.b); ellipse(this.x, this.y, r, r); - this.b+=(255+this.bjitter)/radius; + this.b+=2*(255+this.bjitter)/radius; } this.radius-=0.5;