- Notifications
You must be signed in to change notification settings - Fork2
gpujs/expo-gl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package allows you to useGPU.js with Expo to get a native GPGPU.
- Setup Expo -https://docs.expo.io/versions/latest/introduction/installation/
- Add the following to use
@gpujs/expo-gl
:
import{GLView}from'expo-gl';import{GPU}from'@gpujs/expo-gl';GLView.createContextAsync().then(context=>{constgpu=newGPU({ context});constkernel=gpu.createKernel(kernelFunctionHere,kernelOptionsHere);kernel();});
- Visithttps://github.com/gpujs/gpu.js for documentation on
kernelFunctionHere
,kernelOptionsHere
, as well as the api. - Run your expo from Android or iOS and have native GPGPU support!
- Have fun!
import{GLView}from'expo-gl';import{GPU}from'@gpujs/expo-gl';GLView.createContextAsync().then(context=>{constgpu=newGPU({ context});constkernel=gpu.createKernel(function(){return1;},{output:[1],debug:true});console.log(kernel());gpu.destroy();});
About
A GPU.js extender for use with React Native's Expo library
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.