omchiii / model_viewer_plus.dart

A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.
https://pub.dev/packages/model_viewer_plus
Apache License 2.0
83 stars 48 forks source link

"data-surface" is not working in current model_viewer.min.js #75

Open raymondnexsoftech opened 1 year ago

raymondnexsoftech commented 1 year ago

Describe the bug New version of model viewer is using "data-surface" to describe the location of hotspot, while the current version does not support "data-surface". Since the model editor (https://modelviewer.dev/editor/) is generating "data-surface" now, we cannot place the hotspot in the correct position

To reproduce Steps to reproduce the behavior: Place the following code to innerModelViewerHtml:

'''<button
  class="hotspot"
  slot="hotspot-visor"
  data-surface="90 1 0 118 121 0.530 0.433 0.037">
</button>
<button
  class="hotspot"
  slot="hotspot-hand"
  data-surface="101 0 660 511 517 0.143 0.633 0.224">
</button>'''

And the 2 hotspots will placed in the same position

Expected behavior There will be 2 hotspots placed at different position

Smartphone (please complete the following information):

Additional context I tried to replace the min.js manually in cache and the hotspots are placing correctly