diff --git a/geo/MeshStreamer.js b/geo/MeshStreamer.js index e711df0..7913dc3 100644 --- a/geo/MeshStreamer.js +++ b/geo/MeshStreamer.js @@ -239,14 +239,15 @@ geo.MeshStreamer.prototype.start = function(socket) { console.log('Asking for ' + path); var regex = /.*\.\..*/; + var filePath = path.substring(1, path.length); - if (regex.test(path)) { + if (regex.test(filePath)) { socket.emit('refused'); socket.disconnect(); return; } - self.loadFromFile(path, function() { + self.loadFromFile(filePath, function() { socket.emit('ok'); }); diff --git a/js/PointerCamera.js b/js/PointerCamera.js index 908bc6c..19d1775 100644 --- a/js/PointerCamera.js +++ b/js/PointerCamera.js @@ -166,8 +166,8 @@ PointerCamera.prototype.normalMotion = function(time) { if (this.motion.decreaseTheta) {this.theta -= this.sensitivity * time / 20; this.changed = true; } if ( this.pointerLocked || this.dragging) { - this.theta += this.mouseMove.x * time / 20; - this.phi -= this.mouseMove.y * time / 20; + this.theta += this.mouseMove.x * 20 / time; + this.phi -= this.mouseMove.y * 20 / time; this.mouseMove.x = 0; this.mouseMove.y = 0; diff --git a/js/ProgressiveLoaderGeometry.js b/js/ProgressiveLoaderGeometry.js index 527c14e..3c82ee8 100644 --- a/js/ProgressiveLoaderGeometry.js +++ b/js/ProgressiveLoaderGeometry.js @@ -67,7 +67,7 @@ var _parseList2 = function(arr) { var ProgressiveLoaderGeometry = function(path, scene, camera, callback) { // Init attributes - this.objPath = path.substring(1, path.length); + this.objPath = path; this.texturesPath = path.substring(0, path.lastIndexOf('/')) + '/'; this.mtlPath = path.replace('.obj', '.mtl'); this.scene = scene;