Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A GPU.js extender for use with React Native's Expo library

NotificationsYou must be signed in to change notification settings

gpujs/expo-gl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package allows you to useGPU.js with Expo to get a native GPGPU.

Installation

  1. Setup Expo -https://docs.expo.io/versions/latest/introduction/installation/
  2. 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();});
  1. Visithttps://github.com/gpujs/gpu.js for documentation onkernelFunctionHere,kernelOptionsHere, as well as the api.
  2. Run your expo from Android or iOS and have native GPGPU support!
  3. Have fun!

Example

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp