mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 02:15:08 +02:00
Replace tabulations for spaces.
Replace tabulations for spaces in the code.
This commit is contained in:
parent
5c7e6e43c2
commit
f3096ae74d
1 changed files with 70 additions and 70 deletions
|
@ -1,5 +1,5 @@
|
|||
//VERSION 2.0
|
||||
// Modified by Alezia Kurdis on on 02/27/2020
|
||||
// Modified by Alezia Kurdis on on 02/27/2020
|
||||
// for "Project Athena"
|
||||
//
|
||||
// Addition of a tab mechanism instead of collapsible sections to reduce the scrolling.
|
||||
|
@ -49,7 +49,7 @@ const PROPERTY_MULTI_DISPLAY_MODE = Object.freeze({
|
|||
const GROUPS = [
|
||||
{
|
||||
id: "base",
|
||||
label: "ENTITY",
|
||||
label: "ENTITY",
|
||||
properties: [
|
||||
{
|
||||
label: NO_SELECTION,
|
||||
|
@ -127,7 +127,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "shape",
|
||||
label: "SHAPE",
|
||||
label: "SHAPE",
|
||||
properties: [
|
||||
{
|
||||
label: "Shape",
|
||||
|
@ -147,7 +147,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "text",
|
||||
label: "TEXT",
|
||||
label: "TEXT",
|
||||
properties: [
|
||||
{
|
||||
label: "Text",
|
||||
|
@ -235,7 +235,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone",
|
||||
label: "ZONE",
|
||||
label: "ZONE",
|
||||
properties: [
|
||||
{
|
||||
label: "Shape Type",
|
||||
|
@ -270,7 +270,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_key_light",
|
||||
label: "ZONE KEY LIGHT",
|
||||
label: "ZONE KEY LIGHT",
|
||||
properties: [
|
||||
{
|
||||
label: "Key Light",
|
||||
|
@ -345,7 +345,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_skybox",
|
||||
label: "ZONE SKYBOX",
|
||||
label: "ZONE SKYBOX",
|
||||
properties: [
|
||||
{
|
||||
label: "Skybox",
|
||||
|
@ -369,7 +369,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_ambient_light",
|
||||
label: "ZONE AMBIENT LIGHT",
|
||||
label: "ZONE AMBIENT LIGHT",
|
||||
properties: [
|
||||
{
|
||||
label: "Ambient Light",
|
||||
|
@ -404,7 +404,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_haze",
|
||||
label: "ZONE HAZE",
|
||||
label: "ZONE HAZE",
|
||||
properties: [
|
||||
{
|
||||
label: "Haze",
|
||||
|
@ -493,7 +493,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_bloom",
|
||||
label: "ZONE BLOOM",
|
||||
label: "ZONE BLOOM",
|
||||
properties: [
|
||||
{
|
||||
label: "Bloom",
|
||||
|
@ -535,7 +535,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "zone_avatar_priority",
|
||||
label: "ZONE AVATAR PRIORITY",
|
||||
label: "ZONE AVATAR PRIORITY",
|
||||
properties: [
|
||||
{
|
||||
label: "Avatar Priority",
|
||||
|
@ -547,7 +547,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "model",
|
||||
label: "MODEL",
|
||||
label: "MODEL",
|
||||
properties: [
|
||||
{
|
||||
label: "Model",
|
||||
|
@ -637,7 +637,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "image",
|
||||
label: "IMAGE",
|
||||
label: "IMAGE",
|
||||
properties: [
|
||||
{
|
||||
label: "Image",
|
||||
|
@ -680,7 +680,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "web",
|
||||
label: "WEB",
|
||||
label: "WEB",
|
||||
properties: [
|
||||
{
|
||||
label: "Source",
|
||||
|
@ -725,7 +725,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "light",
|
||||
label: "LIGHT",
|
||||
label: "LIGHT",
|
||||
properties: [
|
||||
{
|
||||
label: "Light Color",
|
||||
|
@ -776,7 +776,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "material",
|
||||
label: "MATERIAL",
|
||||
label: "MATERIAL",
|
||||
properties: [
|
||||
{
|
||||
label: "Material URL",
|
||||
|
@ -850,7 +850,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "grid",
|
||||
label: "GRID",
|
||||
label: "GRID",
|
||||
properties: [
|
||||
{
|
||||
label: "Color",
|
||||
|
@ -883,7 +883,7 @@ const GROUPS = [
|
|||
},
|
||||
{
|
||||
id: "particles",
|
||||
label: "PARTICLES",
|
||||
label: "PARTICLES",
|
||||
properties: [
|
||||
{
|
||||
label: "Emit",
|
||||
|
@ -1181,7 +1181,7 @@ const GROUPS = [
|
|||
{
|
||||
id: "particles_constraints",
|
||||
label: "PARTICLES CONSTRAINTS",
|
||||
//isMinor: true,
|
||||
//isMinor: true,
|
||||
properties: [
|
||||
{
|
||||
type: "triple",
|
||||
|
@ -1602,7 +1602,7 @@ const GROUPS_PER_TYPE = {
|
|||
Shape: [ 'base', 'shape', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
|
||||
Text: [ 'base', 'text', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
|
||||
Zone: [ 'base', 'zone', 'zone_key_light', 'zone_skybox', 'zone_ambient_light', 'zone_haze',
|
||||
'zone_bloom', 'zone_avatar_priority', 'spatial', 'behavior', 'scripts', 'physics' ],
|
||||
'zone_bloom', 'zone_avatar_priority', 'spatial', 'behavior', 'scripts', 'physics' ],
|
||||
Model: [ 'base', 'model', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
|
||||
Image: [ 'base', 'image', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
|
||||
Web: [ 'base', 'web', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
|
||||
|
@ -1882,15 +1882,15 @@ function resetServerScriptStatus() {
|
|||
function showGroupsForType(type) {
|
||||
if (type === "Box" || type === "Sphere") {
|
||||
showGroupsForTypes(["Shape"]);
|
||||
showOnTheSamePage("Shape");
|
||||
showOnTheSamePage("Shape");
|
||||
return;
|
||||
}
|
||||
if (type === "None"){
|
||||
if (type === "None"){
|
||||
showGroupsForTypes(["None"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
showGroupsForTypes([type]);
|
||||
showOnTheSamePage(type);
|
||||
showOnTheSamePage(type);
|
||||
}
|
||||
|
||||
function getGroupsForTypes(types) {
|
||||
|
@ -1905,14 +1905,14 @@ function showGroupsForTypes(types) {
|
|||
Object.entries(elGroups).forEach(([groupKey, elGroup]) => {
|
||||
if (types.map(type => GROUPS_PER_TYPE[type].includes(groupKey)).every(function (hasGroup) { return hasGroup; })) {
|
||||
elGroup.style.display = "none";
|
||||
if(types != "None"){
|
||||
document.getElementById("tab-" + groupKey).style.display = "block";
|
||||
}else{
|
||||
document.getElementById("tab-" + groupKey).style.display = "none";
|
||||
}
|
||||
if(types != "None"){
|
||||
document.getElementById("tab-" + groupKey).style.display = "block";
|
||||
}else{
|
||||
document.getElementById("tab-" + groupKey).style.display = "none";
|
||||
}
|
||||
} else {
|
||||
elGroup.style.display = "none";
|
||||
document.getElementById("tab-" + groupKey).style.display = "none";
|
||||
document.getElementById("tab-" + groupKey).style.display = "none";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -3730,7 +3730,7 @@ function handleEntitySelectionUpdate(selections, isPropertiesToolUpdate) {
|
|||
|
||||
const shownGroups = getGroupsForTypes(entityTypes);
|
||||
showGroupsForTypes(entityTypes);
|
||||
showOnTheSamePage(entityTypes);
|
||||
showOnTheSamePage(entityTypes);
|
||||
|
||||
const lockedMultiValue = getMultiplePropertyValue('locked');
|
||||
|
||||
|
@ -4013,18 +4013,18 @@ function loaded() {
|
|||
GROUPS.forEach(function(group) {
|
||||
let elGroup;
|
||||
|
||||
elGroup = document.createElement('div');
|
||||
elGroup.className = 'section ' + "major";
|
||||
elGroup.setAttribute("id", "properties-" + group.id);
|
||||
elPropertiesList.appendChild(elGroup);
|
||||
elGroup = document.createElement('div');
|
||||
elGroup.className = 'section ' + "major";
|
||||
elGroup.setAttribute("id", "properties-" + group.id);
|
||||
elPropertiesList.appendChild(elGroup);
|
||||
|
||||
|
||||
if (group.label !== undefined) {
|
||||
let elLegend = document.createElement('div');
|
||||
elLegend.className = "tab-section-header";
|
||||
elLegend.className = "tab-section-header";
|
||||
elLegend.appendChild(createElementFromHTML(`<div class="labelTabHeader">${group.label}</div>`));
|
||||
elGroup.appendChild(elLegend);
|
||||
tabs = tabs +'<button id="tab-'+ group.id +'" onclick="showPage(' + "'" + group.id + "'" + ');"><img src="tabs/'+ group.id +'.png"></button>';
|
||||
tabs = tabs +'<button id="tab-'+ group.id +'" onclick="showPage(' + "'" + group.id + "'" + ');"><img src="tabs/'+ group.id +'.png"></button>';
|
||||
}
|
||||
|
||||
group.properties.forEach(function(propertyData) {
|
||||
|
@ -4471,7 +4471,7 @@ function loaded() {
|
|||
bindAllNonJSONEditorElements();
|
||||
|
||||
showGroupsForType("None");
|
||||
showPage("base");
|
||||
showPage("base");
|
||||
resetProperties();
|
||||
disableProperties();
|
||||
|
||||
|
@ -4492,21 +4492,21 @@ function loaded() {
|
|||
}
|
||||
|
||||
function showOnTheSamePage(entityType) {
|
||||
if(GROUPS_PER_TYPE[entityType].includes(currentTab) == false){
|
||||
currentTab = "base";
|
||||
}
|
||||
showPage(currentTab);
|
||||
if(GROUPS_PER_TYPE[entityType].includes(currentTab) == false){
|
||||
currentTab = "base";
|
||||
}
|
||||
showPage(currentTab);
|
||||
}
|
||||
|
||||
function showPage(id) {
|
||||
currentTab = id;
|
||||
currentTab = id;
|
||||
Object.entries(elGroups).forEach(([groupKey, elGroup]) => {
|
||||
if (groupKey == id) {
|
||||
elGroup.style.display = "block";
|
||||
document.getElementById("tab-" + groupKey).style.backgroundColor = "#2E2E2E";
|
||||
document.getElementById("tab-" + groupKey).style.backgroundColor = "#2E2E2E";
|
||||
} else {
|
||||
elGroup.style.display = "none";
|
||||
document.getElementById("tab-" + groupKey).style.backgroundColor = "#404040";
|
||||
document.getElementById("tab-" + groupKey).style.backgroundColor = "#404040";
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue