Skip to content

a playground to test zenroom in react app

Notifications You must be signed in to change notification settings

dyne/zenroom-react

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zenroom in React playground

This project was bootstrapped with Create React App.

Getting started

Following this guide: https://www.dyne.org/using-zenroom-with-javascript-react-part3/

Clone the repo

git clone https://github.com/ivanminutillo/zenroom-react.git

Install dependencies

yarn install

Quick & dirty hack to use .wasm in react

cd public
ln -s ../node_modules/zenroom/dist/lib/zenroom.wasm .

open the node_modules/zenroom/dist/lib/zenroom.js file and change from this

var wasmBinaryFile = 'zenroom.wasm';
if (!isDataURI(wasmBinaryFile)) {
  wasmBinaryFile = locateFile(wasmBinaryFile);
}

to this

var wasmBinaryFile = '/zenroom.wasm';
if (!isDataURI(wasmBinaryFile)) {
  // wasmBinaryFile = locateFile(wasmBinaryFile);
}

Launch the app

yarn start

Open the browser console and check the zenroom output

(zencode script is located on app.js)

About

a playground to test zenroom in react app

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.7%
  • HTML 10.3%
  • CSS 9.0%