瀏覽代碼

Merge pull request #15114 from Mugen87/dev11

Projector/SVGLoader: Added support for vertex colors
Mr.doob 6 年之前
父節點
當前提交
acaba2e48c
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      examples/js/renderers/Projector.js
  2. 2 2
      examples/js/renderers/SVGRenderer.js

+ 1 - 1
examples/js/renderers/Projector.js

@@ -322,7 +322,7 @@ THREE.Projector = function () {
 
 				_face.material = material;
 
-				if ( material.vertexColors === THREE.FaceColors ) {
+				if ( material.vertexColors === THREE.FaceColors ||  material.vertexColors === THREE.VertexColors ) {
 
 					_face.color.fromArray( colors, a * 3 );
 

+ 2 - 2
examples/js/renderers/SVGRenderer.js

@@ -403,7 +403,7 @@ THREE.SVGRenderer = function () {
 
 			_color.copy( material.color );
 
-			if ( material.vertexColors === THREE.FaceColors ) {
+			if ( material.vertexColors === THREE.FaceColors || material.vertexColors === THREE.VertexColors ) {
 
 				_color.multiply( element.color );
 
@@ -413,7 +413,7 @@ THREE.SVGRenderer = function () {
 
 			_diffuseColor.copy( material.color );
 
-			if ( material.vertexColors === THREE.FaceColors ) {
+			if ( material.vertexColors === THREE.FaceColors || material.vertexColors === THREE.VertexColors ) {
 
 				_diffuseColor.multiply( element.color );