Add star count master control

This commit is contained in:
Starbeamrainbowlabs 2017-01-02 17:18:31 +00:00
parent b581b03c6f
commit 8d1e3db704

View file

@ -15,6 +15,7 @@ class StarlightRenderer
// The colour of the sky in the background.
this.skyColour = "hsla(248, 100%, 23%, 1)";
this.starCount = 1000;
this.starSize = new Range(2, 10);
this.twinkleDuration = new Range(0.5, 1.5);
this.twinkleSize = new Range(1.2, 2);
@ -30,7 +31,7 @@ class StarlightRenderer
// ~~~
this.stars = [];
for(let i = 0; i < 100; i++)
for(let i = 0; i < this.starCount; i++)
{
let nextStar = new Star(
this.canvas,