Skip to content

Commit

Permalink
Option to make selected objects not appear floating in front of others
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Feb 21, 2022
1 parent 47274e9 commit 22f838a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/BIMViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,19 @@ class BIMViewer extends Controller {
break;

case "selectedGlowThrough":
this.viewer.scene.selectedMaterial.glowThrough = this._configs[name] = parseBool(value);
const selectedGlowThrough = this._configs[name] = parseBool(value);
const selectedMaterial = this.viewer.scene.selectedMaterial;
selectedMaterial.glowThrough = selectedGlowThrough;
selectedMaterial.fillAlpha = selectedGlowThrough ? 0.5 : 1.0;
selectedMaterial.edgeAlpha = selectedGlowThrough ? 0.5 : 1.0;
break;

case "highlightGlowThrough":
this.viewer.scene.highlightMaterial.glowThrough = this._configs[name] = parseBool(value);
const highlightGlowThrough = this._configs[name] = parseBool(value);
const highlightMaterial = this.viewer.scene.highlightMaterial;
highlightMaterial.glowThrough = highlightGlowThrough;
highlightMaterial.fillAlpha = highlightGlowThrough ? 0.5 : 1.0;
highlightMaterial.edgeAlpha = highlightGlowThrough ? 0.5 : 1.0;
break;

case "externalMetadata":
Expand Down

0 comments on commit 22f838a

Please sign in to comment.