Skip to content
Discussion options

You must be logged in to vote

Hi, you can override the default progress bar[using slot] and control/set the value to display using javascript.

Example of how to use progress bar:

<style>
.progress-bar {
      ...
    }
</style>
<model-viewer id="mv_id" camera-controls reveal="interaction" src="../../shared-assets/models/glTF-Sample-Models/2.0/DamagedHelmet/glTF/DamagedHelmet.gltf" alt="A 3D model of a damaged helmet">
  <div id="progress-bar-d" slot="progress-bar"></div>
</model-viewer>
<script>
// Set the percentage by querying progress-bar-id and setting the value to sth like percentage of the width
</script>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by discodevl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants