mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 19:38:22 +02:00
Add new web and other properties to Create
This commit is contained in:
parent
69a83e647e
commit
9abd0943ff
3 changed files with 78 additions and 4 deletions
|
@ -549,6 +549,27 @@
|
||||||
"acceleration": {
|
"acceleration": {
|
||||||
"tooltip": "A acceleration that the entity should move with, in world space."
|
"tooltip": "A acceleration that the entity should move with, in world space."
|
||||||
},
|
},
|
||||||
|
"renderLayer": {
|
||||||
|
"tooltip": "The layer on which this entity is rendered."
|
||||||
|
},
|
||||||
|
"primitiveMode": {
|
||||||
|
"tooltip": "The mode in which to draw an entity, either \"Solid\" or \"Wireframe\"."
|
||||||
|
},
|
||||||
|
"groupCulled": {
|
||||||
|
"tooltip": "If false, individual pieces of the entity may be culled by the render engine. If true, either the entire entity will be culled, or it won't at all."
|
||||||
|
},
|
||||||
|
"webColor": {
|
||||||
|
"tooltip": "The tint of the web entity."
|
||||||
|
},
|
||||||
|
"webAlpha": {
|
||||||
|
"tooltip": "The alpha of the web entity."
|
||||||
|
},
|
||||||
|
"maxFPS": {
|
||||||
|
"tooltip": "The FPS at which to render the web entity. Higher values will have a performance impact."
|
||||||
|
},
|
||||||
|
"scriptURL": {
|
||||||
|
"tooltip": "The URL of a script to inject into the web page."
|
||||||
|
},
|
||||||
"alignToGrid": {
|
"alignToGrid": {
|
||||||
"tooltip": "Used to align entities to the grid, or floor of the environment.",
|
"tooltip": "Used to align entities to the grid, or floor of the environment.",
|
||||||
"skipJSProperty": true
|
"skipJSProperty": true
|
||||||
|
|
|
@ -43,7 +43,7 @@ CreateAppTooltip.prototype = {
|
||||||
this._tooltipData = tooltipData;
|
this._tooltipData = tooltipData;
|
||||||
},
|
},
|
||||||
|
|
||||||
registerTooltipElement: function(element, tooltipID) {
|
registerTooltipElement: function(element, tooltipID, jsPropertyName) {
|
||||||
element.addEventListener("mouseover", function() {
|
element.addEventListener("mouseover", function() {
|
||||||
if (!this._isEnabled) {
|
if (!this._isEnabled) {
|
||||||
return;
|
return;
|
||||||
|
@ -70,7 +70,7 @@ CreateAppTooltip.prototype = {
|
||||||
elTipDescription.innerText = tooltipData.tooltip;
|
elTipDescription.innerText = tooltipData.tooltip;
|
||||||
elTip.appendChild(elTipDescription);
|
elTip.appendChild(elTipDescription);
|
||||||
|
|
||||||
let jsAttribute = tooltipID;
|
let jsAttribute = jsPropertyName;
|
||||||
if (tooltipData.jsPropertyName) {
|
if (tooltipData.jsPropertyName) {
|
||||||
jsAttribute = tooltipData.jsPropertyName;
|
jsAttribute = tooltipData.jsPropertyName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,25 @@ const GROUPS = [
|
||||||
propertyID: "visible",
|
propertyID: "visible",
|
||||||
replaceID: "placeholder-property-visible",
|
replaceID: "placeholder-property-visible",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Render Layer",
|
||||||
|
type: "dropdown",
|
||||||
|
options: {
|
||||||
|
world: "World",
|
||||||
|
front: "Front",
|
||||||
|
hud: "HUD"
|
||||||
|
},
|
||||||
|
propertyID: "renderLayer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Primitive Mode",
|
||||||
|
type: "dropdown",
|
||||||
|
options: {
|
||||||
|
solid: "Solid",
|
||||||
|
lines: "Wireframe",
|
||||||
|
},
|
||||||
|
propertyID: "primitiveMode",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -520,6 +539,11 @@ const GROUPS = [
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
hideIfCertified: true,
|
hideIfCertified: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Group Culled",
|
||||||
|
type: "bool",
|
||||||
|
propertyID: "groupCulled",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -579,6 +603,35 @@ const GROUPS = [
|
||||||
type: "number-draggable",
|
type: "number-draggable",
|
||||||
propertyID: "dpi",
|
propertyID: "dpi",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Web Color",
|
||||||
|
type: "color",
|
||||||
|
propertyID: "webColor",
|
||||||
|
propertyName: "color", // actual entity property name
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Web Alpha",
|
||||||
|
type: "number-draggable",
|
||||||
|
step: 0.001,
|
||||||
|
decimals: 3,
|
||||||
|
propertyID: "webAlpha",
|
||||||
|
propertyName: "alpha",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Max FPS",
|
||||||
|
type: "number-draggable",
|
||||||
|
step: 1,
|
||||||
|
decimals: 0,
|
||||||
|
min: 0,
|
||||||
|
max: 240,
|
||||||
|
propertyID: "maxFPS",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Script URL",
|
||||||
|
type: "string",
|
||||||
|
propertyID: "scriptURL",
|
||||||
|
placeholder: "URL",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3152,7 +3205,7 @@ function loaded() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elLabel) {
|
if (elLabel) {
|
||||||
createAppTooltip.registerTooltipElement(elLabel.childNodes[0], propertyID);
|
createAppTooltip.registerTooltipElement(elLabel.childNodes[0], propertyID, propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
let elProperty = createElementFromHTML('<div style="width: 100%;"></div>');
|
let elProperty = createElementFromHTML('<div style="width: 100%;"></div>');
|
||||||
|
@ -3177,7 +3230,7 @@ function loaded() {
|
||||||
property.spaceMode = propertySpaceMode;
|
property.spaceMode = propertySpaceMode;
|
||||||
|
|
||||||
let elLabel = createElementFromHTML(`<div class="triple-label">${innerPropertyData.label}</div>`);
|
let elLabel = createElementFromHTML(`<div class="triple-label">${innerPropertyData.label}</div>`);
|
||||||
createAppTooltip.registerTooltipElement(elLabel, propertyID);
|
createAppTooltip.registerTooltipElement(elLabel, propertyID, propertyName);
|
||||||
|
|
||||||
elWrapper.appendChild(elLabel);
|
elWrapper.appendChild(elLabel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue