-
Hi everyone, I'm newbie to model-viewer and I played a little bit in order to create a 3d Model configurator by myself.
both in Scene class and Annotation class. Everything is fine and it works well, but if I change the src of the viewer (programmatically from the UI and re-select the first model the e.g. setBaseColorFactor function doesn't work anymore. This is my function to change the src from a select element:
and this is the function on mouse move events:
The events are raised correctly and also the functions, but the new color is not set by the setBaseColorFactor. Should I destroy the viewer some how and re-initialize it, or I missed something? Thanks for the support! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Nice use case, thanks for sharing! As you're modifying our internal code, it's hard to say what the problem is. However, we are working on exposing this kind of functionality in our public API and this example will help guide its design. @timmmeh, what do you think of adding the material index of the hit to the result of |
Beta Was this translation helpful? Give feedback.
Nice use case, thanks for sharing! As you're modifying our internal code, it's hard to say what the problem is. However, we are working on exposing this kind of functionality in our public API and this example will help guide its design. @timmmeh, what do you think of adding the material index of the hit to the result of
positionAndNormalFromPoint()
?