2
0
Эх сурвалжийг харах

SVGLoader: Fix bug with transforms of next neighbours nodes

yomboprime 6 жил өмнө
parent
commit
bf8d8f671e

+ 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();
 
 			}