Browse Source

rollback renderer && update Skeleton

sjy 5 years ago
parent
commit
0fe7f0d8d4
2 changed files with 4 additions and 16 deletions
  1. 0 8
      src/objects/Skeleton.js
  2. 4 8
      src/renderers/WebGLRenderer.js

+ 0 - 8
src/objects/Skeleton.js

@@ -178,16 +178,8 @@ Object.assign( Skeleton.prototype, {
 
 			this.boneTexture = undefined;
 
-			this.boneMatrices = undefined;
-
-			this.boneTextureSize = undefined;
-
 		}
 
-		// developer need to clean skeleton reference
-
-		this.disposed = true;
-
 	}
 
 } );

+ 4 - 8
src/renderers/WebGLRenderer.js

@@ -1776,15 +1776,15 @@ function WebGLRenderer( parameters ) {
 
 		if ( material.skinning ) {
 
+			p_uniforms.setOptional( _gl, object, 'bindMatrix' );
+			p_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );
+
 			var skeleton = object.skeleton;
 
-			if ( skeleton && ! skeleton.disposed ) {
+			if ( skeleton ) {
 
 				var bones = skeleton.bones;
 
-				p_uniforms.setOptional( _gl, object, 'bindMatrix' );
-				p_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );
-
 				if ( capabilities.floatVertexTextures ) {
 
 					if ( skeleton.boneTexture === undefined ) {
@@ -1821,10 +1821,6 @@ function WebGLRenderer( parameters ) {
 
 				}
 
-			} else if ( skeleton.disposed ) {
-
-				console.warn( " skeleton is disposed" );
-
 			}
 
 		}