Browse Source

Fix face.color is undefined in SoftwareRender.drawTriangle.

Daosheng Mu 9 năm trước cách đây
mục cha
commit
68a64a7322
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      examples/js/renderers/SoftwareRenderer.js

+ 2 - 1
examples/js/renderers/SoftwareRenderer.js

@@ -713,7 +713,8 @@ THREE.SoftwareRenderer = function ( parameters ) {
 				mpUV12 = new THREE.Vector2(),
 				mpUV23 = new THREE.Vector2(),
 				mpUV31 = new THREE.Vector2(),
-				tempFace = { vertexNormalsModel : [] };
+				tempFace = { vertexNormalsModel : []
+							, color : { r: face.color.r, g: face.color.b, b: face.color.b } };
 
 			var weight;