How to use the TetrahedronBufferGeometry function from three

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

214
215
216
217
218
219
220
221
222
223
                   false);
}

function createLevel(){
 // planet creation
  var planet_geometry = new THREE.TetrahedronBufferGeometry( 500, 4 );
  var planet_material = new THREE.MeshPhongMaterial( { color: someColors['red'], shading: THREE.FlatShading});
  var planet = new THREE.Mesh( planet_geometry, planet_material );

  planet.receiveShadow = true;
fork icon15
star icon47
watch icon10

+ 15 other calls in file

43
44
45
46
47
48
49
50
51
    material = new THREE.MeshPhongMaterial( {color: "#F8B195", shading: THREE.FlatShading} );
    shape = new CANNON.Sphere(parms[0]);
    break;
  case 'sphere':
  default:
    geometry = new THREE.TetrahedronBufferGeometry( parms[0], 1 );
    material = new THREE.MeshPhongMaterial( {color: someColors[color], shading: THREE.FlatShading} );
    shape = new CANNON.Sphere(parms[0]);
}
fork icon15
star icon47
watch icon10

42
43
44
45
46
47
48
49
50
  '#37797b',
  '#547980'];
let randomColor = aFewColors[~~(Math.random() * aFewColors.length)];

// THREE
geometry = new THREE.TetrahedronBufferGeometry( 10, 2 );
material = new THREE.MeshPhongMaterial({ color: randomColor,
                                         shading: THREE.FlatShading });
mesh = new THREE.Mesh( geometry, material );
fork icon15
star icon47
watch icon10

+ 5 other calls in file

Other functions in three

Sorted by popularity

function icon

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