mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
QA fixes and reset server script status
This commit is contained in:
parent
e8bda1793f
commit
d5dc93e800
1 changed files with 53 additions and 42 deletions
|
@ -52,6 +52,11 @@ const GROUPS = [
|
||||||
propertyID: "id",
|
propertyID: "id",
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Description",
|
||||||
|
type: "string",
|
||||||
|
propertyID: "description",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Parent",
|
label: "Parent",
|
||||||
type: "string",
|
type: "string",
|
||||||
|
@ -174,21 +179,21 @@ const GROUPS = [
|
||||||
showPropertyRule: { "keyLightMode": "enabled" },
|
showPropertyRule: { "keyLightMode": "enabled" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Light Altitude",
|
label: "Light Horizontal Angle",
|
||||||
type: "number",
|
|
||||||
decimals: 2,
|
|
||||||
unit: "deg",
|
|
||||||
propertyID: "keyLight.direction.y",
|
|
||||||
showPropertyRule: { "keyLightMode": "enabled" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Light Azimuth",
|
|
||||||
type: "number",
|
type: "number",
|
||||||
decimals: 2,
|
decimals: 2,
|
||||||
unit: "deg",
|
unit: "deg",
|
||||||
propertyID: "keyLight.direction.x",
|
propertyID: "keyLight.direction.x",
|
||||||
showPropertyRule: { "keyLightMode": "enabled" },
|
showPropertyRule: { "keyLightMode": "enabled" },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Light Vertical Angle",
|
||||||
|
type: "number",
|
||||||
|
decimals: 2,
|
||||||
|
unit: "deg",
|
||||||
|
propertyID: "keyLight.direction.y",
|
||||||
|
showPropertyRule: { "keyLightMode": "enabled" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Cast Shadows",
|
label: "Cast Shadows",
|
||||||
type: "bool",
|
type: "bool",
|
||||||
|
@ -208,18 +213,11 @@ const GROUPS = [
|
||||||
showPropertyRule: { "skyboxMode": "enabled" },
|
showPropertyRule: { "skyboxMode": "enabled" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Skybox URL",
|
label: "Skybox Source",
|
||||||
type: "string",
|
type: "string",
|
||||||
propertyID: "skybox.url",
|
propertyID: "skybox.url",
|
||||||
showPropertyRule: { "skyboxMode": "enabled" },
|
showPropertyRule: { "skyboxMode": "enabled" },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "buttons",
|
|
||||||
buttons: [ { id: "copy", label: "Copy URL To Ambient",
|
|
||||||
className: "black", onClick: copySkyboxURLToAmbientURL } ],
|
|
||||||
propertyID: "copyURLToAmbient",
|
|
||||||
showPropertyRule: { "skyboxMode": "enabled" },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "Ambient Light",
|
label: "Ambient Light",
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
|
@ -237,11 +235,18 @@ const GROUPS = [
|
||||||
showPropertyRule: { "ambientLightMode": "enabled" },
|
showPropertyRule: { "ambientLightMode": "enabled" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Ambient URL",
|
label: "Ambient Source",
|
||||||
type: "string",
|
type: "string",
|
||||||
propertyID: "ambientLight.ambientURL",
|
propertyID: "ambientLight.ambientURL",
|
||||||
showPropertyRule: { "ambientLightMode": "enabled" },
|
showPropertyRule: { "ambientLightMode": "enabled" },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "buttons",
|
||||||
|
buttons: [ { id: "copy", label: "Copy from Skybox",
|
||||||
|
className: "black", onClick: copySkyboxURLToAmbientURL } ],
|
||||||
|
propertyID: "copyURLToAmbient",
|
||||||
|
showPropertyRule: { "skyboxMode": "enabled" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Haze",
|
label: "Haze",
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
|
@ -395,16 +400,16 @@ const GROUPS = [
|
||||||
type: "bool",
|
type: "bool",
|
||||||
propertyID: "animation.running",
|
propertyID: "animation.running",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "Allow Transition",
|
|
||||||
type: "bool",
|
|
||||||
propertyID: "animation.allowTranslation",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "Loop",
|
label: "Loop",
|
||||||
type: "bool",
|
type: "bool",
|
||||||
propertyID: "animation.loop",
|
propertyID: "animation.loop",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Allow Transition",
|
||||||
|
type: "bool",
|
||||||
|
propertyID: "animation.allowTranslation",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Hold",
|
label: "Hold",
|
||||||
type: "bool",
|
type: "bool",
|
||||||
|
@ -1109,7 +1114,7 @@ const GROUPS = [
|
||||||
column: 1,
|
column: 1,
|
||||||
},
|
},
|
||||||
{ // below properties having no column number means place them after two columns div
|
{ // below properties having no column number means place them after two columns div
|
||||||
label: "Can cast shadow",
|
label: "Cast shadows",
|
||||||
type: "bool",
|
type: "bool",
|
||||||
propertyID: "canCastShadow",
|
propertyID: "canCastShadow",
|
||||||
},
|
},
|
||||||
|
@ -1216,18 +1221,18 @@ const GROUPS = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const GROUPS_PER_TYPE = {
|
const GROUPS_PER_TYPE = {
|
||||||
None: [ 'base', 'spatial', 'collision', 'behavior', 'physics' ],
|
None: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Shape: [ 'base', 'shape', 'spatial', 'collision', 'behavior', 'physics' ],
|
Shape: [ 'base', 'shape', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Text: [ 'base', 'text', 'spatial', 'collision', 'behavior', 'physics' ],
|
Text: [ 'base', 'text', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Zone: [ 'base', 'zone', 'spatial', 'collision', 'behavior', 'physics' ],
|
Zone: [ 'base', 'zone', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Model: [ 'base', 'model', 'spatial', 'collision', 'behavior', 'physics' ],
|
Model: [ 'base', 'model', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Image: [ 'base', 'image', 'spatial', 'collision', 'behavior', 'physics' ],
|
Image: [ 'base', 'image', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Web: [ 'base', 'web', 'spatial', 'collision', 'behavior', 'physics' ],
|
Web: [ 'base', 'web', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Light: [ 'base', 'light', 'spatial', 'collision', 'behavior', 'physics' ],
|
Light: [ 'base', 'light', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
Material: [ 'base', 'material', 'spatial', 'behavior' ],
|
Material: [ 'base', 'material', 'spatial', 'behavior' ],
|
||||||
ParticleEffect: [ 'base', 'particles', 'particles_emit', 'particles_size', 'particles_color', 'particles_alpha',
|
ParticleEffect: [ 'base', 'particles', 'particles_emit', 'particles_size', 'particles_color', 'particles_alpha',
|
||||||
'particles_acceleration', 'particles_spin', 'particles_constraints', 'spatial', 'behavior', 'physics' ],
|
'particles_acceleration', 'particles_spin', 'particles_constraints', 'spatial', 'behavior', 'physics' ],
|
||||||
Multiple: [ 'base', 'spatial', 'collision', 'behavior', 'physics' ],
|
Multiple: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
};
|
};
|
||||||
|
|
||||||
const EDITOR_TIMEOUT_DURATION = 1500;
|
const EDITOR_TIMEOUT_DURATION = 1500;
|
||||||
|
@ -1242,6 +1247,15 @@ const KEY_P = 80; // Key code for letter p used for Parenting hotkey.
|
||||||
const MATERIAL_PREFIX_STRING = "mat::";
|
const MATERIAL_PREFIX_STRING = "mat::";
|
||||||
|
|
||||||
const PENDING_SCRIPT_STATUS = "[ Fetching status ]";
|
const PENDING_SCRIPT_STATUS = "[ Fetching status ]";
|
||||||
|
const NOT_RUNNING_SCRIPT_STATUS = "Not running";
|
||||||
|
const ENTITY_SCRIPT_STATUS = {
|
||||||
|
pending: "Pending",
|
||||||
|
loading: "Loading",
|
||||||
|
error_loading_script: "Error loading script", // eslint-disable-line camelcase
|
||||||
|
error_running_script: "Error running script", // eslint-disable-line camelcase
|
||||||
|
running: "Running",
|
||||||
|
unloaded: "Unloaded"
|
||||||
|
};
|
||||||
|
|
||||||
const PROPERTY_NAME_DIVISION = {
|
const PROPERTY_NAME_DIVISION = {
|
||||||
GROUP: 0,
|
GROUP: 0,
|
||||||
|
@ -1441,6 +1455,11 @@ function resetProperties() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let elServerScriptError = document.getElementById("property-serverScripts-error");
|
||||||
|
let elServerScriptStatus = document.getElementById("property-serverScripts-status");
|
||||||
|
elServerScriptError.parentElement.style.display = "none";
|
||||||
|
elServerScriptStatus.innerText = NOT_RUNNING_SCRIPT_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showGroupsForType(type) {
|
function showGroupsForType(type) {
|
||||||
|
@ -2796,17 +2815,9 @@ function loaded() {
|
||||||
if (data.statusRetrieved === false) {
|
if (data.statusRetrieved === false) {
|
||||||
elServerScriptStatus.innerText = "Failed to retrieve status";
|
elServerScriptStatus.innerText = "Failed to retrieve status";
|
||||||
} else if (data.isRunning) {
|
} else if (data.isRunning) {
|
||||||
var ENTITY_SCRIPT_STATUS = {
|
|
||||||
pending: "Pending",
|
|
||||||
loading: "Loading",
|
|
||||||
error_loading_script: "Error loading script", // eslint-disable-line camelcase
|
|
||||||
error_running_script: "Error running script", // eslint-disable-line camelcase
|
|
||||||
running: "Running",
|
|
||||||
unloaded: "Unloaded"
|
|
||||||
};
|
|
||||||
elServerScriptStatus.innerText = ENTITY_SCRIPT_STATUS[data.status] || data.status;
|
elServerScriptStatus.innerText = ENTITY_SCRIPT_STATUS[data.status] || data.status;
|
||||||
} else {
|
} else {
|
||||||
elServerScriptStatus.innerText = "Not running";
|
elServerScriptStatus.innerText = NOT_RUNNING_SCRIPT_STATUS;
|
||||||
}
|
}
|
||||||
} else if (data.type === "update" && data.selections) {
|
} else if (data.type === "update" && data.selections) {
|
||||||
if (data.selections.length === 0) {
|
if (data.selections.length === 0) {
|
||||||
|
|
Loading…
Reference in a new issue