diff --git a/examples/js/loaders/SVGLoader.js b/examples/js/loaders/SVGLoader.js index 836585a954caf1..7fd71f480d0dfb 100644 --- a/examples/js/loaders/SVGLoader.js +++ b/examples/js/loaders/SVGLoader.js @@ -1236,7 +1236,7 @@ let cy = 0; // Angle - angle = - array[ 0 ] * Math.PI / 180; + angle = array[ 0 ] * Math.PI / 180; if ( array.length >= 3 ) { // Center x, y @@ -1246,10 +1246,10 @@ } // Rotate around center (cx, cy) - tempTransform1.identity().translate( - cx, - cy ); - tempTransform2.identity().rotate( angle ); + tempTransform1.makeTranslation( - cx, - cy ); + tempTransform2.makeRotation( angle ); tempTransform3.multiplyMatrices( tempTransform2, tempTransform1 ); - tempTransform1.identity().translate( cx, cy ); + tempTransform1.makeTranslation( cx, cy ); currentTransform.multiplyMatrices( tempTransform1, tempTransform3 ); } diff --git a/examples/jsm/loaders/SVGLoader.js b/examples/jsm/loaders/SVGLoader.js index fd7e0c5208c8e2..ec9f81fb6652a8 100644 --- a/examples/jsm/loaders/SVGLoader.js +++ b/examples/jsm/loaders/SVGLoader.js @@ -1482,7 +1482,7 @@ class SVGLoader extends Loader { let cy = 0; // Angle - angle = - array[ 0 ] * Math.PI / 180; + angle = array[ 0 ] * Math.PI / 180; if ( array.length >= 3 ) { @@ -1493,10 +1493,10 @@ class SVGLoader extends Loader { } // Rotate around center (cx, cy) - tempTransform1.identity().translate( - cx, - cy ); - tempTransform2.identity().rotate( angle ); + tempTransform1.makeTranslation( - cx, - cy ); + tempTransform2.makeRotation( angle ); tempTransform3.multiplyMatrices( tempTransform2, tempTransform1 ); - tempTransform1.identity().translate( cx, cy ); + tempTransform1.makeTranslation( cx, cy ); currentTransform.multiplyMatrices( tempTransform1, tempTransform3 ); }