3d-model-element icon indicating copy to clipboard operation
3d-model-element copied to clipboard

x-model custom element isn't working on React App!!

Open AbulKalamAZ opened this issue 5 years ago • 2 comments
trafficstars

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 '<'

AbulKalamAZ avatar Oct 10 '20 13:10 AbulKalamAZ

Hi. Do you have an example I can look at?

keithclark avatar Oct 28 '20 22:10 keithclark

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

AbulKalamAZ avatar Oct 29 '20 22:10 AbulKalamAZ