2.19.7
Typings fix.
Fixed
-
createKernel()is now typed as accepting a string source. The runtime has always accepted one —Kernel's constructor is typed for it — butcreateKernelwas not, making the form unusable from TypeScript.It is not a niche form: React Native runs on Hermes, which discards function source (
toString()returns a placeholder with parameters renameda0, a1and a body of[bytecode]). Since GPU.js compiles kernels by reading their source, a string is the only form that works there. @gpujs/expo-gl now documents it as required.
No runtime changes.
Installing
npm install gpu.js@2.19.7