mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 10:47:53 +02:00
Add Hierarchy display in List and Selection
Add Hierarchy display in List and Selection
This commit is contained in:
parent
8afa978122
commit
48bd101d08
1 changed files with 17 additions and 2 deletions
|
@ -697,8 +697,10 @@ SelectionDisplay = (function() {
|
|||
const COLOR_HOVER = { red: 255, green: 220, blue: 82 };
|
||||
const COLOR_DUPLICATOR = { red: 162, green: 0, blue: 255 };
|
||||
const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 };
|
||||
const COLOR_BOUNDING_EDGE = { red: 128, green: 128, blue: 128 };
|
||||
const COLOR_SCALE_CUBE = { red: 160, green: 160, blue: 160 };
|
||||
const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 };
|
||||
const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; //{ red: 255, green: 160, blue: 0 };
|
||||
const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; // { red: 0, green: 200, blue: 255 }
|
||||
const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 };
|
||||
const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 };
|
||||
const COLOR_DEBUG_PICK_PLANE_HIT = { red: 255, green: 165, blue: 0 };
|
||||
|
||||
|
@ -1828,6 +1830,18 @@ SelectionDisplay = (function() {
|
|||
var rotationZ = Quat.multiply(rotation, localRotationZ);
|
||||
worldRotationZ = rotationZ;
|
||||
|
||||
var handleBoundingBoxColor = COLOR_BOUNDING_EDGE;
|
||||
if (SelectionManager.selections.length === 1) {
|
||||
var parentState = getParentState(SelectionManager.selections[0]);
|
||||
if (parentState === "CHILDREN") {
|
||||
handleBoundingBoxColor = COLOR_BOUNDING_EDGE_CHILDREN;
|
||||
} else {
|
||||
if (parentState === "PARENT" || parentState === "PARENT_CHILDREN") {
|
||||
handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var selectionBoxGeometry = {
|
||||
position: position,
|
||||
rotation: rotation,
|
||||
|
@ -1949,6 +1963,7 @@ SelectionDisplay = (function() {
|
|||
Entities.editEntity(handleBoundingBox, {
|
||||
position: position,
|
||||
rotation: rotation,
|
||||
color: handleBoundingBoxColor,
|
||||
dimensions: dimensions
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue