How to use the DodecahedronGeometry function from three

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

213
214
215
216
217
218
219
220
221
const snowBalls = [];
{
  const material = createSnowManMaterial();
  for (let i = 0; i < 3; i += 1) {
    const radius = 1 - i * 0.22;
    const geometry = new THREE.DodecahedronGeometry(radius, 3);
    geometry.vertices.forEach((v) => {
      v.x += randomInstance.range(-0.01, 0.01);
      v.y += randomInstance.range(-0.01, 0.01);
fork icon9
star icon77
watch icon5

+ 5 other calls in file

22
23
24
25
26
27
28
29
30

//--CylinderGeometry(radiusTop, radiusBottom, height, radiusSegments, heightSegments, openEnded, thetaStart, thetaLength)
geometries.functionInvocation = new THREE.CylinderGeometry(70, 35, 60, 6, 1, true);

//--DodecahedronGeometry(radius, detail)
geometries.variable = new THREE.DodecahedronGeometry(25);

//--BoxGeometry(width, height, depth, widthSegments, heightSegments, depthSegments)
geometries.arrayIndex =  new THREE.BoxGeometry( constants.size.arayIndex, constants.size.arayIndex, constants.size.arayIndex );
fork icon9
star icon26
watch icon5

41
42
43
44
45
46
47
48
49
50
const geoms = [
  new THREE.IcosahedronGeometry(size),
  new THREE.BoxGeometry(size, size, size),
  new THREE.OctahedronGeometry(size),
  new THREE.TetrahedronGeometry(size),
  new THREE.DodecahedronGeometry(size)
]

// Loop through meshes
geoms.forEach(geom => {
fork icon0
star icon3
watch icon1

Other functions in three

Sorted by popularity

function icon

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