hardcode speed division for consistency
This commit is contained in:
parent
b3038644ad
commit
ba23f94eed
@ -17,7 +17,7 @@ function particles(){
|
|||||||
typeof speed !== 'undefined'
|
typeof speed !== 'undefined'
|
||||||
&& Number.isFinite(speed)
|
&& Number.isFinite(speed)
|
||||||
&& (1 <= speed && speed <= 1000)
|
&& (1 <= speed && speed <= 1000)
|
||||||
) ? (speed / 100) : 0.5;
|
) ? (speed / 100) : 50;
|
||||||
avoidMouse = (
|
avoidMouse = (
|
||||||
typeof avoidMouse !== 'undefined'
|
typeof avoidMouse !== 'undefined'
|
||||||
&& typeof avoidMouse === 'boolean'
|
&& typeof avoidMouse === 'boolean'
|
||||||
@ -39,6 +39,7 @@ function particles(){
|
|||||||
canvas.height = window.innerHeight;
|
canvas.height = window.innerHeight;
|
||||||
|
|
||||||
let particlesArray;
|
let particlesArray;
|
||||||
|
speed = speed / 100; // index speed to base 100 = 1
|
||||||
|
|
||||||
// get mouse position
|
// get mouse position
|
||||||
let mousePosition ={
|
let mousePosition ={
|
||||||
|
Loading…
Reference in New Issue
Block a user