Event Listeners
As there are different kind of events that you might be interested in, the viewer has an event system to listen to them. The event listener is called whenever this event is emitted. The event listener is added with a callback and can be removed with the token that has been received.
In the following example, we register an event listener whenever the scene has been customized.
Event Types
In the table below you can find all available event types, to all of them can be listened to as described in the example above. All of them can be found under the EVENTTYPE
enum (example EVENTTYPE.CAMERA.CAMERA_START
).
Name | Description |
---|---|
| emitted when the camera starts to move |
| emitted when the camera moves per frame (be careful, complex logic in here might slow down your application) |
| emitted when the camera movement ends |
| emitted when the dragging starts |
| emitted during dragging (be careful, complex logic in here might slow down your application) |
| emitted when the dragging ends |
| emitted when an objects is hovered |
| emitted when an objects is not hovered anymore |
| emitted when an objects is selected |
| emitted when an objects is not selected anymore |
| emitted when the beauty rendering process has been finished (in case you want to take a screenshot) |
| emitted when the bounding box of the scene has been changed |
| emitted when a session has been created |
| emitted when a session has been customized |
| emitted when a session has been closed |
| emitted when the first outputs of a session have been loaded |
| emitted when the settings have been updated (usually after a session has just been loaded) |
| emitted when a task has been started (tasks could be anything, we use these events for anything that has a loading time) |
| emitted when a task has a process update (tasks could be anything, we use these events for anything that has a loading time) |
| emitted when a task has ended (tasks could be anything, we use these events for anything that has a loading time) |
| emitted when a task has been closed (tasks could be anything, we use these events for anything that has a loading time) |
| emitted when a viewer has been created |
| emitted when a viewer has been updated |
| emitted when a viewer has been closed |