How to use the TetrahedronBufferGeometry function from three
Find comprehensive JavaScript three.TetrahedronBufferGeometry code examples handpicked from public code repositorys.
GitHub: kentywang/Agamari
![kentywang profile picture](/kentywang.png?size=40)
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;
+ 15 other calls in file
GitHub: kentywang/Agamari
![kentywang profile picture](/kentywang.png?size=40)
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]); }
GitHub: kentywang/Agamari
![kentywang profile picture](/kentywang.png?size=40)
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 );
+ 5 other calls in file
three.Vector3 is the most popular function in three (22341 examples)