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

Function correctUV

MathBox/mathbox-bundle.js:33082–33088  ·  view source on GitHub ↗
( uv, vector, azimuth )

Source from the content-addressed store, hash-verified

33080 // Texture fixing helper. Spheres have some odd behaviours.
33081
33082 function correctUV( uv, vector, azimuth ) {
33083
33084 if ( ( azimuth < 0 ) && ( uv.x === 1 ) ) uv = new THREE.Vector2( uv.x - 1, uv.y );
33085 if ( ( vector.x === 0 ) && ( vector.z === 0 ) ) uv = new THREE.Vector2( azimuth / 2 / Math.PI + 0.5, uv.y );
33086 return uv.clone();
33087
33088 }
33089
33090
33091};

Callers 1

makeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected