How to use the DodecahedronGeometry function from three
Find comprehensive JavaScript three.DodecahedronGeometry code examples handpicked from public code repositorys.
GitHub: avin/generative
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);
9
77
5
+ 5 other calls in file
GitHub: Holograf/Holograf
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 );
9
26
5
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 => {
0
3
1
three.Vector3 is the most popular function in three (22341 examples)