From 566f42f5dc96c84dd8d6863f22ac177d54e6fbee Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Wed, 8 Apr 2015 16:04:38 +0200 Subject: [PATCH] Typo in comment and added toGeometry in package --- js/BufferGeometryToGeometry.js | 6 ++++-- scene/js/main.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/BufferGeometryToGeometry.js b/js/BufferGeometryToGeometry.js index 46303c0..d7fcb42 100644 --- a/js/BufferGeometryToGeometry.js +++ b/js/BufferGeometryToGeometry.js @@ -1,5 +1,7 @@ -var toGeometry = function (bg) { - // The following snipped is from Mattatz - Masatatsu Nakamura http://mattatz.org +var Converter = {}; + +Converter.toGeometry = function (bg) { + // The following snippet is from Mattatz - Masatatsu Nakamura http://mattatz.org var attrib = bg.getAttribute('position'); if(attrib === undefined) { throw new Error('a given BufferGeometry object must have a position attribute.'); diff --git a/scene/js/main.js b/scene/js/main.js index 333555a..e237133 100644 --- a/scene/js/main.js +++ b/scene/js/main.js @@ -139,7 +139,7 @@ function loadScene() { child.translateY(positions[i].y); child.translateZ(positions[i].z); new_id = child.id; - child.geometry = toGeometry(child.geometry); + child.geometry = Converter.toGeometry(child.geometry); child.geometry.mergeVertices(); child.geometry.computeFaceNormals(); child.geometry.computeVertexNormals();