Commit bfa3433
authored
Add type for Uint8ClampedArray in KernelVariable
```
render = new GPU.GPU({ mode: "gpu" })
render(image.data, 14 * Math.sin(Date.now() / 400))
```
Since image data is of type Uint8ClampedArray & KernelVariable does not support the same hence gives type error
Ex: https://observablehq.com/@fil/image-to-gpu1 parent 8cfbf0c commit bfa3433
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| |||
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
668 | | - | |
| 669 | + | |
0 commit comments