Skip to content

Commit

Permalink
SVGLoader: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Dec 17, 2018
1 parent 04b78fb commit b44437a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions examples/js/loaders/SVGLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ THREE.SVGLoader.prototype = {
var type = command.charAt( 0 );
var data = command.substr( 1 ).trim();

if ( isFirstPoint ) {
if ( isFirstPoint === true ) {
doSetFirstPoint = true;
isFirstPoint = false;
}
isFirstPoint = false;

switch ( type ) {

Expand Down Expand Up @@ -432,13 +432,11 @@ THREE.SVGLoader.prototype = {

// console.log( type, parseFloats( data ), parseFloats( data ).length )

if ( doSetFirstPoint ) {

if ( doSetFirstPoint === true ) {
firstPoint.copy( point );

doSetFirstPoint = false;

}

}

return path;
Expand Down Expand Up @@ -759,7 +757,7 @@ THREE.SVGLoader.prototype = {
var transform = new THREE.Matrix3();
var currentTransform = tempTransform0;
var transformsTexts = node.getAttribute( 'transform' ).split( ' ' );

for ( var tIndex = transformsTexts.length - 1; tIndex >= 0; tIndex-- ) {

var transformText = transformsTexts[ tIndex ];
Expand All @@ -771,7 +769,7 @@ THREE.SVGLoader.prototype = {
var transformType = transformText.substr( 0, openParPos );

var array = parseFloats( transformText.substr( openParPos + 1, closeParPos - openParPos - 1 ) );

currentTransform.identity();

switch ( transformType ) {
Expand Down

0 comments on commit b44437a

Please sign in to comment.