Browse Source

JSM: Rebuild files

Mugen87 6 years ago
parent
commit
0544f229dd

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

@@ -2705,7 +2705,13 @@ var GLTFLoader = ( function () {
 							? new SkinnedMesh( geometry, material )
 							? new SkinnedMesh( geometry, material )
 							: new Mesh( geometry, material );
 							: new Mesh( geometry, material );
 
 
-						if ( mesh.isSkinnedMesh === true ) mesh.normalizeSkinWeights(); // #15319
+						if ( mesh.isSkinnedMesh === true && !mesh.geometry.attributes.skinWeight.normalized ) {
+
+							// we normalize floating point skin weight array to fix malformed assets (see #15319)
+							// it's important to skip this for non-float32 data since normalizeSkinWeights assumes non-normalized inputs
+							mesh.normalizeSkinWeights();
+
+						}
 
 
 						if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {
 						if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {
 
 

+ 3 - 4
examples/jsm/renderers/RaytracingRenderer.js

@@ -130,8 +130,6 @@ var RaytracingRenderer = function ( parameters ) {
 		canvasWidth = canvas.width;
 		canvasWidth = canvas.width;
 		canvasHeight = canvas.height;
 		canvasHeight = canvas.height;
 
 
-		context.fillStyle = 'white';
-
 		pool.forEach( updateSettings );
 		pool.forEach( updateSettings );
 
 
 	};
 	};
@@ -181,7 +179,6 @@ var RaytracingRenderer = function ( parameters ) {
 		} );
 		} );
 
 
 		context.fillStyle = '#' + worker.color;
 		context.fillStyle = '#' + worker.color;
-
 		context.fillRect( blockX, blockY, blockSize, blockSize );
 		context.fillRect( blockX, blockY, blockSize, blockSize );
 
 
 	}
 	}
@@ -252,7 +249,9 @@ var RaytracingRenderer = function ( parameters ) {
 
 
 		} );
 		} );
 
 
-		context.clearRect( 0, 0, canvasWidth, canvasHeight );
+		context.fillStyle = clearColor.getStyle();
+		context.fillRect( 0, 0, canvasWidth, canvasHeight );
+
 		reallyThen = Date.now();
 		reallyThen = Date.now();
 
 
 		xblocks = Math.ceil( canvasWidth / blockSize );
 		xblocks = Math.ceil( canvasWidth / blockSize );