How to use the VertexColors function from three

Find comprehensive JavaScript three.VertexColors code examples handpicked from public code repositorys.

96
97
98
99
100
101
102
103
104
105
// lines
var lines = new THREE.Object3D();

var lineMaterial = new THREE.LineBasicMaterial({
  color: this.parameters.linesColor,
  vertexColors: THREE.VertexColors
});

// horizontal
for (var i = 0; i < this.parameters.stepsY; i++) {
fork icon57
star icon254
watch icon10

1940
1941
1942
1943
1944
1945
1946
1947
1948
    ].cloneMaterial(material)
  : material.clone();

if (useSkinning) cachedMaterial.skinning = true;
if (useVertexTangents) cachedMaterial.vertexTangents = true;
if (useVertexColors) cachedMaterial.vertexColors = THREE.VertexColors;
if (useFlatShading) cachedMaterial.flatShading = true;
if (useMorphTargets) cachedMaterial.morphTargets = true;
if (useMorphNormals) cachedMaterial.morphNormals = true;
fork icon3
star icon7
watch icon8

+ 14 other calls in file

1868
1869
1870
1871
1872
1873
1874
1875
1876
1877

if ( 'color' in geometry.attributes ) {

	materials.forEach( function ( material ) {

		material.vertexColors = THREE.VertexColors;

	} );

}
fork icon0
star icon0
watch icon1

+ 88 other calls in file

2079
2080
2081
2082
2083
2084
2085
2086
2087
    : material.clone();

if (useSkinning) cachedMaterial.skinning = true;
if (useVertexTangents) cachedMaterial.vertexTangents = true;
if (useVertexColors)
    cachedMaterial.vertexColors = THREE.VertexColors;
if (useFlatShading) cachedMaterial.flatShading = true;
if (useMorphTargets) cachedMaterial.morphTargets = true;
if (useMorphNormals) cachedMaterial.morphNormals = true;
fork icon0
star icon0
watch icon1

+ 61 other calls in file

498
499
500
501
502
503
504
505
506
507
    }
    material.name = sourceMaterial.name;
  }
  material.flatShading = sourceMaterial.smooth ? false : true;
  material.vertexColors = hasVertexColors
    ? THREE.VertexColors
    : THREE.NoColors;
  createdMaterials.push(material);
}
// Create mesh
fork icon0
star icon0
watch icon1

+ 15 other calls in file

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)