Replies: 1 comment
-
Please don't cross-post: #4845 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need this code so that I can drag the Hotspot with the mouse over the entire model, and at the same time so that the hotspot is on the surface of the model. And for this, you need the data-surface attribute. I use it when creating a hotspot. but to drag, I need to update. At the moment, the code is able to update the hotspot, but as soon as I start dragging it, the hotspot disappears immediately, but the html code remains unchanged and the element itself remains in html. Please help me figure out what the problem is.
Here is a part of the code:
let allHotspot = document.querySelectorAll('.Hotspot');
Here is the code for creating and assigning a hotspot location:
modelViewer.onclick = (event) => {
if (editMode) {
const surface = modelViewer.surfaceFromPoint(event.clientX, event.clientY);
Beta Was this translation helpful? Give feedback.
All reactions