Skip to content

Commit

Permalink
added fix for trailing newlines, cleaned up cocde
Browse files Browse the repository at this point in the history
  • Loading branch information
Andor committed Jul 11, 2010
1 parent 1eecd86 commit 062ffc3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions psapi.js
Expand Up @@ -837,17 +837,25 @@ function PointStream(){
code = 6;
normalsPresent = true;
}
else if(code ==2 ){
else if(code == 2 ){
code = 6;
colorsPresent = true;
}
if(code ==9){
if(code == 9){
normalsPresent = true;
colorsPresent = true;

colorsPresent = true;
}

var values = AJAX.responseText.split(/\s+/);
// trim leading and trailing whitespace
var values = AJAX.responseText;

// trim trailing spaces
values = values.replace(/\s+$/,"");

// trim leading spaces
values = values.replace(/^\s+/,"");

values = values.split(/\s+/);

const numVerts = values.length/code;

Expand Down

0 comments on commit 062ffc3

Please sign in to comment.