You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I often want to listen to transform (position, rotation...) change for a model, but I don't find a triggered event for that
Describe the solution you'd like
Maybe an event, like eye for camera that listens to eye property change, for example
constsceneModel=xktLoader.load({id: "myModel",src: "./models/whatever.xkt",saoEnabled: true,edges: true,dtxEnabled: true,});sceneModel.on('position',(newPos)=>{// do my thing})sceneModel.on('rotation',(newPos)=>{// do my thing})sceneModel.on('scale',(newPos)=>{// do my thing})
Describe alternatives you've considered
I make it work currentyl with rendered event
viewer.scene.on('rendered',()=>{// sync models with their position and rotation});
But it causes a lot of lagging even after debounce
Thank you
The text was updated successfully, but these errors were encountered:
Hi @hamza-hajji , Michał from Creoox here.
Thank you for your feature request, we'd like to understand the motivation better.
What would be a use-case for this user-initiated state change broadcast?
If we align the models every time we move a model with model.position = [...], we have to copy paste it all over the codebase, it's better to listen to that change once, and align all the time
Is your feature request related to a problem? Please describe.
I often want to listen to transform (position, rotation...) change for a model, but I don't find a triggered event for that
Describe the solution you'd like
Maybe an event, like
eye
for camera that listens to eye property change, for exampleDescribe alternatives you've considered
I make it work currentyl with
rendered
eventBut it causes a lot of lagging even after debounce
Thank you
The text was updated successfully, but these errors were encountered: