-
Notifications
You must be signed in to change notification settings - Fork 25
Events
xml3d.js supports following HTML events:
On elements: xml3d, mesh, shader, lightshader, data, dataflow, asset, model
The load event is triggered when all resources connected to the target have been completely loaded.
- xml3d
- the event is fired when all external resources (mesh data, textures etc.) have been completely loaded
- mesh, shader, lightshader, data, dataflow
- the event is fired when all generic data (including textures) connected to these nodes has been loaded. If one of these elements includes a complex sub-graph of nested external resources, the event is fired only once all these resources have been loaded.
- asset, model
- the event is fired once the src-model and all
<model>
<assetdata>
and<assetmesh>
children have been completely loaded.
For all other element, the load event will fire again whenever any potentially external reference (such as a src attribute) within the content of the element is modified.
In addition to load events, all these elements provide the complete
property which returns false if resources are currently loading for the element and true if everything has been loaded.
On elements: xml3d
The unsupported event is fired if the current browser doesn't support XML3D. Calling e.preventDefault() during the event callback skips the generation of a warning within the HTML document.
On elements: video
See https://developer.mozilla.org/en-US/docs/DOM/Media_events for details. Note: this event can only be added via addEventListener, oncanplaythrough attribute does not work.
On elements: video
See https://developer.mozilla.org/en-US/docs/DOM/Media_events for details. Note: this event can only be added via addEventListener, onended attribute does not work.
On elements: xml3d
The framedrawn event is fired each time a frame has finished drawing. The event.detail field contains statistical information about the frame, such as the number of objects rendered and the time in ms spent rendering the frame.