fix: respawn
This commit is contained in:
parent
55f8b77a98
commit
c372c1c28e
|
@ -63,8 +63,8 @@ export default {
|
||||||
snowflake.angle += (snowflake.sway - 0.5) * 2 * Math.random();
|
snowflake.angle += (snowflake.sway - 0.5) * 2 * Math.random();
|
||||||
snowflake.position.x += ts * snowflake.sway * Math.sin(s + snowflake.align);
|
snowflake.position.x += ts * snowflake.sway * Math.sin(s + snowflake.align);
|
||||||
snowflake.position.y += ts * gravity * snowflake.size;
|
snowflake.position.y += ts * gravity * snowflake.size;
|
||||||
if (snowflake.position.y >= h + 5) {
|
if (snowflake.position.y >= h + 20) {
|
||||||
snowflake.position.y = -5;
|
snowflake.position.y = -20;
|
||||||
snowflake.sway = Math.random() * 1;
|
snowflake.sway = Math.random() * 1;
|
||||||
snowflake.align = Math.random() * twoPi;
|
snowflake.align = Math.random() * twoPi;
|
||||||
snowflake.x = Math.random() * w;
|
snowflake.x = Math.random() * w;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user