forked from MarseyWorld/MarseyWorld
fix homoween award function name conflict
parent
be9e3c1372
commit
5d4667b50f
|
@ -24,7 +24,7 @@ for (let i1 = 0 ; i1 < puffs; i1++)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
draw(new Date().getTime(), 3000)
|
draw_fog(new Date().getTime(), 3000)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ function addNewParticle(delay)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw(startT, totalT)
|
function draw_fog(startT, totalT)
|
||||||
{
|
{
|
||||||
//Timing
|
//Timing
|
||||||
let timeDelta = new Date().getTime() - startT;
|
let timeDelta = new Date().getTime() - startT;
|
||||||
|
@ -108,7 +108,7 @@ function draw(startT, totalT)
|
||||||
//Repeat if there's still a living particle
|
//Repeat if there's still a living particle
|
||||||
if (stillAlive)
|
if (stillAlive)
|
||||||
{
|
{
|
||||||
requestAnimationFrame(function(){draw(startT,totalT);});
|
requestAnimationFrame(function(){draw_fog(startT,totalT);});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,7 +89,7 @@ function getRandom(min, max) {
|
||||||
return Math.floor(Math.random() * (max - min + 1) + min);
|
return Math.floor(Math.random() * (max - min + 1) + min);
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw_stalker() {
|
||||||
let stalker = stalkers[0];
|
let stalker = stalkers[0];
|
||||||
let prevstalker = stalkers[0];
|
let prevstalker = stalkers[0];
|
||||||
stalker.x = stalker.X += (mouse.x - stalker.X) * speed;
|
stalker.x = stalker.X += (mouse.x - stalker.X) * speed;
|
||||||
|
@ -104,7 +104,7 @@ function draw() {
|
||||||
stalker.y = stalker.Y += (prevstalker.y - stalker.Y) * speed;
|
stalker.y = stalker.Y += (prevstalker.y - stalker.Y) * speed;
|
||||||
}
|
}
|
||||||
makeCircle();
|
makeCircle();
|
||||||
requestAnimationFrame(draw);
|
requestAnimationFrame(draw_stalker);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw();
|
draw_stalker();
|
||||||
|
|
|
@ -30,7 +30,7 @@ if (innerWidth >= 768) {
|
||||||
num_fireflies = 50
|
num_fireflies = 50
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw_upsidedown() {
|
||||||
if (f.length < num_fireflies) {
|
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());
|
||||||
|
@ -58,7 +58,7 @@ function init(elemid) {
|
||||||
|
|
||||||
function loop() {
|
function loop() {
|
||||||
st.clearRect(0, 0, w, h);
|
st.clearRect(0, 0, w, h);
|
||||||
draw();
|
draw_upsidedown();
|
||||||
}
|
}
|
||||||
|
|
||||||
loop();
|
loop();
|
||||||
|
|
Loading…
Reference in New Issue