Regression of selected object's color when its opacity is 0
Describe the bug
New version 2.4.2-beta-14 has different behavior than 2.3.x when setting a 0 opacity entity to selected
To Reproduce Steps to reproduce the behavior:
- Use the xkt_dtx_Schependomlaan example
- Set IfcSpace default opacity to
0
const sceneModel = xktLoader.load({
id: "myModel",
src: "../../assets/models/xkt/v8/ifc/Schependomlaan.ifc.xkt",
saoEnabled: true,
edges: false,
dtxEnabled: true,
objectDefaults: {
IfcSpace: {
opacity: 0,
},
},
});
- Select the Ifc spaces and select them
The material is deifferent from 2.3.9 behavior
Expected behavior
This is a screenshot after using the 2.3.9 build, using the same script as above
Seems OK in @xeokit/xeokit-sdk 2.4.2-beta-20 .. could you try again with this version?
I used 2.4.2-beta-20, now they have white borders
That's intentional (see https://github.com/xeokit/xeokit-sdk/pull/1253).
Note that the appearance of the selected objects, including the white borders, is configurable, eg:
const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true
});
viewer.scene.selectedMaterial.fillColor = [0.0, 1.0, 0.0];
viewer.scene.selectedMaterial.fillAlpha= 0.5;
viewer.scene.selectedMaterial.edges = true;
viewer.scene.selectedMaterial.edgeColor = [1.0, 1.0, 1.0];
viewer.scene.selectedMaterial.edgeAlpha= 1.0;
viewer.scene.selectedMaterial.edgeWidth= 1;
viewer.scene.selectedMaterial.glowThrough = true;
@xeolabs the original issue wasn't with the edges, it's about entities with opacity=0 not being filled when selected, it actually used to be filled in version 2.3.9