2
0
Mr.doob 3 жил өмнө
parent
commit
ed1e47bd7e

+ 1 - 1
examples/js/geometries/ConvexGeometry.js

@@ -2,7 +2,7 @@
 
 	class ConvexGeometry extends THREE.BufferGeometry {
 
-		constructor( points ) {
+		constructor( points = [] ) {
 
 			super(); // buffers
 

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -2884,8 +2884,8 @@
 
 			} else {
 
-				materialParams.format = THREE.RGBFormat;
 				materialParams.transparent = false;
+				materialParams.alphaWrite = false;
 
 				if ( alphaMode === ALPHA_MODES.MASK ) {
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 675 - 187
examples/js/loaders/LDrawLoader.js


+ 3 - 1
examples/js/loaders/SVGLoader.js

@@ -560,7 +560,9 @@
 
 					for ( let j = 0; j < selectorList.length; j ++ ) {
 
-						stylesheets[ selectorList[ j ] ] = Object.assign( stylesheets[ selectorList[ j ] ] || {}, stylesheet.style );
+						// Remove empty rules
+						const definitions = Object.fromEntries( Object.entries( stylesheet.style ).filter( ( [ _, v ] ) => v !== '' ) );
+						stylesheets[ selectorList[ j ] ] = Object.assign( stylesheets[ selectorList[ j ] ] || {}, definitions );
 
 					}
 

+ 7 - 13
examples/js/math/ConvexHull.js

@@ -44,27 +44,21 @@
 
 		setFromPoints( points ) {
 
-			if ( Array.isArray( points ) !== true ) {
+			// The algorithm needs at least four points.
+			if ( points.length >= 4 ) {
 
-				console.error( 'THREE.ConvexHull: Points parameter is not an array.' );
+				this.makeEmpty();
 
-			}
-
-			if ( points.length < 4 ) {
-
-				console.error( 'THREE.ConvexHull: The algorithm needs at least four points.' );
+				for ( let i = 0, l = points.length; i < l; i ++ ) {
 
-			}
-
-			this.makeEmpty();
+					this.vertices.push( new VertexNode( points[ i ] ) );
 
-			for ( let i = 0, l = points.length; i < l; i ++ ) {
+				}
 
-				this.vertices.push( new VertexNode( points[ i ] ) );
+				this.compute();
 
 			}
 
-			this.compute();
 			return this;
 
 		}

+ 0 - 1
examples/js/shaders/MMDToonShader.js

@@ -55,7 +55,6 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric
 	vec3 y = cross( viewDir, x );
 	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks
 	vec4 matcapColor = texture2D( matcap, uv );
-	matcapColor = matcapTexelToLinear( matcapColor );
 
 	#ifdef MATCAP_BLENDING_MULTIPLY
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно