diff --git a/anim.js b/anim.js index 2ce3f3b..ea3e479 100644 --- a/anim.js +++ b/anim.js @@ -129,8 +129,10 @@ function addObj(w, h) { // Pocisti za seboj if (objekti.push(obj) > obj_limit) { - scene.remove(objekti[0]); - objekti.shift(); + while (objekti.length > obj_limit) { + scene.remove(objekti[0]); + objekti.shift(); + } } }; diff --git a/control.html b/control.html index 13d7017..653b5db 100644 --- a/control.html +++ b/control.html @@ -7,11 +7,15 @@ margin: 0 } - input { + .noUi-target { width: 500px; } + table tr td { + padding-top: 1rem; + } +
- + | @@ -29,7 +33,7 @@ visina objekta | - + | @@ -38,7 +42,7 @@ sirina objekta | - + | @@ -47,7 +51,7 @@ limit objektov | - + | @@ -56,7 +60,7 @@ rotacija X | - + | @@ -65,7 +69,7 @@ rotacija Y | - + | @@ -74,7 +78,7 @@ rotacija Z | - + | @@ -83,23 +87,23 @@ barva | - + | -+ |
kamera | - + | -+ |