Corrected previewer bug

This commit is contained in:
Thomas FORGIONE 2015-07-22 09:22:52 +02:00
parent 47a9925f3c
commit 748656504b
2 changed files with 8 additions and 4 deletions

View File

@ -111,8 +111,7 @@ function initCanvases() {
function initModels() { function initModels() {
// Init recommendations // Init recommendations
// recommendations = initMainScene(camera1, scene, coins, clickableObjects); recommendations = initMainScene(camera1, scene, coins, clickableObjects);
recommendations = L3D.initWhomp(camera1, scene, coins, clickableObjects);
// init clickable objects // init clickable objects
var i; var i;

View File

@ -142,6 +142,7 @@ L3D.Previewer.prototype.render = function(container_width, container_height) {
*/ */
L3D.Previewer.prototype.clear = function() { L3D.Previewer.prototype.clear = function() {
if (this.clearNeeded) { if (this.clearNeeded) {
console.log("Clear");
this.domElement.width = this.domElement.width; this.domElement.width = this.domElement.width;
this.clearNeeded = false; this.clearNeeded = false;
} }
@ -180,8 +181,12 @@ L3D.Previewer.prototype.setCamera = function(camera) {
* @param {Number} y y coordinate of the mouse * @param {Number} y y coordinate of the mouse
*/ */
L3D.Previewer.prototype.setPosition = function(x, y) { L3D.Previewer.prototype.setPosition = function(x, y) {
this.mouse.x = x;
this.mouse.y = y; if (!this.drawn) {
this.mouse.x = x;
this.mouse.y = y;
}
}; };
/** /**