瀏覽代碼

Material: Make .vertexColors a boolean.

Mugen87 5 年之前
父節點
當前提交
6fd43ef4e9
共有 89 個文件被更改,包括 165 次插入229 次删除
  1. 0 14
      docs/api/en/constants/Materials.html
  2. 2 2
      docs/api/en/core/Face3.html
  3. 2 4
      docs/api/en/materials/Material.html
  4. 2 5
      docs/api/en/materials/ShaderMaterial.html
  5. 0 14
      docs/api/zh/constants/Materials.html
  6. 2 2
      docs/api/zh/core/Face3.html
  7. 3 3
      docs/api/zh/materials/Material.html
  8. 3 5
      docs/api/zh/materials/ShaderMaterial.html
  9. 7 15
      docs/scenes/material-browser.html
  10. 2 8
      editor/js/Sidebar.Material.js
  11. 0 6
      editor/js/Strings.js
  12. 11 11
      editor/js/libs/tern-threejs/threejs.js
  13. 1 1
      examples/js/exporters/GLTFExporter.js
  14. 1 1
      examples/js/loaders/3MFLoader.js
  15. 1 1
      examples/js/loaders/FBXLoader.js
  16. 2 2
      examples/js/loaders/GLTFLoader.js
  17. 1 1
      examples/js/loaders/OBJLoader.js
  18. 1 1
      examples/js/loaders/PCDLoader.js
  19. 1 1
      examples/js/loaders/STLLoader.js
  20. 5 5
      examples/js/loaders/VRMLLoader.js
  21. 3 3
      examples/js/renderers/Projector.js
  22. 2 2
      examples/js/renderers/SVGRenderer.js
  23. 1 1
      examples/jsm/exporters/GLTFExporter.js
  24. 1 2
      examples/jsm/loaders/3MFLoader.js
  25. 1 2
      examples/jsm/loaders/FBXLoader.js
  26. 2 3
      examples/jsm/loaders/GLTFLoader.js
  27. 2 4
      examples/jsm/loaders/OBJLoader.js
  28. 2 3
      examples/jsm/loaders/PCDLoader.js
  29. 1 1
      examples/jsm/loaders/STLLoader.js
  30. 6 7
      examples/jsm/loaders/VRMLLoader.js
  31. 4 6
      examples/jsm/renderers/Projector.js
  32. 3 5
      examples/jsm/renderers/SVGRenderer.js
  33. 2 2
      examples/misc_controls_pointerlock.html
  34. 1 1
      examples/misc_exporter_gltf.html
  35. 2 2
      examples/svg_sandbox.html
  36. 1 1
      examples/webgl_buffergeometry.html
  37. 1 1
      examples/webgl_buffergeometry_constructed_from_geometry.html
  38. 1 1
      examples/webgl_buffergeometry_custom_attributes_particles.html
  39. 1 1
      examples/webgl_buffergeometry_drawrange.html
  40. 1 1
      examples/webgl_buffergeometry_indexed.html
  41. 1 1
      examples/webgl_buffergeometry_instancing_lambert.html
  42. 1 1
      examples/webgl_buffergeometry_lines.html
  43. 1 1
      examples/webgl_buffergeometry_lines_indexed.html
  44. 1 1
      examples/webgl_buffergeometry_points.html
  45. 1 1
      examples/webgl_buffergeometry_points_interleaved.html
  46. 1 1
      examples/webgl_buffergeometry_uint.html
  47. 1 1
      examples/webgl_effects_peppersghost.html
  48. 1 1
      examples/webgl_geometry_colors.html
  49. 1 1
      examples/webgl_geometry_colors_lookuptable.html
  50. 1 1
      examples/webgl_geometry_minecraft_ao.html
  51. 1 1
      examples/webgl_instancing_scatter.html
  52. 1 1
      examples/webgl_interactive_buffergeometry.html
  53. 2 2
      examples/webgl_interactive_cubes_gpu.html
  54. 3 3
      examples/webgl_interactive_raycasting_points.html
  55. 1 1
      examples/webgl_lines_colors.html
  56. 3 3
      examples/webgl_lines_fat.html
  57. 1 1
      examples/webgl_loader_stl.html
  58. 2 2
      examples/webgl_marchingcubes.html
  59. 1 1
      examples/webgl_modifier_subdivision.html
  60. 1 1
      examples/webgl_multiple_canvases_circle.html
  61. 1 1
      examples/webgl_multiple_canvases_complex.html
  62. 1 1
      examples/webgl_multiple_canvases_grid.html
  63. 1 1
      examples/webgl_multiple_renderers.html
  64. 1 1
      examples/webgl_multiple_views.html
  65. 1 1
      examples/webgl_postprocessing_crossfade.html
  66. 1 1
      examples/webgl_shaders_ocean.html
  67. 1 1
      examples/webgl_simple_gi.html
  68. 1 1
      examples/webgl_trails.html
  69. 1 1
      examples/webxr_vr_ballshooter.html
  70. 1 1
      examples/webxr_vr_cubes.html
  71. 1 1
      examples/webxr_vr_lorenzattractor.html
  72. 2 2
      examples/webxr_vr_rollercoaster.html
  73. 8 0
      src/Three.Legacy.d.ts
  74. 3 1
      src/Three.Legacy.js
  75. 0 6
      src/constants.d.ts
  76. 0 3
      src/constants.js
  77. 1 2
      src/helpers/AxesHelper.js
  78. 1 2
      src/helpers/CameraHelper.js
  79. 1 2
      src/helpers/GridHelper.js
  80. 1 2
      src/helpers/HemisphereLightHelper.js
  81. 1 2
      src/helpers/PolarGridHelper.js
  82. 1 2
      src/helpers/SkeletonHelper.js
  83. 14 1
      src/loaders/MaterialLoader.js
  84. 3 4
      src/materials/Material.d.ts
  85. 3 3
      src/materials/Material.js
  86. 0 1
      test/unit/editor/old_to_convert/SetMaterialValueCommand.tests.js
  87. 2 3
      test/unit/example/exporters/GLTFExporter.tests.js
  88. 0 3
      test/unit/src/constants.tests.js
  89. 2 2
      utils/modularize.js

+ 0 - 14
docs/api/en/constants/Materials.html

@@ -27,20 +27,6 @@
 		Default is [page:Constant FrontSide].
 		</p>
 
-
-		<h2>Colors</h2>
-		<code>
-		THREE.NoColors
-		THREE.FaceColors
-		THREE.VertexColors
-		</code>
-		<p>
-		[page:Constant NoColors] is the default and applies the material's color to all faces.<br />
-		[page:Constant FaceColors] colors faces according to each [page:Face3 Face3] [page:Color Color] value.<br />
-		[page:Constant VertexColors] colors faces according to each [page:Face3 Face3] vertexColors value. This is an array of three [page:Color Color]s, one for each vertex in the face.<br />
-		See the [example:webgl_geometry_colors geometry / colors] example.
-		</p>
-
 		<h2>Blending Mode</h2>
 		<code>
 		THREE.NoBlending

+ 2 - 2
docs/api/en/core/Face3.html

@@ -97,7 +97,7 @@ scene.add( new THREE.Mesh( geometry, material ) );
 		<h3>[property:Color color]</h3>
 		<p>
 		Face color - for this to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to [page:Materials THREE.FaceColors].
+		must be set to *true*.
 		</p>
 
 		<h3>[property:Array vertexNormals]</h3>
@@ -108,7 +108,7 @@ scene.add( new THREE.Mesh( geometry, material ) );
 		<h3>[property:Array vertexColors]</h3>
 		<p>
 		Array of 3 vertex colors - for these to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to [page:Materials THREE.VertexColors].
+		must be set to *true*.
 		</p>
 
 

+ 2 - 4
docs/api/en/materials/Material.html

@@ -293,11 +293,9 @@
 		This starts at *0* and counts how many times [property:Boolean needsUpdate] is set to *true*.
 		</p>
 
-		<h3>[property:Integer vertexColors]</h3>
+		<h3>[property:Boolean vertexColors]</h3>
 		<p>
-		Defines whether vertex coloring is used.
-		Default is [page:Materials THREE.NoColors].
-		Other options are [page:Materials THREE.VertexColors] and [page:Materials THREE.FaceColors].
+		Defines whether vertex coloring is used. Default is *false*.
 		</p>
 
 		<h3>[property:Boolean vertexTangents]</h3>

