소스 검색

Reduced the joint box size and fixed color settings for the bones.

michael 11 년 전
부모
커밋
09aeb93569
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      examples/js/BlendCharacter.js
  2. 4 2
      src/extras/helpers/BoneHelper.js

+ 1 - 1
examples/js/BlendCharacter.js

@@ -36,7 +36,7 @@ THREE.BlendCharacter = function () {
 
 			for ( var i = 0; i < self.skeleton.bones.length; ++i ) {
 
-				var helper = new THREE.BoneHelper( self.skeleton.bones[ i ], 2, 1 );
+				var helper = new THREE.BoneHelper( self.skeleton.bones[ i ], 0.5, 1 );
 				helper.update();
 				self.add( helper );
 				self.boneHelpers.push( helper );

+ 4 - 2
src/extras/helpers/BoneHelper.js

@@ -26,10 +26,12 @@ THREE.BoneHelper = function ( bone, jointBoxSize, scaleRatio ) {
     var lineMaterial = new THREE.LineBasicMaterial();
     var lineGeometry = new THREE.Geometry();
 
+    lineMaterial.vertexColors = true;
+
     lineGeometry.vertices.push( new THREE.Vector3() );
     lineGeometry.vertices.push( new THREE.Vector3() );
-    lineGeometry.colors.push( new THREE.Color( 0, 0, 0) );
-    lineGeometry.colors.push( new THREE.Color( 1, 1, 1) );
+    lineGeometry.colors.push( new THREE.Color( 1, 1, 0 ) );
+    lineGeometry.colors.push( new THREE.Color( 0, 0, 0 ) );
 
     this.line = new THREE.Line( lineGeometry, lineMaterial );
     this.add(this.line);