Add star count master control
This commit is contained in:
parent
b581b03c6f
commit
8d1e3db704
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ class StarlightRenderer
|
||||||
// The colour of the sky in the background.
|
// The colour of the sky in the background.
|
||||||
this.skyColour = "hsla(248, 100%, 23%, 1)";
|
this.skyColour = "hsla(248, 100%, 23%, 1)";
|
||||||
|
|
||||||
|
this.starCount = 1000;
|
||||||
this.starSize = new Range(2, 10);
|
this.starSize = new Range(2, 10);
|
||||||
this.twinkleDuration = new Range(0.5, 1.5);
|
this.twinkleDuration = new Range(0.5, 1.5);
|
||||||
this.twinkleSize = new Range(1.2, 2);
|
this.twinkleSize = new Range(1.2, 2);
|
||||||
|
@ -30,7 +31,7 @@ class StarlightRenderer
|
||||||
// ~~~
|
// ~~~
|
||||||
|
|
||||||
this.stars = [];
|
this.stars = [];
|
||||||
for(let i = 0; i < 100; i++)
|
for(let i = 0; i < this.starCount; i++)
|
||||||
{
|
{
|
||||||
let nextStar = new Star(
|
let nextStar = new Star(
|
||||||
this.canvas,
|
this.canvas,
|
||||||
|
|
Loading…
Reference in a new issue