Model-viewer: why model-viewer dont work in React - [codesandbox example]

Created on 7 Jan 2021  路  5Comments  路  Source: google/model-viewer

im trying to do work model viewer wih react.js

the 3D model does not appear only the poster is shown
https://codesandbox.io/s/gifted-edison-m60h2?file=/src/App.js
-

image

Most helpful comment

I was able to get a CodeSandbox example using NextJS working.
CodeSandbox Example

All 5 comments

I cloned this repo and it works just fine locally. So I created a clean create-react-app project that works with model-viewer and uploaded it to CodeSandbox., but for some reason, it doesn't work in CodeSandbox. I get two warnings in the console:

Problems consuming cache

Error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

Therefore I believe it is a CodeSandbox issue

I was able to get a CodeSandbox example using NextJS working.
CodeSandbox Example

I was able to get a CodeSandbox example using NextJS working.
CodeSandbox Example

I will try locally and with clean project

@nestorchura2019 HERE this is a working create-react-app example repo I made that you can clone.

thanks, work in local

Was this page helpful?
0 / 5 - 0 ratings