Function
writeTransformMat4F32
(out: Float32Array, ax: number, bx: number, ay: number, by: number)
Source from the content-addressed store, hash-verified
| 91 | }; |
| 92 | |
| 93 | const writeTransformMat4F32 = (out: Float32Array, ax: number, bx: number, ay: number, by: number): void => { |
| 94 | // Column-major mat4x4 for: clip = M * vec4(x, y, 0, 1) |
| 95 | out[0] = ax; |
| 96 | out[1] = 0; |
| 97 | out[2] = 0; |
| 98 | out[3] = 0; // col0 |
| 99 | out[4] = 0; |
| 100 | out[5] = ay; |
| 101 | out[6] = 0; |
| 102 | out[7] = 0; // col1 |
| 103 | out[8] = 0; |
| 104 | out[9] = 0; |
| 105 | out[10] = 1; |
| 106 | out[11] = 0; // col2 |
| 107 | out[12] = bx; |
| 108 | out[13] = by; |
| 109 | out[14] = 0; |
| 110 | out[15] = 1; // col3 |
| 111 | }; |
| 112 | |
| 113 | const createAreaVertices = (data: ResolvedAreaSeriesConfig['data']): Float32Array => { |
| 114 | // Triangle-strip expects duplicated vertices: |
Tested by
no test coverage detected