| 98903 | } |
| 98904 | exports.default = createMesh; |
| 98905 | function 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 | } |
| 98919 | function 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 | } |