forked from rDrama/rDrama
reduce number of upsidedown fireflies
parent
11cca5d9f3
commit
a6eb39f072
|
@ -25,8 +25,13 @@ class firefly {
|
||||||
|
|
||||||
let f = [];
|
let f = [];
|
||||||
|
|
||||||
|
let num_fireflies = 10
|
||||||
|
if (screen_width >= 768) {
|
||||||
|
num_fireflies = 50
|
||||||
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
if (f.length < 100) {
|
if (f.length < num_fireflies) {
|
||||||
for (let j = 0; j < 10; j++) {
|
for (let j = 0; j < 10; j++) {
|
||||||
f.push(new firefly());
|
f.push(new firefly());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue