Typo in comment and added toGeometry in package
This commit is contained in:
parent
60d031361b
commit
566f42f5dc
|
@ -1,5 +1,7 @@
|
||||||
var toGeometry = function (bg) {
|
var Converter = {};
|
||||||
// The following snipped is from Mattatz - Masatatsu Nakamura http://mattatz.org
|
|
||||||
|
Converter.toGeometry = function (bg) {
|
||||||
|
// The following snippet is from Mattatz - Masatatsu Nakamura http://mattatz.org
|
||||||
var attrib = bg.getAttribute('position');
|
var attrib = bg.getAttribute('position');
|
||||||
if(attrib === undefined) {
|
if(attrib === undefined) {
|
||||||
throw new Error('a given BufferGeometry object must have a position attribute.');
|
throw new Error('a given BufferGeometry object must have a position attribute.');
|
||||||
|
|
|
@ -139,7 +139,7 @@ function loadScene() {
|
||||||
child.translateY(positions[i].y);
|
child.translateY(positions[i].y);
|
||||||
child.translateZ(positions[i].z);
|
child.translateZ(positions[i].z);
|
||||||
new_id = child.id;
|
new_id = child.id;
|
||||||
child.geometry = toGeometry(child.geometry);
|
child.geometry = Converter.toGeometry(child.geometry);
|
||||||
child.geometry.mergeVertices();
|
child.geometry.mergeVertices();
|
||||||
child.geometry.computeFaceNormals();
|
child.geometry.computeFaceNormals();
|
||||||
child.geometry.computeVertexNormals();
|
child.geometry.computeVertexNormals();
|
||||||
|
|
Loading…
Reference in New Issue