xeokit / xeokit-bim-viewer

A browser-based BIM viewer, built on the xeokit SDK
https://xeokit.github.io/xeokit-bim-viewer
Other
402 stars 354 forks source link

Option to make X-rayed objects clickable? #101

Open xeolabs opened 2 years ago

xeolabs commented 2 years ago

Currently X-rayed objects are not clickable. This is by design, where the semantics of X-ray are to reveal internal objects which we want to interact with, where we want to be able to click through the X-rayed ones.

Does it make sense to allow the user to be able to click on X-rayed objects (ie. select, delete, slice them?)

If so, should that be a BIMViewer config, ie. xrayedObjectsClickable, or is there a mobile-friendly way to indicate that each click should not click through X-rayed objects?

xeolabs commented 2 years ago

Solution

See: @xeokit/xeokit-bim-viewer 2.4.6

Once gh-pages have rebuilt, this should be testable via this link:

https://xeokit.io/demo.html?projectId=Duplex&tab=models&configs=xrayPickable:true

  1. X-ray everything
  2. Activate Selection tool
  3. Click some objects

Also, it can be configured programmatically:

myBIMViewer.setConfigs({
    xrayPickable: true
});

Peek 2022-02-21 16-49