MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / make

Function make

MathBox/mathbox-bundle.js:32975–32990  ·  view source on GitHub ↗
( v1, v2, v3 )

Source from the content-addressed store, hash-verified

32973 // Approximate a curved face with recursively sub-divided triangles.
32974
32975 function make( v1, v2, v3 ) {
32976
32977 var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
32978 that.faces.push( face );
32979
32980 centroid.copy( v1 ).add( v2 ).add( v3 ).divideScalar( 3 );
32981
32982 var azi = azimuth( centroid );
32983
32984 that.faceVertexUvs[ 0 ].push( [
32985 correctUV( v1.uv, v1, azi ),
32986 correctUV( v2.uv, v2, azi ),
32987 correctUV( v3.uv, v3, azi )
32988 ] );
32989
32990 }
32991
32992
32993 // Analytically subdivide a face to the required detail level.

Callers 5

DataFunction · 0.70
mathbox-core.jsFile · 0.70
subdivideFunction · 0.70
DataFunction · 0.70
mathbox-bundle.jsFile · 0.70

Calls 2

azimuthFunction · 0.70
correctUVFunction · 0.70

Tested by

no test coverage detected