mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 12:09:52 +02:00
Replace unlit material by shape "unlit" property
Addressing: Replace unlit materials in create with new shape unlit property #1062
This commit is contained in:
parent
4ffeb1d97f
commit
6718d9f17c
1 changed files with 25 additions and 34 deletions
|
@ -6,7 +6,7 @@
|
||||||
// Modified by David Back on January 9th, 2018
|
// Modified by David Back on January 9th, 2018
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
// Copyright 2014 High Fidelity, Inc.
|
||||||
// Copyright 2020 Vircadia contributors
|
// Copyright 2020 Vircadia contributors
|
||||||
// Copyright 2022-2024 Overte e.V.
|
// Copyright 2022-2025 Overte e.V.
|
||||||
//
|
//
|
||||||
// This script implements a class useful for building tools for editing entities.
|
// This script implements a class useful for building tools for editing entities.
|
||||||
//
|
//
|
||||||
|
@ -981,7 +981,8 @@ SelectionDisplay = (function() {
|
||||||
primitiveMode: "solid",
|
primitiveMode: "solid",
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
};
|
};
|
||||||
var handlePropertiesTranslateArrowCylinders = {
|
var handlePropertiesTranslateArrowCylinders = {
|
||||||
type: "Shape",
|
type: "Shape",
|
||||||
|
@ -990,7 +991,8 @@ SelectionDisplay = (function() {
|
||||||
primitiveMode: "solid",
|
primitiveMode: "solid",
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
};
|
};
|
||||||
var handleTranslateXCone = Entities.addEntity(handlePropertiesTranslateArrowCones, "local");
|
var handleTranslateXCone = Entities.addEntity(handlePropertiesTranslateArrowCones, "local");
|
||||||
var handleTranslateXCylinder = Entities.addEntity(handlePropertiesTranslateArrowCylinders, "local");
|
var handleTranslateXCylinder = Entities.addEntity(handlePropertiesTranslateArrowCylinders, "local");
|
||||||
|
@ -1005,13 +1007,6 @@ SelectionDisplay = (function() {
|
||||||
Entities.editEntity(handleTranslateZCone, { color: COLOR_BLUE });
|
Entities.editEntity(handleTranslateZCone, { color: COLOR_BLUE });
|
||||||
Entities.editEntity(handleTranslateZCylinder, { color: COLOR_BLUE });
|
Entities.editEntity(handleTranslateZCylinder, { color: COLOR_BLUE });
|
||||||
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateXCone));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateYCone));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateZCone));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateXCylinder));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateYCylinder));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleTranslateZCylinder));
|
|
||||||
|
|
||||||
var handlePropertiesRotateRings = {
|
var handlePropertiesRotateRings = {
|
||||||
type: "Gizmo",
|
type: "Gizmo",
|
||||||
gizmoType: "ring",
|
gizmoType: "ring",
|
||||||
|
@ -1117,7 +1112,8 @@ SelectionDisplay = (function() {
|
||||||
primitiveMode: "solid",
|
primitiveMode: "solid",
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var handleStretchXCube = Entities.addEntity(handlePropertiesStretchCubes, "local");
|
var handleStretchXCube = Entities.addEntity(handlePropertiesStretchCubes, "local");
|
||||||
|
@ -1127,10 +1123,6 @@ SelectionDisplay = (function() {
|
||||||
var handleStretchZCube = Entities.addEntity(handlePropertiesStretchCubes, "local");
|
var handleStretchZCube = Entities.addEntity(handlePropertiesStretchCubes, "local");
|
||||||
Entities.editEntity(handleStretchZCube, { color: COLOR_BLUE });
|
Entities.editEntity(handleStretchZCube, { color: COLOR_BLUE });
|
||||||
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchXCube));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchYCube));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchZCube));
|
|
||||||
|
|
||||||
var handlePropertiesStretchPanel = {
|
var handlePropertiesStretchPanel = {
|
||||||
type: "Shape",
|
type: "Shape",
|
||||||
shape: "Cube",
|
shape: "Cube",
|
||||||
|
@ -1138,7 +1130,8 @@ SelectionDisplay = (function() {
|
||||||
alpha: 0.5,
|
alpha: 0.5,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
};
|
};
|
||||||
var handleStretchXPanel = Entities.addEntity(handlePropertiesStretchPanel, "local");
|
var handleStretchXPanel = Entities.addEntity(handlePropertiesStretchPanel, "local");
|
||||||
Entities.editEntity(handleStretchXPanel, { color: COLOR_RED });
|
Entities.editEntity(handleStretchXPanel, { color: COLOR_RED });
|
||||||
|
@ -1147,10 +1140,6 @@ SelectionDisplay = (function() {
|
||||||
var handleStretchZPanel = Entities.addEntity(handlePropertiesStretchPanel, "local");
|
var handleStretchZPanel = Entities.addEntity(handlePropertiesStretchPanel, "local");
|
||||||
Entities.editEntity(handleStretchZPanel, { color: COLOR_BLUE });
|
Entities.editEntity(handleStretchZPanel, { color: COLOR_BLUE });
|
||||||
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchXPanel));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchYPanel));
|
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleStretchZPanel));
|
|
||||||
|
|
||||||
var handleScaleCube = Entities.addEntity({
|
var handleScaleCube = Entities.addEntity({
|
||||||
type: "Shape",
|
type: "Shape",
|
||||||
shape: "Cube",
|
shape: "Cube",
|
||||||
|
@ -1159,9 +1148,9 @@ SelectionDisplay = (function() {
|
||||||
color: COLOR_SCALE_CUBE,
|
color: COLOR_SCALE_CUBE,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
}, "local");
|
}, "local");
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleScaleCube));
|
|
||||||
|
|
||||||
var handleBoundingBox = Entities.addEntity({
|
var handleBoundingBox = Entities.addEntity({
|
||||||
type: "Shape",
|
type: "Shape",
|
||||||
|
@ -1171,9 +1160,9 @@ SelectionDisplay = (function() {
|
||||||
color: COLOR_BOUNDING_EDGE,
|
color: COLOR_BOUNDING_EDGE,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
}, "local");
|
}, "local");
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleBoundingBox));
|
|
||||||
|
|
||||||
var handleDuplicator = Entities.addEntity({
|
var handleDuplicator = Entities.addEntity({
|
||||||
type: "Shape",
|
type: "Shape",
|
||||||
|
@ -1184,9 +1173,9 @@ SelectionDisplay = (function() {
|
||||||
color: COLOR_DUPLICATOR,
|
color: COLOR_DUPLICATOR,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true,
|
ignorePickIntersection: true,
|
||||||
renderLayer: "front"
|
renderLayer: "front",
|
||||||
|
unlit: true
|
||||||
}, "local");
|
}, "local");
|
||||||
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleDuplicator));
|
|
||||||
|
|
||||||
// setting to 0 alpha for now to keep this hidden vs using visible false
|
// setting to 0 alpha for now to keep this hidden vs using visible false
|
||||||
// because its used as the translate xz tool handle toolEntity
|
// because its used as the translate xz tool handle toolEntity
|
||||||
|
@ -1198,7 +1187,8 @@ SelectionDisplay = (function() {
|
||||||
color: COLOR_RED,
|
color: COLOR_RED,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true
|
ignorePickIntersection: true,
|
||||||
|
unlit: true
|
||||||
}, "local");
|
}, "local");
|
||||||
|
|
||||||
// Handle for x-z translation of particle effect and light entities while inside the bounding box.
|
// Handle for x-z translation of particle effect and light entities while inside the bounding box.
|
||||||
|
@ -1211,7 +1201,8 @@ SelectionDisplay = (function() {
|
||||||
color: COLOR_RED,
|
color: COLOR_RED,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
visible: false,
|
visible: false,
|
||||||
ignorePickIntersection: true
|
ignorePickIntersection: true,
|
||||||
|
unlit: true
|
||||||
}, "local");
|
}, "local");
|
||||||
|
|
||||||
var xRailToolEntity = Entities.addEntity({
|
var xRailToolEntity = Entities.addEntity({
|
||||||
|
|
Loading…
Reference in a new issue