+ 2 - 5
docs/api/en/materials/ShaderMaterial.html

@@ -409,12 +409,9 @@ this.extensions = {
 		so updating the value of the uniform will immediately update the value available to the GLSL code.
 		</p>
 
-
-		<h3>[property:Number vertexColors]</h3>
+		<h3>[property:Boolean vertexColors]</h3>
 		<p>
-		Define how the vertices are colored, by defining how the *colors* attribute gets populated.
-		Possible values are [page:Materials THREE.NoColors], [page:Materials THREE.FaceColors] and
-		[page:Materials THREE.VertexColors]. Default is THREE.NoColors.
+		Defines whether vertex coloring is used. Default is *false*.
 		</p>
 
 		<h3>[property:String vertexShader]</h3>

+ 0 - 14
docs/api/zh/constants/Materials.html

@@ -27,20 +27,6 @@
 			默认值是[page:Constant FrontSide](只渲染正面)。
 		</p>
 
-
-		<h2>颜色</h2>
-		<code>
-		THREE.NoColors
-		THREE.FaceColors
-		THREE.VertexColors
-		</code>
-		<p>
-		[page:Constant NoColors] 是默认值,且会将材质的颜色应用到所有面。<br />
-		[page:Constant FaceColors] 根据每个[page:Face3 Face3]的[page:Color Color]值来对面进行着色。<br />
-		[page:Constant VertexColors] 根据每个 [page:Face3 Face3]的vertexColors(顶点颜色)值来对面进行着色。 这是一个包含有三个[page:Color Color]的数组,数组中每一项都对应着面中的每一个顶点。<br />
-		请查看示例:[example:webgl_geometry_colors geometry / colors]。
-		</p>
-
 		<h2>混合模式</h2>
 		<code>
 		THREE.NoBlending

+ 2 - 2
docs/api/zh/core/Face3.html

@@ -94,7 +94,7 @@ scene.add( new THREE.Mesh( geometry, material ) );
 		<h3>[property:Color color]</h3>
 		<p>
 			面的颜色值 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
-			[page:Materials THREE.FaceColors]
+			*true*
 		</p>
 
 		<h3>[property:Array vertexNormals]</h3>
@@ -105,7 +105,7 @@ scene.add( new THREE.Mesh( geometry, material ) );
 		<h3>[property:Array vertexColors]</h3>
 		<p>
 			包含 3 个顶点颜色值的队列 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
-			[page:Materials THREE.VertexColors]
+			*true*
 		</p>
 
 		<h3>[property:Integer materialIndex]</h3>

+ 3 - 3
docs/api/zh/materials/Material.html

@@ -253,9 +253,9 @@ Defines whether this material is tone mapped according to the renderer's [page:W
 This starts at *0* and counts how many times [property:Boolean needsUpdate] is set to *true*.
 </p>
 
-<h3>[property:Integer vertexColors]</h3>
-<p> 是否使用顶点着色。默认值为[page:Materials THREE.NoColors]。
-	其他选项有[page:Materials THREE.VertexColors] 和 [page:Materials THREE.FaceColors]。
+<h3>[property:Boolean vertexColors]</h3>
+<p>
+Defines whether vertex coloring is used. Default is *false*.
 </p>
 
 <h3>[property:Boolean vertexTangents]</h3>

+ 3 - 5
docs/api/zh/materials/ShaderMaterial.html

@@ -357,11 +357,9 @@ this.extensions = {
 			注意,uniforms逐帧被刷新,所以更新uniform值将立即更新GLSL代码中的相应值。
 		</p>
 
-
-		<h3>[property:Number vertexColors]</h3>
-		<p> 通过定义*colors*属性的生成方式来定义顶点是如何着色的。
-			可选值为[page:Materials THREE.NoColors], [page:Materials THREE.FaceColors] 和
-			[page:Materials THREE.VertexColors]。 缺省为 THREE.NoColors。
+		<h3>[property:Boolean vertexColors]</h3>
+		<p>
+		Defines whether vertex coloring is used. Default is *false*.
 		</p>
 
 		<h3>[property:String vertexShader]</h3>

+ 7 - 15
docs/scenes/material-browser.html

@@ -57,7 +57,6 @@
 				Scene,
 				TextureLoader,
 				TorusKnotBufferGeometry,
-				VertexColors, NoColors,
 				WebGLRenderer
 			} from "../../build/three.module.js";
 
@@ -85,13 +84,6 @@
 
 				},
 
-				colors: {
-
-					'THREE.NoColors': NoColors,
-					'THREE.VertexColors': VertexColors
-
-				},
-
 				blendingMode: {
 
 					'THREE.NoBlending': NoBlending,
@@ -294,7 +286,7 @@
 
 				return function () {
 
-					material.vertexColors = parseInt( material.vertexColors ); //Ensure number
+					material.vertexColors = material.vertexColors;
 					material.side = parseInt( material.side ); //Ensure number
 					material.needsUpdate = true;
 					geometry.attributes.position.needsUpdate = true;
@@ -397,7 +389,7 @@
 				folder.addColor( data, 'color' ).onChange( handleColorChange( material.color ) );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 
 				folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
@@ -446,7 +438,7 @@
 				folder.add( material, 'linewidth', 0, 10 );
 				folder.add( material, 'linecap', [ 'butt', 'round', 'square' ] );
 				folder.add( material, 'linejoin', [ 'round', 'bevel', 'miter' ] );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 
 			}
@@ -468,7 +460,7 @@
 
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 
 				folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
@@ -517,7 +509,7 @@
 				folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 				folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
 				folder.add( data, 'map', diffuseMapKeys ).onChange( updateTexture( material, 'map', diffuseMaps ) );
@@ -565,7 +557,7 @@
 				folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 				folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
 				folder.add( data, 'map', diffuseMapKeys ).onChange( updateTexture( material, 'map', diffuseMaps ) );
@@ -600,7 +592,7 @@
 				folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
-				folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+				folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'fog' );
 				folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
 				folder.add( data, 'map', diffuseMapKeys ).onChange( updateTexture( material, 'map', diffuseMaps ) );

+ 2 - 8
editor/js/Sidebar.Material.js

