MCPcopy Create free account
hub / github.com/microsoft/SandDance / createQuad

Function createQuad

docs/app/js/sanddance-app.js:98905–98918  ·  view source on GitHub ↗
(bounds)

Source from the content-addressed store, hash-verified

98903}
98904exports.default = createMesh;
98905function createQuad(bounds) {
98906 var positions = new Float64Array(12);
98907 for(var i = 0; i < bounds.length; i++){
98908 positions[i * 3 + 0] = bounds[i][0];
98909 positions[i * 3 + 1] = bounds[i][1];
98910 positions[i * 3 + 2] = bounds[i][2] || 0;
98911 }
98912 return {
98913 vertexCount: 6,
98914 positions: positions,
98915 indices: DEFAULT_INDICES,
98916 texCoords: DEFAULT_TEX_COORDS
98917 };
98918}
98919function interpolateQuad(quad, ut, vt) {
98920 return (0, _mathGl.lerp)((0, _mathGl.lerp)(quad[0], quad[1], vt), (0, _mathGl.lerp)(quad[3], quad[2], vt), ut);
98921}

Callers 1

createMeshFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected