jeeliz / jeelizFaceFilter

Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).

Home Page:https://jeeliz.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having difficulty using JeelizThreejsHelper in ReactApp

opened this issue · comments

I am integrating the demo "football_makeup" in a react app. It requires JeelizThreejsHelper. After I use "import * as THREE from 'three' " , I get the error:- "export 'JeelizHelper' (imported as 'THREE') was not found in 'three' ". What should I do? In the file JeelizThreejsHelper.js, I am using "export default THREE" at the bottom. Please help thanks!

I solved it setting in webpack.config.js

new webpack.ProvidePlugin({ 'THREE': 'three' }),

If somebody want to submit a PR with a React (or Vue or Angular) boilerplate it would be accepted for sure :). Waiting this I will group the tickets relative to React integration and link them from the readme.

@AnastasiiaaaaM I am using a create-react app. I do not have webpack.config.js. How do I use your suggestion?

@AnastasiiaaaaM If its possible for you to publish your code for your React app, that'll be very helpful. thanks

@DINESHBD I'll do it a bit later.
For now, I ejected the webpack from react-create-app: https://stackoverflow.com/questions/48308936/what-does-this-react-scripts-eject-command-do

Hi,

I have added a section about using this lib with bundlers like Webpack:
https://github.com/jeeliz/jeelizFaceFilter#with-a-bundler

I wish it will help

Thanks @xavierjs @AnastasiiaaaaM I'll work on these suggestions.

is it possible to use jeeliz on an expo react-native project?

is it possible to use jeeliz on an expo react-native project?

We don't handle react-native. This lib is for the web.