@@ -250,13 +250,7 @@ var SidebarMaterial = function ( editor ) {
 	// vertex colors
 
 	var materialVertexColorsRow = new UIRow();
-	var materialVertexColors = new UISelect().setOptions( {
-
-		0: strings.getKey( 'sidebar/material/vertexcolors/no' ),
-		1: strings.getKey( 'sidebar/material/vertexcolors/face' ),
-		2: strings.getKey( 'sidebar/material/vertexcolors/vertex' )
-
-	} ).onChange( update );
+	var materialVertexColors = new UICheckbox( false ).onChange( update );
 
 	materialVertexColorsRow.add( new UIText( strings.getKey( 'sidebar/material/vertexcolors' ) ).setWidth( '90px' ) );
 	materialVertexColorsRow.add( materialVertexColors );
@@ -699,7 +693,7 @@ var SidebarMaterial = function ( editor ) {
 
 			if ( material.vertexColors !== undefined ) {
 
-				var vertexColors = parseInt( materialVertexColors.getValue() );
+				var vertexColors = materialVertexColors.getValue();
 
 				if ( material.vertexColors !== vertexColors ) {
 

+ 0 - 6
editor/js/Strings.js

@@ -239,9 +239,6 @@ var Strings = function ( config ) {
 			'sidebar/material/clearcoat': 'Clearcoat',
 			'sidebar/material/clearcoatroughness': 'Clearcoat Roughness',
 			'sidebar/material/vertexcolors': 'Vertex Colors',
-			'sidebar/material/vertexcolors/no': 'No',
-			'sidebar/material/vertexcolors/face': 'Face',
-			'sidebar/material/vertexcolors/vertex': 'Vertex',
 			'sidebar/material/skinning': 'Skinning',
 			'sidebar/material/matcap': 'Matcap',
 			'sidebar/material/map': 'Map',
@@ -527,9 +524,6 @@ var Strings = function ( config ) {
 			'sidebar/material/clearcoat': '透明图层',
 			'sidebar/material/clearcoatroughness': '透明图层粗糙度',
 			'sidebar/material/vertexcolors': '顶点颜色',
-			'sidebar/material/vertexcolors/no': '无',
-			'sidebar/material/vertexcolors/face': '面',
-			'sidebar/material/vertexcolors/vertex': '顶点',
 			'sidebar/material/skinning': '皮肤',
 			'sidebar/material/map': '贴图',
 			'sidebar/material/alphamap': '透明贴图',

+ 11 - 11
editor/js/libs/tern-threejs/threejs.js

@@ -1979,7 +1979,7 @@
           "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer."
         },
         "vertexColors": {
-          "!type": "number",
+          "!type": "bool",
           "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "fog": {
@@ -2015,7 +2015,7 @@
           "!doc": "The size of the gap. Default is 1."
         },
         "vertexColors": {
-          "!type": "boolean",
+          "!type": "bool",
           "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "fog": {
@@ -2158,8 +2158,8 @@
           "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer."
         },
         "vertexColors": {
-          "!type": "number",
-          "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer."
+          "!type": "boolean",
+          "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "skinning": {
           "!type": "bool",
@@ -2297,8 +2297,8 @@
           "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer."
         },
         "vertexColors": {
-          "!type": "number",
-          "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer."
+          "!type": "boolean",
+          "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "skinning": {
           "!type": "bool",
@@ -2441,8 +2441,8 @@
           "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer."
         },
         "vertexColors": {
-          "!type": "number",
-          "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer."
+          "!type": "bool",
+          "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "skinning": {
           "!type": "bool",
@@ -2482,7 +2482,7 @@
         },
         "vertexColors": {
           "!type": "bool",
-          "!doc": "This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer."
+          "!doc": "This setting might not have any effect when used with certain renderers."
         },
         "fog": {
           "!type": "bool",
@@ -2548,8 +2548,8 @@
           "!doc": "Defines whether this material uses lighting; true to pass uniform data related to lighting to this shader"
         },
         "vertexColors": {
-          "!type": "number",
-          "!doc": "Define how the vertices are colored, by defining how the *colors* attribute gets populated. Possible values are [page:Materials THREE.NoColors], [page:Materials THREE.FaceColors] and [page:Materials THREE.VertexColors]. Default is THREE.NoColors."
+          "!type": "bool",
+          "!doc": "Define how the vertices are colored, by defining how the *colors* attribute gets populated. Default is false."
         },
         "skinning": {
           "!type": "bool",

+ 1 - 1
examples/js/exporters/GLTFExporter.js

@@ -1202,7 +1202,7 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
-			// @QUESTION Detect if .vertexColors = THREE.VertexColors?
+			// @QUESTION Detect if .vertexColors = true?
 			// For every attribute create an accessor
 			var modifiedAttribute = null;
 			for ( var attributeName in geometry.attributes ) {

+ 1 - 1
examples/js/loaders/3MFLoader.js

@@ -1022,7 +1022,7 @@ THREE.ThreeMFLoader.prototype = Object.assign( Object.create( THREE.Loader.proto
 
 			// material
 
-			var material = new THREE.MeshPhongMaterial( { vertexColors: THREE.VertexColors, flatShading: true } );
+			var material = new THREE.MeshPhongMaterial( { vertexColors: true, flatShading: true } );
 
 			// mesh
 

+ 1 - 1
examples/js/loaders/FBXLoader.js

@@ -1202,7 +1202,7 @@ THREE.FBXLoader = ( function () {
 
 				materials.forEach( function ( material ) {
 
-					material.vertexColors = THREE.VertexColors;
+					material.vertexColors = true;
 
 				} );
 

+ 2 - 2
examples/js/loaders/GLTFLoader.js

@@ -690,7 +690,7 @@ THREE.GLTFLoader = ( function () {
 		/*eslint-disable*/
 		Object.defineProperties(
 			this,
-			{	
+			{
 				specular: {
 					get: function () { return uniforms.specular.value; },
 					set: function ( v ) { uniforms.specular.value = v; }
@@ -1986,7 +1986,7 @@ THREE.GLTFLoader = ( function () {
 
 				if ( useSkinning ) cachedMaterial.skinning = true;
 				if ( useVertexTangents ) cachedMaterial.vertexTangents = true;
-				if ( useVertexColors ) cachedMaterial.vertexColors = THREE.VertexColors;
+				if ( useVertexColors ) cachedMaterial.vertexColors = true;
 				if ( useFlatShading ) cachedMaterial.flatShading = true;
 				if ( useMorphTargets ) cachedMaterial.morphTargets = true;
 				if ( useMorphNormals ) cachedMaterial.morphNormals = true;

+ 1 - 1
examples/js/loaders/OBJLoader.js

@@ -723,7 +723,7 @@ THREE.OBJLoader = ( function () {
 
 						material.name = sourceMaterial.name;
 						material.flatShading = sourceMaterial.smooth ? false : true;
-						material.vertexColors = hasVertexColors ? THREE.VertexColors : THREE.NoColors;
+						material.vertexColors = hasVertexColors;
 
 						state.materials[ materialHash ] = material;
 

+ 1 - 1
examples/js/loaders/PCDLoader.js

@@ -369,7 +369,7 @@ THREE.PCDLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 		if ( color.length > 0 ) {
 
-			material.vertexColors = THREE.VertexColors;
+			material.vertexColors = true;
 
 		} else {
 

+ 1 - 1
examples/js/loaders/STLLoader.js

@@ -25,7 +25,7 @@
  * For binary STLs geometry might contain colors for vertices. To use it:
  *  // use the same code to load STL as above
  *  if (geometry.hasColors) {
- *    material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: THREE.VertexColors });
+ *    material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });
  *  } else { .... }
  *  var mesh = new THREE.Mesh( geometry, material );
  *

+ 5 - 5
examples/js/loaders/VRMLLoader.js

@@ -841,7 +841,7 @@ THREE.VRMLLoader = ( function () {
 					if ( skyColor.length > 3 ) {
 
 						paintFaces( skyGeometry, radius, skyAngle, toColorArray( skyColor ), true );
-						skyMaterial.vertexColors = THREE.VertexColors;
+						skyMaterial.vertexColors = true;
 
 					} else {
 
@@ -861,7 +861,7 @@ THREE.VRMLLoader = ( function () {
 					if ( groundColor.length > 0 ) {
 
 						var groundGeometry = new THREE.SphereBufferGeometry( radius, 32, 16, 0, 2 * Math.PI, 0.5 * Math.PI, 1.5 * Math.PI );
-						var groundMaterial = new THREE.MeshBasicMaterial( { fog: false, side: THREE.BackSide, vertexColors: THREE.VertexColors, depthWrite: false, depthTest: false } );
+						var groundMaterial = new THREE.MeshBasicMaterial( { fog: false, side: THREE.BackSide, vertexColors: true, depthWrite: false, depthTest: false } );
 
 						paintFaces( groundGeometry, radius, groundAngle, toColorArray( groundColor ), false );
 
@@ -935,7 +935,7 @@ THREE.VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							pointsMaterial.vertexColors = THREE.VertexColors;
+							pointsMaterial.vertexColors = true;
 
 						} else {
 
@@ -957,7 +957,7 @@ THREE.VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							lineMaterial.vertexColors = THREE.VertexColors;
+							lineMaterial.vertexColors = true;
 
 						} else {
 
@@ -987,7 +987,7 @@ THREE.VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							material.vertexColors = THREE.VertexColors;
+							material.vertexColors = true;
 
 						}
 

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

@@ -266,7 +266,7 @@ THREE.Projector = function () {
 
 				_line.material = object.material;
 
-				if ( object.material.vertexColors === THREE.VertexColors ) {
+				if ( object.material.vertexColors === true ) {
 
 					_line.vertexColors[ 0 ].fromArray( colors, a * 3 );
 					_line.vertexColors[ 1 ].fromArray( colors, b * 3 );
@@ -320,7 +320,7 @@ THREE.Projector = function () {
 
 				_face.material = material;
 
-				if ( material.vertexColors === THREE.FaceColors || material.vertexColors === THREE.VertexColors ) {
+				if ( material.vertexColors === true ) {
 
 					_face.color.fromArray( colors, a * 3 );
 
@@ -830,7 +830,7 @@ THREE.Projector = function () {
 
 							_line.material = object.material;
 
-							if ( object.material.vertexColors === THREE.VertexColors ) {
+							if ( object.material.vertexColors === true ) {
 
 								_line.vertexColors[ 0 ].copy( object.geometry.colors[ v ] );
 								_line.vertexColors[ 1 ].copy( object.geometry.colors[ v - 1 ] );

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

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

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -1224,7 +1224,7 @@ GLTFExporter.prototype = {
 
 			}
 
-			// @QUESTION Detect if .vertexColors = THREE.VertexColors?
+			// @QUESTION Detect if .vertexColors = true?
 			// For every attribute create an accessor
 			var modifiedAttribute = null;
 			for ( var attributeName in geometry.attributes ) {

+ 1 - 2
examples/jsm/loaders/3MFLoader.js

@@ -38,7 +38,6 @@ import {
 	NearestFilter,
 	RepeatWrapping,
 	TextureLoader,
-	VertexColors,
 	sRGBEncoding
 } from "../../../build/three.module.js";
 
@@ -1046,7 +1045,7 @@ ThreeMFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 			// material
 
-			var material = new MeshPhongMaterial( { vertexColors: VertexColors, flatShading: true } );
+			var material = new MeshPhongMaterial( { vertexColors: true, flatShading: true } );
 
 			// mesh
 

+ 1 - 2
examples/jsm/loaders/FBXLoader.js

@@ -60,7 +60,6 @@ import {
 	Vector3,
 	Vector4,
 	VectorKeyframeTrack,
-	VertexColors,
 	sRGBEncoding
 } from "../../../build/three.module.js";
 import { Zlib } from "../libs/inflate.module.min.js";
@@ -1250,7 +1249,7 @@ var FBXLoader = ( function () {
 
 				materials.forEach( function ( material ) {
 
-					material.vertexColors = VertexColors;
+					material.vertexColors = true;
 
 				} );
 

+ 2 - 3
examples/jsm/loaders/GLTFLoader.js

@@ -67,7 +67,6 @@ import {
 	Vector2,
 	Vector3,
 	VectorKeyframeTrack,
-	VertexColors,
 	sRGBEncoding
 } from "../../../build/three.module.js";
 
@@ -755,7 +754,7 @@ var GLTFLoader = ( function () {
 		/*eslint-disable*/
 		Object.defineProperties(
 			this,
-			{	
+			{
 				specular: {
 					get: function () { return uniforms.specular.value; },
 					set: function ( v ) { uniforms.specular.value = v; }
@@ -2051,7 +2050,7 @@ var GLTFLoader = ( function () {
 
 				if ( useSkinning ) cachedMaterial.skinning = true;
 				if ( useVertexTangents ) cachedMaterial.vertexTangents = true;
-				if ( useVertexColors ) cachedMaterial.vertexColors = VertexColors;
+				if ( useVertexColors ) cachedMaterial.vertexColors = true;
 				if ( useFlatShading ) cachedMaterial.flatShading = true;
 				if ( useMorphTargets ) cachedMaterial.morphTargets = true;
 				if ( useMorphNormals ) cachedMaterial.morphNormals = true;

+ 2 - 4
examples/jsm/loaders/OBJLoader.js

@@ -13,10 +13,8 @@ import {
 	Material,
 	Mesh,
 	MeshPhongMaterial,
-	NoColors,
 	Points,
-	PointsMaterial,
-	VertexColors
+	PointsMaterial
 } from "../../../build/three.module.js";
 
 var OBJLoader = ( function () {
@@ -740,7 +738,7 @@ var OBJLoader = ( function () {
 
 						material.name = sourceMaterial.name;
 						material.flatShading = sourceMaterial.smooth ? false : true;
-						material.vertexColors = hasVertexColors ? VertexColors : NoColors;
+						material.vertexColors = hasVertexColors;
 
 						state.materials[ materialHash ] = material;
 

+ 2 - 3
examples/jsm/loaders/PCDLoader.js

@@ -12,8 +12,7 @@ import {
 	Loader,
 	LoaderUtils,
 	Points,
-	PointsMaterial,
-	VertexColors
+	PointsMaterial
 } from "../../../build/three.module.js";
 
 var PCDLoader = function ( manager ) {
@@ -380,7 +379,7 @@ PCDLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 		if ( color.length > 0 ) {
 
-			material.vertexColors = VertexColors;
+			material.vertexColors = true;
 
 		} else {
 

+ 1 - 1
examples/jsm/loaders/STLLoader.js

@@ -25,7 +25,7 @@
  * For binary STLs geometry might contain colors for vertices. To use it:
  *  // use the same code to load STL as above
  *  if (geometry.hasColors) {
- *    material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: THREE.VertexColors });
+ *    material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });
  *  } else { .... }
  *  var mesh = new THREE.Mesh( geometry, material );
  *

+ 6 - 7
examples/jsm/loaders/VRMLLoader.js

@@ -34,8 +34,7 @@ import {
 	SphereBufferGeometry,
 	TextureLoader,
 	Vector2,
-	Vector3,
-	VertexColors
+	Vector3
 } from "../../../build/three.module.js";
 import { chevrotain } from "../libs/chevrotain.module.min.js";
 
@@ -878,7 +877,7 @@ var VRMLLoader = ( function () {
 					if ( skyColor.length > 3 ) {
 
 						paintFaces( skyGeometry, radius, skyAngle, toColorArray( skyColor ), true );
-						skyMaterial.vertexColors = VertexColors;
+						skyMaterial.vertexColors = true;
 
 					} else {
 
@@ -898,7 +897,7 @@ var VRMLLoader = ( function () {
 					if ( groundColor.length > 0 ) {
 
 						var groundGeometry = new SphereBufferGeometry( radius, 32, 16, 0, 2 * Math.PI, 0.5 * Math.PI, 1.5 * Math.PI );
-						var groundMaterial = new MeshBasicMaterial( { fog: false, side: BackSide, vertexColors: VertexColors, depthWrite: false, depthTest: false } );
+						var groundMaterial = new MeshBasicMaterial( { fog: false, side: BackSide, vertexColors: true, depthWrite: false, depthTest: false } );
 
 						paintFaces( groundGeometry, radius, groundAngle, toColorArray( groundColor ), false );
 
@@ -972,7 +971,7 @@ var VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							pointsMaterial.vertexColors = VertexColors;
+							pointsMaterial.vertexColors = true;
 
 						} else {
 
@@ -994,7 +993,7 @@ var VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							lineMaterial.vertexColors = VertexColors;
+							lineMaterial.vertexColors = true;
 
 						} else {
 
@@ -1024,7 +1023,7 @@ var VRMLLoader = ( function () {
 
 						if ( geometry.attributes.color !== undefined ) {
 
-							material.vertexColors = VertexColors;
+							material.vertexColors = true;
 
 						}
 

+ 4 - 6
examples/jsm/renderers/Projector.js

@@ -10,7 +10,6 @@ import {
 	BufferGeometry,
 	Color,
 	DoubleSide,
-	FaceColors,
 	FrontSide,
 	Frustum,
 	Geometry,
@@ -24,8 +23,7 @@ import {
 	Sprite,
 	Vector2,
 	Vector3,
-	Vector4,
-	VertexColors
+	Vector4
 } from "../../../build/three.module.js";
 
 var RenderableObject = function () {
@@ -290,7 +288,7 @@ var Projector = function () {
 
 				_line.material = object.material;
 
-				if ( object.material.vertexColors === VertexColors ) {
+				if ( object.material.vertexColors === true ) {
 
 					_line.vertexColors[ 0 ].fromArray( colors, a * 3 );
 					_line.vertexColors[ 1 ].fromArray( colors, b * 3 );
@@ -344,7 +342,7 @@ var Projector = function () {
 
 				_face.material = material;
 
-				if ( material.vertexColors === FaceColors || material.vertexColors === VertexColors ) {
+				if ( material.vertexColors === true ) {
 
 					_face.color.fromArray( colors, a * 3 );
 
@@ -854,7 +852,7 @@ var Projector = function () {
 
 							_line.material = object.material;
 
-							if ( object.material.vertexColors === VertexColors ) {
+							if ( object.material.vertexColors === true ) {
 
 								_line.vertexColors[ 0 ].copy( object.geometry.colors[ v ] );
 								_line.vertexColors[ 1 ].copy( object.geometry.colors[ v - 1 ] );

+ 3 - 5
examples/jsm/renderers/SVGRenderer.js

@@ -6,12 +6,10 @@ import {
 	Box2,
 	Camera,
 	Color,
-	FaceColors,
 	Matrix3,
 	Matrix4,
 	Object3D,
-	Vector3,
-	VertexColors
+	Vector3
 } from "../../../build/three.module.js";
 import { Projector } from "../renderers/Projector.js";
 import { RenderableFace } from "../renderers/Projector.js";
@@ -417,7 +415,7 @@ var SVGRenderer = function () {
 
 			_color.copy( material.color );
 
-			if ( material.vertexColors === FaceColors || material.vertexColors === VertexColors ) {
+			if ( material.vertexColors === true ) {
 
 				_color.multiply( element.color );
 
@@ -427,7 +425,7 @@ var SVGRenderer = function () {
 
 			_diffuseColor.copy( material.color );
 
-			if ( material.vertexColors === FaceColors || material.vertexColors === VertexColors ) {
+			if ( material.vertexColors === true ) {
 
 				_diffuseColor.multiply( element.color );
 

+ 2 - 2
examples/misc_controls_pointerlock.html

@@ -224,7 +224,7 @@
 
 				floorGeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
-				var floorMaterial = new THREE.MeshBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var floorMaterial = new THREE.MeshBasicMaterial( { vertexColors: true } );
 
 				var floor = new THREE.Mesh( floorGeometry, floorMaterial );
 				scene.add( floor );
@@ -248,7 +248,7 @@
 
 				for ( var i = 0; i < 500; i ++ ) {
 
-					var boxMaterial = new THREE.MeshPhongMaterial( { specular: 0xffffff, flatShading: true, vertexColors: THREE.VertexColors } );
+					var boxMaterial = new THREE.MeshPhongMaterial( { specular: 0xffffff, flatShading: true, vertexColors: true } );
 					boxMaterial.color.setHSL( Math.random() * 0.2 + 0.5, 0.75, Math.random() * 0.25 + 0.75 );
 
 					var box = new THREE.Mesh( boxGeometry, boxMaterial );

+ 1 - 1
examples/misc_exporter_gltf.html

@@ -369,7 +369,7 @@
 				geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
 				geometry.setDrawRange( 0, numElements );
 
-				object = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { side: THREE.DoubleSide, vertexColors: THREE.VertexColors } ) );
+				object = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { side: THREE.DoubleSide, vertexColors: true } ) );
 				object.name = 'Custom buffered truncated';
 				object.position.set( 140, - 40, - 200 );
 

+ 2 - 2
examples/svg_sandbox.html

@@ -41,7 +41,7 @@
 				var loader = new THREE.BufferGeometryLoader();
 				loader.load( 'models/json/QRCode_buffergeometry.json', function ( geometry ) {
 
-					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { vertexColors: THREE.VertexColors } ) );
+					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { vertexColors: true } ) );
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 					scene.add( mesh );
 
@@ -84,7 +84,7 @@
 				// POLYFIELD
 
 				var geometry = new THREE.BufferGeometry();
-				var material = new THREE.MeshBasicMaterial( { vertexColors: THREE.VertexColors, side: THREE.DoubleSide } );
+				var material = new THREE.MeshBasicMaterial( { vertexColors: true, side: THREE.DoubleSide } );
 
 				var v = new THREE.Vector3();
 				var v0 = new THREE.Vector3();

+ 1 - 1
examples/webgl_buffergeometry.html

@@ -145,7 +145,7 @@
 
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xaaaaaa, specular: 0xffffff, shininess: 250,
-					side: THREE.DoubleSide, vertexColors: THREE.VertexColors
+					side: THREE.DoubleSide, vertexColors: true
 				} );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 1 - 1
examples/webgl_buffergeometry_constructed_from_geometry.html

@@ -162,7 +162,7 @@
 				bufferGeometry.setAttribute( 'normal', new THREE.Float32BufferAttribute( normals, 3 ) );
 				bufferGeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
-				var material = new THREE.MeshPhongMaterial( { shininess: 80, vertexColors: THREE.VertexColors } );
+				var material = new THREE.MeshPhongMaterial( { shininess: 80, vertexColors: true } );
 
 				var mesh = new THREE.Mesh( bufferGeometry, material );
 				scene.add( mesh );

+ 1 - 1
examples/webgl_buffergeometry_custom_attributes_particles.html

@@ -83,7 +83,7 @@
 					blending: THREE.AdditiveBlending,
 					depthTest: false,
 					transparent: true,
-					vertexColors: THREE.VertexColors
+					vertexColors: true
 
 				} );
 

+ 1 - 1
examples/webgl_buffergeometry_drawrange.html

@@ -155,7 +155,7 @@
 				geometry.setDrawRange( 0, 0 );
 
 				var material = new THREE.LineBasicMaterial( {
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					blending: THREE.AdditiveBlending,
 					transparent: true
 				} );

+ 1 - 1
examples/webgl_buffergeometry_indexed.html

@@ -112,7 +112,7 @@
 
 				var material = new THREE.MeshPhongMaterial( {
 					side: THREE.DoubleSide,
-					vertexColors: THREE.VertexColors
+					vertexColors: true
 				} );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 1 - 1
examples/webgl_buffergeometry_instancing_lambert.html

@@ -260,7 +260,7 @@
 				combine: THREE.MultiplyOperation,
 				reflectivity: 0.8,
 
-				vertexColors: THREE.VertexColors,
+				vertexColors: true,
 				fog: true
 
 			} );

+ 1 - 1
examples/webgl_buffergeometry_lines.html

@@ -44,7 +44,7 @@
 				var segments = 10000;
 
 				var geometry = new THREE.BufferGeometry();
-				var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var material = new THREE.LineBasicMaterial( { vertexColors: true } );
 
 				var positions = [];
 				var colors = [];

+ 1 - 1
examples/webgl_buffergeometry_lines_indexed.html

@@ -42,7 +42,7 @@
 				scene = new THREE.Scene();
 
 				var geometry = new THREE.BufferGeometry();
-				var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var material = new THREE.LineBasicMaterial( { vertexColors: true } );
 
 				var indices = [];
 				var positions = [];

+ 1 - 1
examples/webgl_buffergeometry_points.html

@@ -81,7 +81,7 @@
 
 				//
 
-				var material = new THREE.PointsMaterial( { size: 15, vertexColors: THREE.VertexColors } );
+				var material = new THREE.PointsMaterial( { size: 15, vertexColors: true } );
 
 				points = new THREE.Points( geometry, material );
 				scene.add( points );

+ 1 - 1
examples/webgl_buffergeometry_points_interleaved.html

@@ -95,7 +95,7 @@
 
 				//
 
-				var material = new THREE.PointsMaterial( { size: 15, vertexColors: THREE.VertexColors } );
+				var material = new THREE.PointsMaterial( { size: 15, vertexColors: true } );
 
 				points = new THREE.Points( geometry, material );
 				scene.add( points );

+ 1 - 1
examples/webgl_buffergeometry_uint.html

@@ -146,7 +146,7 @@
 
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xaaaaaa, specular: 0xffffff, shininess: 250,
-					side: THREE.DoubleSide, vertexColors: THREE.VertexColors
+					side: THREE.DoubleSide, vertexColors: true
 				} );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 1 - 1
examples/webgl_effects_peppersghost.html

@@ -70,7 +70,7 @@
 
 				geometry.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
-				var material = new THREE.MeshBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var material = new THREE.MeshBasicMaterial( { vertexColors: true } );
 
 				for ( var i = 0; i < 10; i ++ ) {
 

+ 1 - 1
examples/webgl_geometry_colors.html

@@ -124,7 +124,7 @@
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xffffff,
 					flatShading: true,
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					shininess: 0
 				} );
 

+ 1 - 1
examples/webgl_geometry_colors_lookuptable.html

@@ -74,7 +74,7 @@
 				mesh = new THREE.Mesh( undefined, new THREE.MeshLambertMaterial( {
 					side: THREE.DoubleSide,
 					color: 0xF5F5F5,
-					vertexColors: THREE.VertexColors
+					vertexColors: true
 				} ) );
 				scene.add( mesh );
 

+ 1 - 1
examples/webgl_geometry_minecraft_ao.html

@@ -242,7 +242,7 @@
 
 				var mesh = new THREE.Mesh(
 					geometry,
-					new THREE.MeshLambertMaterial( { map: texture, vertexColors: THREE.VertexColors, side: THREE.DoubleSide } )
+					new THREE.MeshLambertMaterial( { map: texture, vertexColors: true, side: THREE.DoubleSide } )
 				);
 				scene.add( mesh );
 

+ 1 - 1
examples/webgl_instancing_scatter.html

@@ -95,7 +95,7 @@
 				}
 
 				blossomGeometry.setAttribute( 'color', new THREE.InstancedBufferAttribute( color, 3 ) );
-				blossomMaterial.vertexColors = THREE.VertexColors;
+				blossomMaterial.vertexColors = true;
 
 				stemMesh = new THREE.InstancedMesh( stemGeometry, stemMaterial, count );
 				blossomMesh = new THREE.InstancedMesh( blossomGeometry, blossomMaterial, count );

+ 1 - 1
examples/webgl_interactive_buffergeometry.html

@@ -165,7 +165,7 @@
 
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xaaaaaa, specular: 0xffffff, shininess: 250,
-					side: THREE.DoubleSide, vertexColors: THREE.VertexColors
+					side: THREE.DoubleSide, vertexColors: true
 				} );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 2 - 2
examples/webgl_interactive_cubes_gpu.html

@@ -62,8 +62,8 @@
 				light.position.set( 0, 500, 2000 );
 				scene.add( light );
 
-				var pickingMaterial = new THREE.MeshBasicMaterial( { vertexColors: THREE.VertexColors } );
-				var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: THREE.VertexColors, shininess: 0	} );
+				var pickingMaterial = new THREE.MeshBasicMaterial( { vertexColors: true } );
+				var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: true, shininess: 0	} );
 
 				function applyVertexColors( geometry, color ) {
 

+ 3 - 3
examples/webgl_interactive_raycasting_points.html

@@ -81,7 +81,7 @@
 			function generatePointcloud( color, width, length ) {
 
 				var geometry = generatePointCloudGeometry( color, width, length );
-				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: THREE.VertexColors } );
+				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: true } );
 
 				return new THREE.Points( geometry, material );
 
@@ -108,7 +108,7 @@
 
 				geometry.setIndex( new THREE.BufferAttribute( indices, 1 ) );
 
-				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: THREE.VertexColors } );
+				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: true } );
 
 				return new THREE.Points( geometry, material );
 
@@ -136,7 +136,7 @@
 				geometry.setIndex( new THREE.BufferAttribute( indices, 1 ) );
 				geometry.addGroup( 0, indices.length );
 
-				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: THREE.VertexColors } );
+				var material = new THREE.PointsMaterial( { size: pointSize, vertexColors: true } );
 
 				return new THREE.Points( geometry, material );
 

+ 1 - 1
examples/webgl_lines_colors.html

@@ -125,7 +125,7 @@
 
 				// Create lines and add to scene
 
-				var	material = new THREE.LineBasicMaterial( { color: 0xffffff, vertexColors: THREE.VertexColors } );
+				var	material = new THREE.LineBasicMaterial( { color: 0xffffff, vertexColors: true } );
 
 				var line, p, scale = 0.3, d = 225;
 

+ 3 - 3
examples/webgl_lines_fat.html

@@ -92,7 +92,7 @@
 
 					color: 0xffffff,
 					linewidth: 5, // in pixels
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					//resolution:  // to be set by renderer, eventually
 					dashed: false
 
@@ -110,8 +110,8 @@
 				geo.setAttribute( 'position', new THREE.Float32BufferAttribute( positions, 3 ) );
 				geo.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
-				matLineBasic = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
-				matLineDashed = new THREE.LineDashedMaterial( { vertexColors: THREE.VertexColors, scale: 2, dashSize: 1, gapSize: 1 } );
+				matLineBasic = new THREE.LineBasicMaterial( { vertexColors: true } );
+				matLineDashed = new THREE.LineDashedMaterial( { vertexColors: true, scale: 2, dashSize: 1, gapSize: 1 } );
 
 				line1 = new THREE.Line( geo, matLineBasic );
 				line1.computeLineDistances();

+ 1 - 1
examples/webgl_loader_stl.html

@@ -116,7 +116,7 @@
 					var meshMaterial = material;
 					if ( geometry.hasColors ) {
 
-						meshMaterial = new THREE.MeshPhongMaterial( { opacity: geometry.alpha, vertexColors: THREE.VertexColors } );
+						meshMaterial = new THREE.MeshPhongMaterial( { opacity: geometry.alpha, vertexColors: true } );
 
 					}
 

+ 2 - 2
examples/webgl_marchingcubes.html

@@ -194,12 +194,12 @@
 				},
 
 				"colors": {
-					m: new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0xffffff, shininess: 2, vertexColors: THREE.VertexColors } ),
+					m: new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0xffffff, shininess: 2, vertexColors: true } ),
 					h: 0, s: 0, l: 1
 				},
 
 				"multiColors": {
-					m: new THREE.MeshPhongMaterial( { shininess: 2, vertexColors: THREE.VertexColors } ),
+					m: new THREE.MeshPhongMaterial( { shininess: 2, vertexColors: true } ),
 					h: 0, s: 0, l: 1
 				},
 

+ 1 - 1
examples/webgl_modifier_subdivision.html

@@ -34,7 +34,7 @@
 
 			var camera, scene, renderer, stats, smoothMesh, wireframe;
 
-			var smoothMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: THREE.VertexColors } );
+			var smoothMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: true } );
 			var wireframeMaterial = new THREE.MeshBasicMaterial( { color: 0x000000, wireframe: true, opacity: 0.15, transparent: true } );
 
 			var faceIndices = [ 'a', 'b', 'c' ];

+ 1 - 1
examples/webgl_multiple_canvases_circle.html

@@ -260,7 +260,7 @@
 			var material = new THREE.MeshPhongMaterial( {
 				color: 0xffffff,
 				flatShading: true,
-				vertexColors: THREE.VertexColors,
+				vertexColors: true,
 				shininess: 0
 			} );
 

+ 1 - 1
examples/webgl_multiple_canvases_complex.html

@@ -187,7 +187,7 @@
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xffffff,
 					flatShading: true,
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					shininess: 0
 				} );
 

+ 1 - 1
examples/webgl_multiple_canvases_grid.html

@@ -208,7 +208,7 @@
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xffffff,
 					flatShading: true,
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					shininess: 0
 				} );
 

+ 1 - 1
examples/webgl_multiple_renderers.html

@@ -117,7 +117,7 @@
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xffffff,
 					flatShading: true,
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					shininess: 0
 				} );
 

+ 1 - 1
examples/webgl_multiple_views.html

@@ -174,7 +174,7 @@
 				var material = new THREE.MeshPhongMaterial( {
 					color: 0xffffff,
 					flatShading: true,
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					shininess: 0
 				} );
 

+ 1 - 1
examples/webgl_postprocessing_crossfade.html

@@ -198,7 +198,7 @@
 
 				this.rotationSpeed = rotationSpeed;
 
-				var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: THREE.VertexColors } );
+				var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, flatShading: true, vertexColors: true } );
 				this.mesh = new THREE.Mesh( generateGeometry( type, numObjects ), defaultMaterial );
 				this.scene.add( this.mesh );
 

+ 1 - 1
examples/webgl_shaders_ocean.html

@@ -146,7 +146,7 @@
 				geometry.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
 				var material = new THREE.MeshStandardMaterial( {
-					vertexColors: THREE.VertexColors,
+					vertexColors: true,
 					roughness: 0.0,
 					flatShading: true,
 					envMap: cubeCamera.renderTarget.texture,

+ 1 - 1
examples/webgl_simple_gi.html

@@ -159,7 +159,7 @@
 				// sphere
 
 				var geometry = new THREE.TorusKnotBufferGeometry( 0.75, 0.3, 128, 32, 1 );
-				var material = new THREE.MeshBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var material = new THREE.MeshBasicMaterial( { vertexColors: true } );
 
 				var mesh = new THREE.Mesh( geometry, material );
 				scene.add( mesh );

+ 1 - 1
examples/webgl_trails.html

@@ -48,7 +48,7 @@
 				geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( positions, 3 ) );
 				geometry.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
 
-				var material = new THREE.PointsMaterial( { size: 4, vertexColors: THREE.VertexColors, depthTest: false, sizeAttenuation: false } );
+				var material = new THREE.PointsMaterial( { size: 4, vertexColors: true, depthTest: false, sizeAttenuation: false } );
 
 				var mesh = new THREE.Points( geometry, material );
 				scene.add( mesh );

+ 1 - 1
examples/webxr_vr_ballshooter.html

@@ -166,7 +166,7 @@
 						geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( [ 0, 0, 0, 0, 0, - 1 ], 3 ) );
 						geometry.setAttribute( 'color', new THREE.Float32BufferAttribute( [ 0.5, 0.5, 0.5, 0, 0, 0 ], 3 ) );
 
-						var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors, blending: THREE.AdditiveBlending } );
+						var material = new THREE.LineBasicMaterial( { vertexColors: true, blending: THREE.AdditiveBlending } );
 
 						return new THREE.Line( geometry, material );
 

+ 1 - 1
examples/webxr_vr_cubes.html

@@ -148,7 +148,7 @@
 						geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( [ 0, 0, 0, 0, 0, - 1 ], 3 ) );
 						geometry.setAttribute( 'color', new THREE.Float32BufferAttribute( [ 0.5, 0.5, 0.5, 0, 0, 0 ], 3 ) );
 
-						var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors, blending: THREE.AdditiveBlending } );
+						var material = new THREE.LineBasicMaterial( { vertexColors: true, blending: THREE.AdditiveBlending } );
 
 						return new THREE.Line( geometry, material );
 

+ 1 - 1
examples/webxr_vr_lorenzattractor.html

@@ -106,7 +106,7 @@
 
 				geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
 
-				var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
+				var material = new THREE.LineBasicMaterial( { vertexColors: true } );
 
 				attractor = new THREE.Line( geometry, material );
 				attractor.position.set( 0, 1.5, - 2 );

+ 2 - 2
examples/webxr_vr_rollercoaster.html

@@ -79,7 +79,7 @@
 
 			var geometry = new TreesGeometry( mesh );
 			var material = new THREE.MeshBasicMaterial( {
-				side: THREE.DoubleSide, vertexColors: THREE.VertexColors
+				side: THREE.DoubleSide, vertexColors: true
 			} );
 			var mesh = new THREE.Mesh( geometry, material );
 			scene.add( mesh );
@@ -129,7 +129,7 @@
 
 			var geometry = new RollerCoasterGeometry( curve, 1500 );
 			var material = new THREE.MeshPhongMaterial( {
-				vertexColors: THREE.VertexColors
+				vertexColors: true
 			} );
 			var mesh = new THREE.Mesh( geometry, material );
 			scene.add( mesh );

+ 8 - 0
src/Three.Legacy.d.ts

@@ -11,3 +11,11 @@ export namespace SceneUtils {
 	export function detach( child: Object3D, parent: Object3D, scene: Scene ): void;
 	export function attach( child: Object3D, scene: Scene, parent: Object3D ): void;
 }
+
+/**
+ * @deprecated Material.vertexColors is now a boolean.
+ */
+export enum Colors {}
+export const NoColors: Colors;
+export const FaceColors: Colors;
+export const VertexColors: Colors;

+ 3 - 1
src/Three.Legacy.js

@@ -100,8 +100,10 @@ export function Face4( a, b, c, d, normal, color, materialIndex ) {
 }
 
 export var LineStrip = 0;
-
 export var LinePieces = 1;
+export var NoColors = 0;
+export var FaceColors = 1;
+export var VertexColors = 2;
 
 export function MeshFaceMaterial( materials ) {
 

+ 0 - 6
src/constants.d.ts

@@ -48,12 +48,6 @@ export enum Shading {}
 export const FlatShading: Shading;
 export const SmoothShading: Shading;
 
-// colors
-export enum Colors {}
-export const NoColors: Colors;
-export const FaceColors: Colors;
-export const VertexColors: Colors;
-
 // blending modes
 export enum Blending {}
 export const NoBlending: Blending;

+ 0 - 3
src/constants.js

@@ -16,9 +16,6 @@ export var BackSide = 1;
 export var DoubleSide = 2;
 export var FlatShading = 1;
 export var SmoothShading = 2;
-export var NoColors = 0;
-export var FaceColors = 1;
-export var VertexColors = 2;
 export var NoBlending = 0;
 export var NormalBlending = 1;
 export var AdditiveBlending = 2;

+ 1 - 2
src/helpers/AxesHelper.js

@@ -4,7 +4,6 @@
  */
 
 import { LineSegments } from '../objects/LineSegments.js';
-import { VertexColors } from '../constants.js';
 import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
@@ -29,7 +28,7 @@ function AxesHelper( size ) {
 	geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
 	geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
 
-	var material = new LineBasicMaterial( { vertexColors: VertexColors } );
+	var material = new LineBasicMaterial( { vertexColors: true } );
 
 	LineSegments.call( this, geometry, material );
 

+ 1 - 2
src/helpers/CameraHelper.js

@@ -12,7 +12,6 @@ import { Camera } from '../cameras/Camera.js';
 import { Vector3 } from '../math/Vector3.js';
 import { LineSegments } from '../objects/LineSegments.js';
 import { Color } from '../math/Color.js';
-import { FaceColors } from '../constants.js';
 import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
@@ -23,7 +22,7 @@ var _camera = new Camera();
 function CameraHelper( camera ) {
 
 	var geometry = new BufferGeometry();
-	var material = new LineBasicMaterial( { color: 0xffffff, vertexColors: FaceColors } );
+	var material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true } );
 
 	var vertices = [];
 	var colors = [];

+ 1 - 2
src/helpers/GridHelper.js

@@ -3,7 +3,6 @@
  */
 
 import { LineSegments } from '../objects/LineSegments.js';
-import { VertexColors } from '../constants.js';
 import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
@@ -40,7 +39,7 @@ function GridHelper( size, divisions, color1, color2 ) {
 	geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
 	geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
 
-	var material = new LineBasicMaterial( { vertexColors: VertexColors } );
+	var material = new LineBasicMaterial( { vertexColors: true } );
 
 	LineSegments.call( this, geometry, material );
 

+ 1 - 2
src/helpers/HemisphereLightHelper.js

@@ -8,7 +8,6 @@ import { Vector3 } from '../math/Vector3.js';
 import { Color } from '../math/Color.js';
 import { Object3D } from '../core/Object3D.js';
 import { Mesh } from '../objects/Mesh.js';
-import { VertexColors } from '../constants.js';
 import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
 import { OctahedronBufferGeometry } from '../geometries/OctahedronGeometry.js';
 import { BufferAttribute } from '../core/BufferAttribute.js';
@@ -33,7 +32,7 @@ function HemisphereLightHelper( light, size, color ) {
 	geometry.rotateY( Math.PI * 0.5 );
 
 	this.material = new MeshBasicMaterial( { wireframe: true, fog: false } );
-	if ( this.color === undefined ) this.material.vertexColors = VertexColors;
+	if ( this.color === undefined ) this.material.vertexColors = true;
 
 	var position = geometry.getAttribute( 'position' );
 	var colors = new Float32Array( position.count * 3 );

+ 1 - 2
src/helpers/PolarGridHelper.js

@@ -5,7 +5,6 @@
  */
 
 import { LineSegments } from '../objects/LineSegments.js';
-import { VertexColors } from '../constants.js';
 import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
@@ -83,7 +82,7 @@ function PolarGridHelper( radius, radials, circles, divisions, color1, color2 )
 	geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
 	geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
 
-	var material = new LineBasicMaterial( { vertexColors: VertexColors } );
+	var material = new LineBasicMaterial( { vertexColors: true } );
 
 	LineSegments.call( this, geometry, material );
 

+ 1 - 2
src/helpers/SkeletonHelper.js

@@ -8,7 +8,6 @@
 
 import { LineSegments } from '../objects/LineSegments.js';
 import { Matrix4 } from '../math/Matrix4.js';
-import { VertexColors } from '../constants.js';
 import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { Color } from '../math/Color.js';
 import { Vector3 } from '../math/Vector3.js';
@@ -70,7 +69,7 @@ function SkeletonHelper( object ) {
 	geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
 	geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
 
-	var material = new LineBasicMaterial( { vertexColors: VertexColors, depthTest: false, depthWrite: false, transparent: true } );
+	var material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, transparent: true } );
 
 	LineSegments.call( this, geometry, material );
 

+ 14 - 1
src/loaders/MaterialLoader.js

@@ -67,7 +67,6 @@ MaterialLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 		if ( json.shininess !== undefined ) material.shininess = json.shininess;
 		if ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;
 		if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;
-		if ( json.vertexColors !== undefined ) material.vertexColors = json.vertexColors;
 		if ( json.fog !== undefined ) material.fog = json.fog;
 		if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
 		if ( json.blending !== undefined ) material.blending = json.blending;
@@ -116,6 +115,20 @@ MaterialLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 		if ( json.userData !== undefined ) material.userData = json.userData;
 
+		if ( json.vertexColors !== undefined ) {
+
+			if ( typeof json.vertexColors === 'number' ) {
+
+				material.vertexColors = ( json.vertexColors > 0 ) ? true : false;
+
+			} else {
+
+				material.vertexColors = json.vertexColors;
+
+			}
+
+		}
+
 		// Shader Material
 
 		if ( json.uniforms !== undefined ) {

+ 3 - 4
src/materials/Material.d.ts

@@ -9,7 +9,6 @@ import {
 	BlendingSrcFactor,
 	DepthModes,
 	Side,
-	Colors,
 	StencilFunc,
 	StencilOp
 } from '../constants';
@@ -48,7 +47,7 @@ export interface MaterialParameters {
 	shadowSide?: Side;
 	toneMapped?: boolean;
 	transparent?: boolean;
-	vertexColors?: Colors;
+	vertexColors?: boolean;
 	vertexTangents?: boolean;
 	visible?: boolean;
 	stencilWrite?: boolean;
@@ -287,9 +286,9 @@ export class Material extends EventDispatcher {
 	uuid: string;
 
 	/**
-	 * Defines whether vertex coloring is used. Default is THREE.NoColors. Other options are THREE.VertexColors and THREE.FaceColors.
+	 * Defines whether vertex coloring is used. Default is false.
 	 */
-	vertexColors: Colors;
+	vertexColors: boolean;
 
 	/**
 	 * Defines whether precomputed vertex tangents are used. Default is false.

+ 3 - 3
src/materials/Material.js

@@ -1,5 +1,5 @@
 import { EventDispatcher } from '../core/EventDispatcher.js';
-import { NoColors, FrontSide, FlatShading, NormalBlending, LessEqualDepth, AddEquation, OneMinusSrcAlphaFactor, SrcAlphaFactor, AlwaysStencilFunc, KeepStencilOp } from '../constants.js';
+import { FrontSide, FlatShading, NormalBlending, LessEqualDepth, AddEquation, OneMinusSrcAlphaFactor, SrcAlphaFactor, AlwaysStencilFunc, KeepStencilOp } from '../constants.js';
 import { MathUtils } from '../math/MathUtils.js';
 
 /**
@@ -24,7 +24,7 @@ function Material() {
 	this.side = FrontSide;
 	this.flatShading = false;
 	this.vertexTangents = false;
-	this.vertexColors = NoColors; // THREE.NoColors, THREE.VertexColors, THREE.FaceColors
+	this.vertexColors = false;
 
 	this.opacity = 1;
 	this.transparent = false;
@@ -249,7 +249,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 		if ( this.blending !== NormalBlending ) data.blending = this.blending;
 		if ( this.flatShading === true ) data.flatShading = this.flatShading;
 		if ( this.side !== FrontSide ) data.side = this.side;
-		if ( this.vertexColors !== NoColors ) data.vertexColors = this.vertexColors;
+		if ( this.vertexColors === true || this.vertexColors > 0 ) data.vertexColors = true;
 
 		if ( this.opacity < 1 ) data.opacity = this.opacity;
 		if ( this.transparent === true ) data.transparent = this.transparent;

+ 0 - 1
test/unit/editor/old_to_convert/SetMaterialValueCommand.tests.js

@@ -20,7 +20,6 @@ QUnit.test( "Test for SetMaterialValueCommand (Undo and Redo)", function( assert
 		uuid: [ THREE.Math.generateUUID(), THREE.Math.generateUUID(), THREE.Math.generateUUID() ],
 		name: [ 'Alpha', 'Bravo', 'Charlie' ],
 		shininess: [ 11.1, 22.2, 33.3 ],
-		vertexColors: [ 'No', 'Face', 'Vertex' ],
 		bumpScale: [ 1.1, 2.2, 3.3 ],
 		reflectivity: [ - 1.3, 2.1, 5.0 ],
 		aoMapIntensity: [ 0.1, 0.4, 0.7 ],

+ 2 - 3
test/unit/example/exporters/GLTFExporter.tests.js

@@ -19,8 +19,7 @@ import { VectorKeyframeTrack } from '../../../../src/animation/tracks/VectorKeyf
 import {
 	DoubleSide,
 	InterpolateLinear,
-	InterpolateDiscrete,
-	VertexColors,
+	InterpolateDiscrete
 } from '../../../../src/constants.js';
 
 export default QUnit.module( 'Exporters', () => {
@@ -155,7 +154,7 @@ export default QUnit.module( 'Exporters', () => {
 			geometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );
 			geometry.setDrawRange( 0, 0 );
 
-			var empty = new Mesh( geometry, new MeshBasicMaterial( { side: DoubleSide, vertexColors: VertexColors } ) );
+			var empty = new Mesh( geometry, new MeshBasicMaterial( { side: DoubleSide, vertexColors: true } ) );
 			empty.name = 'Custom buffered empty (drawrange)';
 			scene.add( empty );
 

+ 0 - 3
test/unit/src/constants.tests.js

@@ -25,9 +25,6 @@ export default QUnit.module( 'Constants', () => {
 		assert.equal( Constants.DoubleSide, 2, 'DoubleSide is equal to 2' );
 		assert.equal( Constants.FlatShading, 1, 'FlatShading is equal to 1' );
 		assert.equal( Constants.SmoothShading, 2, 'SmoothShading is equal to 2' );
-		assert.equal( Constants.NoColors, 0, 'NoColors is equal to 0' );
-		assert.equal( Constants.FaceColors, 1, 'FaceColors is equal to 1' );
-		assert.equal( Constants.VertexColors, 2, 'VertexColors is equal to 2' );
 		assert.equal( Constants.NoBlending, 0, 'NoBlending is equal to 0' );
 		assert.equal( Constants.NormalBlending, 1, 'NormalBlending is equal to 1' );
 		assert.equal( Constants.AdditiveBlending, 2, 'AdditiveBlending is equal to 2' );

+ 2 - 2
utils/modularize.js

@@ -41,7 +41,7 @@ var files = [
 
 	{ path: 'exporters/ColladaExporter.js', dependencies: [], ignoreList: [] },
 	{ path: 'exporters/DRACOExporter.js', dependencies: [], ignoreList: [ 'Geometry' ] },
-	{ path: 'exporters/GLTFExporter.js', dependencies: [], ignoreList: [ 'AnimationClip', 'Camera', 'Geometry', 'Material', 'Mesh', 'Object3D', 'RGBFormat', 'Scenes', 'ShaderMaterial', 'VertexColors' ] },
+	{ path: 'exporters/GLTFExporter.js', dependencies: [], ignoreList: [ 'AnimationClip', 'Camera', 'Geometry', 'Material', 'Mesh', 'Object3D', 'RGBFormat', 'Scenes', 'ShaderMaterial' ] },
 	{ path: 'exporters/MMDExporter.js', dependencies: [ { name: 'MMDParser', path: 'libs/mmdparser.module.js' } ], ignoreList: [] },
 	{ path: 'exporters/OBJExporter.js', dependencies: [], ignoreList: [] },
 	{ path: 'exporters/PLYExporter.js', dependencies: [], ignoreList: [] },
@@ -97,7 +97,7 @@ var files = [
 	{ path: 'loaders/PRWMLoader.js', dependencies: [], ignoreList: [] },
 	{ path: 'loaders/PVRLoader.js', dependencies: [], ignoreList: [] },
 	{ path: 'loaders/RGBELoader.js', dependencies: [], ignoreList: [ 'RGBAFormat' ] },
-	{ path: 'loaders/STLLoader.js', dependencies: [], ignoreList: [ 'Mesh', 'MeshPhongMaterial', 'VertexColors' ] },
+	{ path: 'loaders/STLLoader.js', dependencies: [], ignoreList: [ 'Mesh', 'MeshPhongMaterial' ] },
 	{ path: 'loaders/SVGLoader.js', dependencies: [], ignoreList: [] },
 	{ path: 'loaders/TDSLoader.js', dependencies: [], ignoreList: [] },
 	{ path: 'loaders/TGALoader.js', dependencies: [], ignoreList: [] },