Replies: 1 comment 1 reply
-
I don't think you can make HTML attributes work this way without a special framework. All attributes have JS equivalents, so you'll want to put all of this in your script tag: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to show glb model by passing its path to src as a variable "fname" but it does not evaluate/parse its value.
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"> </script> <script> var fname = "/path_to_model" + ".glb"; </script><model-viewer
ar ar-scale="fixed"
camera-controls
autoplay
alt="model"
src = fname
Beta Was this translation helpful? Give feedback.
All reactions