File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -805,11 +805,11 @@ THREE.SVGLoader.prototype = {
805805 }
806806
807807 // Rotate around center (cx, cy)
808- var translation = new THREE . Matrix3 ( ) . translate ( - cx , - cy ) ;
809- var rotation = new THREE . Matrix3 ( ) . rotate ( angle ) ;
810- var translRot = new THREE . Matrix3 ( ) . multiplyMatrices ( rotation , translation ) ;
811- translation . identity ( ) . translate ( cx , cy ) ;
812- transform . multiplyMatrices ( translation , translRot ) ;
808+ tempTransform1 . identity ( ) . translate ( - cx , - cy ) ;
809+ tempTransform2 . identity ( ) . rotate ( angle ) ;
810+ tempTransform3 . multiplyMatrices ( tempTransform2 , tempTransform1 ) ;
811+ tempTransform1 . identity ( ) . translate ( cx , cy ) ;
812+ transform . multiplyMatrices ( tempTransform1 , tempTransform3 ) ;
813813
814814 }
815815
@@ -979,6 +979,10 @@ THREE.SVGLoader.prototype = {
979979
980980 var transformStack = [ ] ;
981981
982+ var tempTransform1 = new THREE . Matrix3 ( ) ;
983+ var tempTransform2 = new THREE . Matrix3 ( ) ;
984+ var tempTransform3 = new THREE . Matrix3 ( ) ;
985+
982986 var currentTransform = new THREE . Matrix3 ( ) ;
983987
984988 console . time ( 'THREE.SVGLoader: DOMParser' ) ;
You can’t perform that action at this time.
0 commit comments