From f7490e00b032839c7e1ae9e3b64209c024a6236e Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Mon, 15 Jun 2015 10:01:33 +0200 Subject: [PATCH] Changed little stuff --- geo/Mesh.js | 8 ++++---- js/prototype/main.js | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/geo/Mesh.js b/geo/Mesh.js index 55c4aca..c0deeaa 100644 --- a/geo/Mesh.js +++ b/geo/Mesh.js @@ -222,7 +222,7 @@ geo.Face = function() { } geo.Face.prototype.max = function() { - if (this.d) { + if (this.d !== undefined) { return Math.max(this.a, this.b, this.c, this.d); } else { return Math.max(this.a, this.b, this.c); @@ -239,7 +239,7 @@ geo.Face.prototype.maxTexture = function() { geo.Face.prototype.toList = function() { var l = ['f', this.a, this.b, this.c]; - if (this.d) + if (this.d !== undefined) l.push(this.d); if (this.aTexture !== undefined) { @@ -248,14 +248,14 @@ geo.Face.prototype.toList = function() { l.push(this.cTexture); } - if (this.dTexture) + if (this.dTexture !== undefined) l.push(this.dTexture); return l; } geo.Face.prototype.toString = function() { - return 'f ' + this.a + ' ' + this.b + ' ' + this.c + (this.d ? ' ' + this.d : ''); + return 'f ' + this.a + ' ' + this.b + ' ' + this.c + (this.d !== undefined ? ' ' + this.d : ''); } geo.Usemtl = function() { diff --git a/js/prototype/main.js b/js/prototype/main.js index 6ad224a..7656747 100644 --- a/js/prototype/main.js +++ b/js/prototype/main.js @@ -54,7 +54,6 @@ function init() { container.style.width = container_size.width() + 'px'; renderer.setSize(container_size.width(), container_size.height()); // renderer.setSize(container_size.width(), container_size.height()); - renderer.shadowMapEnabled = true; renderer.setClearColor(0x87ceeb); // Initialize previewer @@ -159,7 +158,7 @@ function render() { cameras.map(function(camera) { if (camera instanceof RecommendedCamera) hide(camera); }); // Update transparent elements - THREEx.Transparency.update(cameras.mainCamera()); + // THREEx.Transparency.update(cameras.mainCamera()); // Render preview previewer.render(cameraSelecter.prev, container_size.width(), container_size.height());