Skip to content
Permalink
Browse files

SVGLoader: Clean up.

  • Loading branch information...
mrdoob committed Dec 17, 2018
1 parent 04b78fb commit b44437a5fae191b1dba87e3a9fd58ceebc7be068
Showing with 6 additions and 8 deletions.
  1. +6 −8 examples/js/loaders/SVGLoader.js
@@ -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 ) {

@@ -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;
@@ -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 ];
@@ -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 ) {

0 comments on commit b44437a

Please sign in to comment.
You can’t perform that action at this time.