Commits

Brian McKenna  committed a85be34

Document a hack

  • Participants
  • Parent commits 6946e59

Comments (0)

Files changed (1)

File src/main/resources/js/3dgalleries.js

 
 	    $.each(objects, function(i) {
 	        this.materials[0].opacity = 0.5;
-		this.position.z = -0.05;
 		if(zoomed) {
                     this.rotation.y = i < getSelectedIndex() ? 0.1 : -0.1;
 		} else {
                     this.rotation.y = 0;
 		}
+		// Put the selected image in front so Three.js works with the
+		// depth of the different rotations
+                this.position.z = -0.05;
             });
             if(selected) {
                 selected.materials[0].opacity = 1;
-		selected.rotation.y = 0;
-		selected.position.z = 0;
+                selected.rotation.y = 0;
+                selected.position.z = 0;
             }
 
             renderer.render(scene, camera);