Skip to content

Commit

Permalink
fix #8054
Browse files Browse the repository at this point in the history
  • Loading branch information
makc committed Feb 6, 2016
1 parent cbec484 commit 7dafd00
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions examples/js/loaders/VRMLLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ THREE.VRMLLoader.prototype = {

};

var index = [];

var parseProperty = function ( node, line ) {

var parts = [], part, property = {}, fieldName;
Expand All @@ -213,7 +215,7 @@ THREE.VRMLLoader.prototype = {
*/
var regex = /[^\s,\[\]]+/g;

var point, index, angles, colors;
var point, angles, colors;

while ( null != ( part = regex.exec( line ) ) ) {

Expand Down Expand Up @@ -255,8 +257,6 @@ THREE.VRMLLoader.prototype = {
// the parts hold the indexes as strings
if ( parts.length > 0 ) {

index = [];

for ( var ind = 0; ind < parts.length; ind ++ ) {

// the part should either be positive integer or -1
Expand Down Expand Up @@ -291,6 +291,15 @@ THREE.VRMLLoader.prototype = {
// end
if ( /]/.exec( line ) ) {

if ( index.length > 0 ) {

this.indexes.push( index );

}

// start new one
index = [];

this.isRecordingFaces = false;
node[this.recordingFieldname] = this.indexes;

Expand Down

0 comments on commit 7dafd00

Please sign in to comment.