fix mistake in if/else if/else checkParams
This commit is contained in:
parent
78193fa588
commit
4ba30a0a35
@ -101,7 +101,6 @@ function particles(){
|
|||||||
// create particle array
|
// create particle array
|
||||||
function init(){
|
function init(){
|
||||||
particlesArray = [];
|
particlesArray = [];
|
||||||
//let numberOfParticles = (canvas.height * canvas.width) / 9000;
|
|
||||||
let numberOfParticles = canvas.width * 0.01;
|
let numberOfParticles = canvas.width * 0.01;
|
||||||
for (let i = 0; i < numberOfParticles * numParticles; i++){
|
for (let i = 0; i < numberOfParticles * numParticles; i++){
|
||||||
let size = (Math.random() * sizeMultiplier) + 1;
|
let size = (Math.random() * sizeMultiplier) + 1;
|
||||||
@ -253,7 +252,7 @@ function particles(){
|
|||||||
if (typeof speed == 'undefined'){
|
if (typeof speed == 'undefined'){
|
||||||
speed = 50;
|
speed = 50;
|
||||||
}
|
}
|
||||||
if (Number.isInteger(speed) && (0 <= speed && speed <= 1000)){
|
else if (Number.isInteger(speed) && (0 <= speed && speed <= 1000)){
|
||||||
speed;
|
speed;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ab-particles.js
|
ab-particles.js
|
||||||
sha384-Nr51BwOjKP19Q/gNGZWRJpRLfAqmN4GmM/VtlRUaaKIou2AJqYLbw/VzbJBeN1eO
|
sha384-W1hzahUbhADviTwtPE9incT2VBDum2EAKX5OuUdaJnfYC/RTdePPe1D/95uVnu9+
|
||||||
|
|
||||||
ab-particles.min.js
|
ab-particles.min.js
|
||||||
sha384-GyB27X5DbGI7EaqeCZWH6nlg1xEwP8P++83axSmabShThx8C0IqIDGkU6bf72iJj
|
sha384-GyB27X5DbGI7EaqeCZWH6nlg1xEwP8P++83axSmabShThx8C0IqIDGkU6bf72iJj
|
Loading…
Reference in New Issue
Block a user