Przeglądaj źródła

Merge pull request #17663 from yomboprime/svgnan

Fix SVGLoader strokes not rendering in Firefox
Mr.doob 5 lat temu
rodzic
commit
c534d73d84
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      examples/jsm/loaders/SVGLoader.js

+ 2 - 2
examples/jsm/loaders/SVGLoader.js

@@ -814,13 +814,13 @@ SVGLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 			function clamp( v ) {
 
-				return Math.max( 0, Math.min( 1, v ) );
+				return Math.max( 0, Math.min( 1, parseFloat( v ) ) );
 
 			}
 
 			function positive( v ) {
 
-				return Math.max( 0, v );
+				return Math.max( 0, parseFloat( v ) );
 
 			}