Explorar o código

SVGLoader: Fix bug with transforms of next neighbours nodes

yomboprime %!s(int64=7) %!d(string=hai) anos
pai
achega
bf8d8f671e
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      examples/js/loaders/SVGLoader.js

+ 4 - 1
examples/js/loaders/SVGLoader.js

@@ -120,7 +120,10 @@ THREE.SVGLoader.prototype = {
 
 			if ( transform ) {
 
-				currentTransform.copy( transformStack.pop() );
+				transformStack.pop();
+
+				if ( transformStack.length > 0 ) currentTransform.copy( transformStack[ transformStack.length - 1 ] );
+				else currentTransform.identity();
 
 			}
 

粤ICP备19079148号