From 836228b612cdec6a5cd0b0849272da4e81b576e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20Podgor=C5=A1ek?= Date: Thu, 22 Mar 2018 06:10:04 +0100 Subject: [PATCH] Uizi popravek - kamera fejl --- src/sliva/core.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sliva/core.cljs b/src/sliva/core.cljs index 0a555f1..043f997 100644 --- a/src/sliva/core.cljs +++ b/src/sliva/core.cljs @@ -38,6 +38,8 @@ (def kamera (THREE.PerspectiveCamera. FOV (/ js/window.innerWidth js/innerHeight 0.1 2000))) (aset kamera "position" "z" odmik-kamere) +(aset kamera "aspect" (/ js/window.innerWidth js/window.innerHeight)) +(.updateProjectionMatrix kamera) (def izris (THREE.WebGLRenderer. (js-obj "alpha" true))) (.setSize izris js/window.innerWidth js/window.innerHeight) @@ -73,7 +75,6 @@ (.rotateX obj rotacija-x) (let [new-scale (+ obj.scale.x w-diff)] - (console.log obj.scale w-diff obj.scale.x new-scale) (aset obj "scale" "x" new-scale) (aset obj "scale" "y" new-scale) (aset obj "scale" "z" new-scale))