3d-model-element
3d-model-element copied to clipboard
x-model custom element isn't working on React App!!
I have been trying to work with x-model custom element in my react app, but it's behavior was quite unexpected. When I copy model-element.min.js file from github and link it to my app root using script tag. It responds with a html file, maybe that's why I find the following error in my console
- model-element.js:1 Uncaught SyntaxError: Unexpected token '<'
Hi. Do you have an example I can look at?
I was trying to render a OBJ model using x-model custom element in a react app. But after few unsuccessful attempts, I have replaced it with three.js. If you want I can make you an example. Actually I wasn't able to import all the required JS files in a react component, while i was trying to import it, it was returning some sort of html