From 1e8f972e4c9ab84d76ddab2505cda2d1aae41dc0 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 30 Jun 2015 10:10:54 +0200 Subject: [PATCH] Revert "Trying something" This reverts commit 275a7b683126352390f6b1750a2053b0103593e5. --- js/ProgressiveLoaderGeometry.js | 45 --------------------------------- 1 file changed, 45 deletions(-) diff --git a/js/ProgressiveLoaderGeometry.js b/js/ProgressiveLoaderGeometry.js index 647f859..49557d2 100644 --- a/js/ProgressiveLoaderGeometry.js +++ b/js/ProgressiveLoaderGeometry.js @@ -205,48 +205,6 @@ ProgressiveLoaderGeometry.prototype.getCamera = function() { return this.toList(); } -/** - * Returns the duration between now and last receive - * @returns {Number} the number of milliseconds between now and the last time we received an element - */ -ProgressiveLoaderGeometry.prototype.waitTime = function() { - return Date.now() - this.lastReceive; -} - -/** - * Send a request to the server (up !) - */ -ProgressiveLoaderGeometry.prototype.up = function(time) { - // Do stuff - - if (time === undefined) { - - time = 3000; - - } - - if (Date.now() - this.lastReceive > 3000) - console.log("up"); -} - -/** - * Sets a timeout for upping in a few seconds - * @param {Number} number of milliseconds before upping - */ -ProgressiveLoaderGeometry.prototype.timeoutUp = function(time) { - - if (time === undefined) { - - time = 3000; - - } - - var self = this; - setTimeout(function() { self.up(time); }, time); - -} - - /** * Initializes the socket.io functions so that it can discuss with the server */ @@ -261,9 +219,6 @@ ProgressiveLoaderGeometry.prototype.initIOCallbacks = function() { this.socket.on('elements', function(arr) { - self.lastReceive = Date.now(); - self.timeoutUp(); - if (arr.length === 0) { console.log("Empty array");