FEATURE: Save and load object X-ray states in BCF #1257
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds to
BCFViewpointsPlugin
a newxrayAsZeroAlpha
option, which specifies how the plugin should handle X-ray effect for BCF viewpoints.When
xrayAsZeroAlpha
istrue
:0
in the object's BCF color opacityoriginating_system == "xeokit.io"
), if an object's BCF color opacity is0
then set that object X-rayed0
, then set the opacity of that object to that color opacity, as usual.The semantic here is that when
xrayAsZeroAlpha
is enabled, a saved BCF viewpoint sets color opacity0
to indicate the object is X-rayed. When loading, the BCF color opacity0
means the object is X-rayed. This assumes that we never colorize an object to0
opacity when we usexrayAsZeroAlpha
. That would make the object invisible, and that can be better done by simply setting it invisible anyway.When
xrayAsZeroAlpha
isfalse
(default):A
channel of eachcoloring
componentRationale
xray
) are added to BCF viewpoints, which would break compatibility with the BCF schema.Demos
What this solves
Users have found that BCF viewpoints don't properly capture and restore xeokit's "x-ray objects" effect.