API

Class HtmlRaycastInteractionManager

Routes Babylon pointer events to a live HTML element rendered through an HtmlTexture.

On every pointer event the scene is picked; when the configured mesh is hit, the picked UV is mapped to a pixel inside the source element and an equivalent DOM pointer (and mouse) event is dispatched there. This works for arbitrary meshes (planes, boxes, curved surfaces) because it relies on UV coordinates rather than a flat CSS overlay. For a perspective-correct overlay on planar surfaces, see HtmlInteractionManager.

Index