How to use the IcosahedronGeometry function from three

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

10
11
12
13
14
15
16
17
18

//--OctahedronGeometry(radius, detail)
geometries.functionDeclaration = new THREE.OctahedronGeometry(50);

//--IcosahedronGeometry(radius, detail)
geometries.objectDeclaration = new THREE.IcosahedronGeometry(50);

//--RingGeometry(innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength)
geometries.triangle = new THREE.RingGeometry(100, 5, 3, 3);
fork icon9
star icon26
watch icon5

127
128
129
130
131
132
133
134
135
136
)
const size = 300

// Array geometries (the platonic solids!)
const geoms = [
  new THREE.IcosahedronGeometry(size),
  new THREE.BoxGeometry(size, size, size),
  new THREE.OctahedronGeometry(size),
  new THREE.TetrahedronGeometry(size),
  new THREE.DodecahedronGeometry(size)
fork icon21
star icon0
watch icon1

26
27
28
29
30
31
32
33
34
35

var stepTime = 0.0;

var dim = 4;

var icosahedron = new THREE.IcosahedronGeometry(0.5, 5);
var icosahedron0 = new THREE.IcosahedronGeometry(0.5, 5);
var icosahedron1 = new THREE.IcosahedronGeometry(0.5, 5);
var icosahedron2 = new THREE.IcosahedronGeometry(0.5, 5);
var icosahedron3 = new THREE.IcosahedronGeometry(0.5, 5);
fork icon16
star icon0
watch icon2

+ 17 other calls in file

85
86
87
88
89
90
91
92
93
94
      break;
    case 1: 
      return new THREE.BoxGeometry( 1, 1, 1 );
      break;
    case 2: 
      return new THREE.IcosahedronGeometry();
      break;
  }
}

fork icon14
star icon4
watch icon0

+ 11 other calls in file

89
90
91
92
93
94
95
96
97
var Crystal = function() {

        this.group = new THREE.Object3D();

        this.size = (Math.random() * 15) + 5;
        var geometry = new THREE.IcosahedronGeometry(this.size);
        this.mesh = new THREE.Mesh(geometry, crystalMaterial);

        this.light = new THREE.PointLight( 0xffffff, params.lightIntensity, 1000 );
fork icon0
star icon4
watch icon2

20
21
22
23
24
25
26
27
28
29
this.geometry = []
this.geometrySleeve = []
this.geometryLength = 100
this.geometryType = [
  new THREE.TetrahedronGeometry(50, 0),
  new THREE.IcosahedronGeometry(40, 0),
  new THREE.OctahedronGeometry(40, 0)
]

this.composer = null
fork icon11
star icon0
watch icon1

94
95
96
97
98
99
100
101
102
  [-0.85, -0.85, 0],
  [0.85, -0.85, 0],
];

const geometries = [
  new THREE.IcosahedronGeometry(0.75, 0), // Faceted
  new THREE.IcosahedronGeometry(0.67, 24), // Sphere
  new THREE.RoundedBoxGeometry(1.12, 1.12, 1.12, 16, 0.2),
];
fork icon0
star icon0
watch icon0

+ 9 other calls in file

352
353
354
355
356
357
358
359
360
361
mediaMesh.position.set(0, 0, 0);
mediaMesh.castShadow = true;
mediaMesh.receiveShadow = true;
scene.add(mediaMesh);

const geometry = new THREE.IcosahedronGeometry(1, 0);


// const mesh3 = new THREE.Mesh(new THREE.SphereGeometry(px(r[0] / 2), widthSegments, HeightSegments), material2);
//   mesh3.rotateX(Math.PI / 2);
fork icon0
star icon0
watch icon0

+ 3 other calls in file

424
425
426
427
428
429
430
431
432
433
mediaMesh.position.set(0, 0, -1);
//mediaMesh.castShadow = true;
//mediaMesh.receiveShadow = true;
scene.add(mediaMesh);

// const geometry = new THREE.IcosahedronGeometry(1, 0);


// const mesh3 = new THREE.Mesh(new THREE.SphereGeometry(px(r[0] / 2), widthSegments, HeightSegments), material2);
//   mesh3.rotateX(Math.PI / 2);
fork icon0
star icon0
watch icon0

47
48
49
50
51
52
53
54
55
});
var adamCube = new THREE.Mesh(box, adamMaterial);



var shape = new THREE.IcosahedronGeometry(3, 5);
var noisyMaterial = new THREE.MeshBasicMaterial({ color: 0xff0000 })
var noisyShape = new THREE.Mesh(shape, noisyMaterial);
noisyShape.name = "thing";
fork icon0
star icon0
watch icon1

Other functions in three

Sorted by popularity

function icon

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