Explorar el Código

Fix for support of camera target

It is reported at #1109 from @andrewvarga.
Remo E hace 11 años
padre
commit
666fde252a
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      examples/js/loaders/SceneLoader.js

+ 3 - 0
examples/js/loaders/SceneLoader.js

@@ -446,6 +446,9 @@ THREE.SceneLoader.prototype = {
 							camera.rotation.fromArray( rot );
 
 						}
+						else if (objJSON.target) {
+						    camera.lookAt(new THREE.Vector3().fromArray(objJSON.target));
+						}						
 
 						parent.add( camera );