mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 08:26:36 +02:00
Merge pull request #14662 from dback2/addGridEntitiesToCreate
Add grid entities to create
This commit is contained in:
commit
00a9367f14
7 changed files with 75 additions and 36 deletions
Binary file not shown.
|
@ -17,9 +17,6 @@
|
||||||
"lineHeight": {
|
"lineHeight": {
|
||||||
"tooltip": "The height of each line of text. This determines the size of the text."
|
"tooltip": "The height of each line of text. This determines the size of the text."
|
||||||
},
|
},
|
||||||
"faceCamera": {
|
|
||||||
"tooltip": "If enabled, the entity follows the camera of each user, creating a billboard effect."
|
|
||||||
},
|
|
||||||
"textBillboardMode": {
|
"textBillboardMode": {
|
||||||
"tooltip": "If enabled, determines how the entity will face the camera.",
|
"tooltip": "If enabled, determines how the entity will face the camera.",
|
||||||
"jsPropertyName": "billboardMode"
|
"jsPropertyName": "billboardMode"
|
||||||
|
@ -356,6 +353,15 @@
|
||||||
"materialMappingRot": {
|
"materialMappingRot": {
|
||||||
"tooltip": "How much to rotate the material within the parent's UV-space, in degrees."
|
"tooltip": "How much to rotate the material within the parent's UV-space, in degrees."
|
||||||
},
|
},
|
||||||
|
"followCamera": {
|
||||||
|
"tooltip": "If enabled, the grid is always visible even as the camera moves to another position."
|
||||||
|
},
|
||||||
|
"majorGridEvery": {
|
||||||
|
"tooltip": "The number of \"Minor Grid Every\" intervals at which to draw a thick grid line."
|
||||||
|
},
|
||||||
|
"minorGridEvery": {
|
||||||
|
"tooltip": "The real number of meters at which to draw thin grid lines."
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"tooltip": "The unique identifier of this entity."
|
"tooltip": "The unique identifier of this entity."
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<script type="text/javascript" src="js/listView.js"></script>
|
<script type="text/javascript" src="js/listView.js"></script>
|
||||||
<script type="text/javascript" src="js/entityListContextMenu.js"></script>
|
<script type="text/javascript" src="js/entityListContextMenu.js"></script>
|
||||||
<script type="text/javascript" src="js/utils.js"></script>
|
<script type="text/javascript" src="js/utils.js"></script>
|
||||||
|
<script type="text/javascript" src="js/includes.js"></script>
|
||||||
<script type="text/javascript" src="js/entityList.js"></script>
|
<script type="text/javascript" src="js/entityList.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body onload='loaded();' id="entity-list-body">
|
<body onload='loaded();' id="entity-list-body">
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<script type="text/javascript" src="js/createAppTooltip.js"></script>
|
<script type="text/javascript" src="js/createAppTooltip.js"></script>
|
||||||
<script type="text/javascript" src="js/draggableNumber.js"></script>
|
<script type="text/javascript" src="js/draggableNumber.js"></script>
|
||||||
<script type="text/javascript" src="js/utils.js"></script>
|
<script type="text/javascript" src="js/utils.js"></script>
|
||||||
|
<script type="text/javascript" src="js/includes.js"></script>
|
||||||
<script type="text/javascript" src="js/entityProperties.js"></script>
|
<script type="text/javascript" src="js/entityProperties.js"></script>
|
||||||
<script src="js/jsoneditor.min.js"></script>
|
<script src="js/jsoneditor.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -153,22 +153,9 @@ const FILTER_TYPES = [
|
||||||
"PolyLine",
|
"PolyLine",
|
||||||
"PolyVox",
|
"PolyVox",
|
||||||
"Text",
|
"Text",
|
||||||
|
"Grid",
|
||||||
];
|
];
|
||||||
|
|
||||||
const ICON_FOR_TYPE = {
|
|
||||||
Shape: "n",
|
|
||||||
Model: "",
|
|
||||||
Image: "",
|
|
||||||
Light: "p",
|
|
||||||
Zone: "o",
|
|
||||||
Web: "q",
|
|
||||||
Material: "",
|
|
||||||
ParticleEffect: "",
|
|
||||||
PolyLine: "",
|
|
||||||
PolyVox: "",
|
|
||||||
Text: "l",
|
|
||||||
};
|
|
||||||
|
|
||||||
const DOUBLE_CLICK_TIMEOUT = 300; // ms
|
const DOUBLE_CLICK_TIMEOUT = 300; // ms
|
||||||
const RENAME_COOLDOWN = 400; // ms
|
const RENAME_COOLDOWN = 400; // ms
|
||||||
|
|
||||||
|
@ -325,7 +312,7 @@ function loaded() {
|
||||||
|
|
||||||
let elSpan = document.createElement('span');
|
let elSpan = document.createElement('span');
|
||||||
elSpan.setAttribute("class", "typeIcon");
|
elSpan.setAttribute("class", "typeIcon");
|
||||||
elSpan.innerHTML = ICON_FOR_TYPE[type];
|
elSpan.innerHTML = ENTITY_TYPE_ICON[type];
|
||||||
|
|
||||||
elLabel.insertBefore(elSpan, elLabel.childNodes[0]);
|
elLabel.insertBefore(elSpan, elLabel.childNodes[0]);
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,6 @@
|
||||||
|
|
||||||
/* global alert, augmentSpinButtons, clearTimeout, console, document, Element,
|
/* global alert, augmentSpinButtons, clearTimeout, console, document, Element,
|
||||||
EventBridge, JSONEditor, openEventBridge, setTimeout, window, _ $ */
|
EventBridge, JSONEditor, openEventBridge, setTimeout, window, _ $ */
|
||||||
|
|
||||||
const ICON_FOR_TYPE = {
|
|
||||||
Box: "V",
|
|
||||||
Sphere: "n",
|
|
||||||
Shape: "n",
|
|
||||||
ParticleEffect: "",
|
|
||||||
Model: "",
|
|
||||||
Web: "q",
|
|
||||||
Image: "",
|
|
||||||
Text: "l",
|
|
||||||
Light: "p",
|
|
||||||
Zone: "o",
|
|
||||||
PolyVox: "",
|
|
||||||
Multiple: "",
|
|
||||||
PolyLine: "",
|
|
||||||
Material: ""
|
|
||||||
};
|
|
||||||
|
|
||||||
const DEGREES_TO_RADIANS = Math.PI / 180.0;
|
const DEGREES_TO_RADIANS = Math.PI / 180.0;
|
||||||
|
|
||||||
|
@ -44,7 +27,7 @@ const GROUPS = [
|
||||||
{
|
{
|
||||||
label: NO_SELECTION,
|
label: NO_SELECTION,
|
||||||
type: "icon",
|
type: "icon",
|
||||||
icons: ICON_FOR_TYPE,
|
icons: ENTITY_TYPE_ICON,
|
||||||
propertyID: "type",
|
propertyID: "type",
|
||||||
replaceID: "placeholder-property-type",
|
replaceID: "placeholder-property-type",
|
||||||
},
|
},
|
||||||
|
@ -668,6 +651,39 @@ const GROUPS = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "grid",
|
||||||
|
addToGroup: "base",
|
||||||
|
properties: [
|
||||||
|
{
|
||||||
|
label: "Color",
|
||||||
|
type: "color",
|
||||||
|
propertyID: "gridColor",
|
||||||
|
propertyName: "color", // actual entity property name
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Follow Camera",
|
||||||
|
type: "bool",
|
||||||
|
propertyID: "followCamera",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Major Grid Every",
|
||||||
|
type: "number-draggable",
|
||||||
|
min: 0,
|
||||||
|
step: 1,
|
||||||
|
decimals: 0,
|
||||||
|
propertyID: "majorGridEvery",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Minor Grid Every",
|
||||||
|
type: "number-draggable",
|
||||||
|
min: 0,
|
||||||
|
step: 0.01,
|
||||||
|
decimals: 2,
|
||||||
|
propertyID: "minorGridEvery",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "particles",
|
id: "particles",
|
||||||
addToGroup: "base",
|
addToGroup: "base",
|
||||||
|
@ -1402,6 +1418,7 @@ const GROUPS_PER_TYPE = {
|
||||||
'particles_acceleration', 'particles_spin', 'particles_constraints', 'spatial', 'behavior', 'physics' ],
|
'particles_acceleration', 'particles_spin', 'particles_constraints', 'spatial', 'behavior', 'physics' ],
|
||||||
PolyLine: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
PolyLine: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
PolyVox: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
PolyVox: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
|
Grid: [ 'base', 'grid', 'spatial', 'behavior', 'physics' ],
|
||||||
Multiple: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
Multiple: [ 'base', 'spatial', 'behavior', 'collision', 'physics' ],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
27
scripts/system/html/js/includes.js
Normal file
27
scripts/system/html/js/includes.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
//
|
||||||
|
// includes.js
|
||||||
|
//
|
||||||
|
// Created by David Back on 3 Jan 2019
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
const ENTITY_TYPE_ICON = {
|
||||||
|
Box: "m",
|
||||||
|
Grid: "",
|
||||||
|
Image: "",
|
||||||
|
Light: "p",
|
||||||
|
Material: "",
|
||||||
|
Model: "",
|
||||||
|
ParticleEffect: "",
|
||||||
|
PolyVox: "",
|
||||||
|
PolyLine: "",
|
||||||
|
Shape: "n",
|
||||||
|
Sphere: "n",
|
||||||
|
Text: "l",
|
||||||
|
Web: "q",
|
||||||
|
Zone: "o",
|
||||||
|
Multiple: "",
|
||||||
|
};
|
Loading…
Reference in a new issue