mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 08:08:31 +00:00
Draw a silhouette outline around the selection
The renderer tints the selection blue, which says nothing about an object that is already blue. Add a halo drawn just outside the selected objects instead: a fixed colour against the background, so it reads whatever the element is painted. The mask pass reuses the main shader module and pipeline layout and shares the main depth buffer read-only, so the halo follows the selection as visible -- an occluded object contributes nothing. A separable dilation widens the mask into inner and outer rings, composited after the edge pass so the edge multiply does not darken it. On by default; IfcViewer.setSelectionOutline(false) gets the tint alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -413,6 +413,17 @@
|
||||
hideSelected: function () { Module._hide_selected_c(); },
|
||||
isolateSelected: function () { Module._isolate_selected_c(); },
|
||||
|
||||
// The white-on-dark halo drawn around selected objects (on by default).
|
||||
// The renderer also tints the selection blue, which says nothing when
|
||||
// the object is already blue — hence a cue that does not depend on the
|
||||
// object's colour. Turn it off to get the tint alone.
|
||||
setSelectionOutline: function (on) {
|
||||
Module._ifcv_set_selection_outline_c(on ? 1 : 0);
|
||||
},
|
||||
selectionOutlineEnabled: function () {
|
||||
return Module._ifcv_selection_outline_is_on_c() !== 0;
|
||||
},
|
||||
|
||||
// ---- Colour ----------------------------------------------------------
|
||||
|
||||
// Paint objects a flat colour, replacing whatever the model baked in.
|
||||
|
||||
Reference in New Issue
Block a user