Jelajahi Sumber

SVGLoader: Clean up

Mugen87 5 tahun lalu
induk
melakukan
c2cf0d9733
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      examples/js/loaders/SVGLoader.js

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

@@ -801,13 +801,13 @@ THREE.SVGLoader.prototype = Object.assign( Object.create( THREE.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 ) );
 
 			}