Add selection color Parent & Child entities

Add in-world selection color for entities that are Parent & Child at the same time.
When 1 entity is selected (in-world):
if the entity is a Top Parent, the selection color of the bounding box is Orange.
if the entity is Parent and Child, the selection color of the bounding box is Majenta.
if the entity is only a Child, then the selection color of the bounding box is Cyan.
If not involved in any parent line, or if the selection is multiple, then the selection color of the bounding box is Light Grey.
This commit is contained in:
Alezia Kurdis 2020-11-09 22:02:42 -05:00 committed by GitHub
parent 233d68952a
commit 44db0bb866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -798,6 +798,7 @@ SelectionDisplay = (function() {
const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 };
const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 };
const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 };
const COLOR_BOUNDING_EDGE_PARENT_AND_CHILDREN = { red: 179, green: 0, blue: 134 };
const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 };
const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 };
const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 };
@ -1934,10 +1935,10 @@ SelectionDisplay = (function() {
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;
}
} else if (parentState === "PARENT") {
handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT;
} else if (parentState === "PARENT_CHILDREN") {
handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT_AND_CHILDREN;
}
}