bind events to camera

when operating the model, then callback function will be excuted. how to do in the vtkjs? thank you.

Are you referring to invoking a callback whenever the camera changes? You can do that with camera.onModified(callbackFunction).

Thank you, it is just i need.

Where can I find information on the signature of callbackFunction?

I’m trying to read the modified properties of the camera.

Generally, the onModified hook will call the callback with the object that you are watching. So, camera.onModified(callbackFunction) will invoke callbackFunction(camera). Source: vtk-js/macros.js at master · Kitware/vtk-js · GitHub

2 Likes