[x3d-public] Proposal for new field "pointerEvents".

Holger Seelig holger.seelig at yahoo.de
Mon Jan 23 11:34:37 PST 2023


I want to suggest an new field „pointerEvent“ for X3DLayerNode and X3DShapeNode.

X3DLayerNode + X3DShapeNode  {
  SFBool [in,out] pointerEvents TRUE
  ...
}

CSS has a similar property "pointer-events", see https://www.w3schools.com/cssref/css3_pr_pointer-events.php.

The default value is TRUE which defines the actual behavior. But new, when the field becomes FALSE, the shape or the whole layer becomes ‚invisible‘ for pointing device sensor nodes, ie. it cannot be clicked, but rather click through the object.

Examples would be a HUD layer with only display objects, which don’t need to be clicked. Or a transparent water surface, with object below the surface. Setting Surface.pointerEvents to FALSE would enable to click through the surface and touch the objects under the water.

I initially thought that the X3DLayerNode.pickable (was isPickable) field would do the job, but guess its rather related to Picking component and same as in PickableGroup. Same with X3DOM Shape.isPickable https://doc.x3dom.org/author/Shape/Shape.html, but don’t know.

I'm not attached to the name „pointerEvents", but it seems quite appropriate.

An alternative approach would be to define a new node „TouchGroup“, which could be in PointingDeviceSensor component.

TouchGroup : X3DGroupingNode {
  SFBool [in,out] pointerEvents TRUE
  ...
}

But after some thinking I think that a field in shape and layer is better, because having to much groups makes the code not better.

Best regards,
Holger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230123/b6fc9b97/attachment.html>


More information about the x3d-public mailing list