google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.88k stars 816 forks source link

Missing propagation of the progress event reason #4700

Closed rsleyland closed 6 months ago

rsleyland commented 7 months ago

Description

PR #4647 added a reason to progress events. Unfortunately this reason is not being propagated properly in loading.ts. The reason needs to be passed to the new CustomEvent() in loading.ts in order to be accessible in the ModelViewerElement. Currently we have: image Which should be more like:

this.dispatchEvent(
          new CustomEvent('progress', {detail: {totalProgress: progress, reason}}));

Version

Browser Affected

OS

AR