mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:02:55 +02:00
style fixes
This commit is contained in:
parent
08da8c4190
commit
9005efb639
5 changed files with 63 additions and 52 deletions
|
@ -494,9 +494,9 @@ var toolBar = (function () {
|
||||||
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.All);
|
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.All);
|
||||||
|
|
||||||
var type = requestedProperties.type;
|
var type = requestedProperties.type;
|
||||||
if (type == "Box" || type == "Sphere") {
|
if (type === "Box" || type === "Sphere") {
|
||||||
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.Shape);
|
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.Shape);
|
||||||
} else if (type == "Image") {
|
} else if (type === "Image") {
|
||||||
requestedProperties.type = "Model";
|
requestedProperties.type = "Model";
|
||||||
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.Image);
|
applyProperties(properties, DEFAULT_ENTITY_PROPERTIES.Image);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1218,7 +1218,7 @@ function mouseClickEvent(event) {
|
||||||
var result, properties, tabletClicked;
|
var result, properties, tabletClicked;
|
||||||
if (isActive && event.isLeftButton) {
|
if (isActive && event.isLeftButton) {
|
||||||
result = findClickedEntity(event);
|
result = findClickedEntity(event);
|
||||||
tabletOrEditHandleClicked = wasTabletOrEditHandleClicked(event);
|
var tabletOrEditHandleClicked = wasTabletOrEditHandleClicked(event);
|
||||||
if (tabletOrEditHandleClicked) {
|
if (tabletOrEditHandleClicked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1541,7 +1541,7 @@ function insideBox(center, dimensions, point) {
|
||||||
(Math.abs(point.z - center.z) <= (dimensions.z / 2.0));
|
(Math.abs(point.z - center.z) <= (dimensions.z / 2.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectAllEtitiesInCurrentSelectionBox(keepIfTouching) {
|
function selectAllEntitiesInCurrentSelectionBox(keepIfTouching) {
|
||||||
if (selectionManager.hasSelection()) {
|
if (selectionManager.hasSelection()) {
|
||||||
// Get all entities touching the bounding box of the current selection
|
// Get all entities touching the bounding box of the current selection
|
||||||
var boundingBoxCorner = Vec3.subtract(selectionManager.worldPosition,
|
var boundingBoxCorner = Vec3.subtract(selectionManager.worldPosition,
|
||||||
|
@ -1820,9 +1820,9 @@ function handleMenuEvent(menuItem) {
|
||||||
Window.promptAsync("URL of SVO to import", "");
|
Window.promptAsync("URL of SVO to import", "");
|
||||||
}
|
}
|
||||||
} else if (menuItem === "Select All Entities In Box") {
|
} else if (menuItem === "Select All Entities In Box") {
|
||||||
selectAllEtitiesInCurrentSelectionBox(false);
|
selectAllEntitiesInCurrentSelectionBox(false);
|
||||||
} else if (menuItem === "Select All Entities Touching Box") {
|
} else if (menuItem === "Select All Entities Touching Box") {
|
||||||
selectAllEtitiesInCurrentSelectionBox(true);
|
selectAllEntitiesInCurrentSelectionBox(true);
|
||||||
} else if (menuItem === MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE) {
|
} else if (menuItem === MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE) {
|
||||||
entityIconOverlayManager.setVisible(isActive && Menu.isOptionChecked(MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE));
|
entityIconOverlayManager.setVisible(isActive && Menu.isOptionChecked(MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE));
|
||||||
} else if (menuItem === MENU_SHOW_ZONES_IN_EDIT_MODE) {
|
} else if (menuItem === MENU_SHOW_ZONES_IN_EDIT_MODE) {
|
||||||
|
@ -2108,14 +2108,14 @@ var DELETED_ENTITY_MAP = {};
|
||||||
function applyEntityProperties(data) {
|
function applyEntityProperties(data) {
|
||||||
var editEntities = data.editEntities;
|
var editEntities = data.editEntities;
|
||||||
var selectedEntityIDs = [];
|
var selectedEntityIDs = [];
|
||||||
var selectEdits = data.createEntities.length == 0 || !data.selectCreated;
|
var selectEdits = data.createEntities.length === 0 || !data.selectCreated;
|
||||||
var i, entityID;
|
var i, entityID, entityProperties;
|
||||||
for (i = 0; i < editEntities.length; i++) {
|
for (i = 0; i < editEntities.length; i++) {
|
||||||
var entityID = editEntities[i].entityID;
|
entityID = editEntities[i].entityID;
|
||||||
if (DELETED_ENTITY_MAP[entityID] !== undefined) {
|
if (DELETED_ENTITY_MAP[entityID] !== undefined) {
|
||||||
entityID = DELETED_ENTITY_MAP[entityID];
|
entityID = DELETED_ENTITY_MAP[entityID];
|
||||||
}
|
}
|
||||||
var entityProperties = editEntities[i].properties;
|
entityProperties = editEntities[i].properties;
|
||||||
if (entityProperties !== null) {
|
if (entityProperties !== null) {
|
||||||
Entities.editEntity(entityID, entityProperties);
|
Entities.editEntity(entityID, entityProperties);
|
||||||
}
|
}
|
||||||
|
@ -2125,7 +2125,7 @@ function applyEntityProperties(data) {
|
||||||
}
|
}
|
||||||
for (i = 0; i < data.createEntities.length; i++) {
|
for (i = 0; i < data.createEntities.length; i++) {
|
||||||
entityID = data.createEntities[i].entityID;
|
entityID = data.createEntities[i].entityID;
|
||||||
var entityProperties = data.createEntities[i].properties;
|
entityProperties = data.createEntities[i].properties;
|
||||||
var newEntityID = Entities.addEntity(entityProperties);
|
var newEntityID = Entities.addEntity(entityProperties);
|
||||||
recursiveAdd(newEntityID, data.createEntities[i]);
|
recursiveAdd(newEntityID, data.createEntities[i]);
|
||||||
DELETED_ENTITY_MAP[entityID] = newEntityID;
|
DELETED_ENTITY_MAP[entityID] = newEntityID;
|
||||||
|
@ -2597,7 +2597,7 @@ var PopupMenu = function () {
|
||||||
y: event.y
|
y: event.y
|
||||||
});
|
});
|
||||||
if (!pressingOverlay) {
|
if (!pressingOverlay) {
|
||||||
if (hoveringOverlay !== null && hoveringOverlay !== null && overlay !== hoveringOverlay) {
|
if (hoveringOverlay !== null && overlay !== hoveringOverlay) {
|
||||||
Overlays.editOverlay(hoveringOverlay, {
|
Overlays.editOverlay(hoveringOverlay, {
|
||||||
backgroundColor: upColor
|
backgroundColor: upColor
|
||||||
});
|
});
|
||||||
|
|
|
@ -103,7 +103,7 @@ thead {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
background-color: #1c1c1c;
|
background-color: #1c1c1c;
|
||||||
padding: 1px 0px;
|
padding: 1px 0;
|
||||||
border-bottom: 1px solid #575757;
|
border-bottom: 1px solid #575757;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ input[type=number]::-webkit-inner-spin-button {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 90%;
|
height: 90%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-family: hifi-glyphs;
|
font-family: HiFi-Glyphs;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
color: #afafaf;
|
color: #afafaf;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -347,7 +347,7 @@ input[type=button], button.hifi-edit-button {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
padding: 0px 18px;
|
padding: 0 18px;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -447,7 +447,7 @@ input[type=checkbox]:checked + label:hover {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 6px;
|
left: 6px;
|
||||||
top: -2px;
|
top: -2px;
|
||||||
font-family: hifi-glyphs;
|
font-family: HiFi-Glyphs;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #afafaf;
|
color: #afafaf;
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1100,6 @@ body#entity-list-body {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
background-color: #ff0000;
|
background-color: #ff0000;
|
||||||
min-width: 90px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#entity-list {
|
#entity-list {
|
||||||
|
@ -1129,7 +1128,7 @@ body#entity-list-body {
|
||||||
#filter-type-checkboxes span {
|
#filter-type-checkboxes span {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
font-family: hifi-glyphs;
|
font-family: HiFi-Glyphs;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
|
@ -1173,7 +1172,7 @@ body#entity-list-body {
|
||||||
|
|
||||||
#filter-in-view {
|
#filter-in-view {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0;
|
||||||
right: 126px;
|
right: 126px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1453,7 +1452,7 @@ th#entity-hasScript {
|
||||||
}
|
}
|
||||||
|
|
||||||
#properties-base #property-type-icon {
|
#properties-base #property-type-icon {
|
||||||
font-family: hifi-glyphs;
|
font-family: HiFi-Glyphs;
|
||||||
font-size: 31px;
|
font-size: 31px;
|
||||||
color: #00b4ef;
|
color: #00b4ef;
|
||||||
margin: -4px 12px -4px -2px;
|
margin: -4px 12px -4px -2px;
|
||||||
|
|
|
@ -139,9 +139,9 @@ input[type=radio]:active + label > span > span{
|
||||||
font-family: Raleway-Bold;
|
font-family: Raleway-Bold;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 0px 10px;
|
padding: 0 10px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border-width: 0px;
|
border-width: 0;
|
||||||
background-image: linear-gradient(#FFFFFF, #AFAFAF);
|
background-image: linear-gradient(#FFFFFF, #AFAFAF);
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
}
|
}
|
||||||
|
@ -158,9 +158,9 @@ input[type=radio]:active + label > span > span{
|
||||||
font-family: Raleway-Bold;
|
font-family: Raleway-Bold;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 0px 10px;
|
padding: 0 10px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border-width: 0px;
|
border-width: 0;
|
||||||
background-image: linear-gradient(#00B4EF, #1080B8);
|
background-image: linear-gradient(#00B4EF, #1080B8);
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ const FILTER_IN_VIEW_ATTRIBUTE = "pressed";
|
||||||
const WINDOW_NONVARIABLE_HEIGHT = 227;
|
const WINDOW_NONVARIABLE_HEIGHT = 227;
|
||||||
const NUM_COLUMNS = 12;
|
const NUM_COLUMNS = 12;
|
||||||
const EMPTY_ENTITY_ID = "0";
|
const EMPTY_ENTITY_ID = "0";
|
||||||
const MAX_LENGTH_RADIUS = 9;
|
|
||||||
const DELETE = 46; // Key code for the delete key.
|
const DELETE = 46; // Key code for the delete key.
|
||||||
const KEY_P = 80; // Key code for letter p used for Parenting hotkey.
|
const KEY_P = 80; // Key code for letter p used for Parenting hotkey.
|
||||||
|
|
||||||
|
@ -85,29 +84,52 @@ const ICON_FOR_TYPE = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// List of all entities
|
// List of all entities
|
||||||
var entities = [];
|
let entities = [];
|
||||||
// List of all entities, indexed by Entity ID
|
// List of all entities, indexed by Entity ID
|
||||||
var entitiesByID = {};
|
let entitiesByID = {};
|
||||||
// The filtered and sorted list of entities passed to ListView
|
// The filtered and sorted list of entities passed to ListView
|
||||||
var visibleEntities = [];
|
let visibleEntities = [];
|
||||||
// List of all entities that are currently selected
|
// List of all entities that are currently selected
|
||||||
var selectedEntities = [];
|
let selectedEntities = [];
|
||||||
|
|
||||||
var entityList = null; // The ListView
|
let entityList = null; // The ListView
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type EntityListContextMenu
|
* @type EntityListContextMenu
|
||||||
*/
|
*/
|
||||||
var entityListContextMenu = null;
|
let entityListContextMenu = null;
|
||||||
|
|
||||||
var currentSortColumn = 'type';
|
let currentSortColumn = 'type';
|
||||||
var currentSortOrder = ASCENDING_SORT;
|
let currentSortOrder = ASCENDING_SORT;
|
||||||
var typeFilters = [];
|
let typeFilters = [];
|
||||||
var isFilterInView = false;
|
let isFilterInView = false;
|
||||||
var showExtraInfo = false;
|
let showExtraInfo = false;
|
||||||
|
|
||||||
|
let elEntityTable,
|
||||||
|
elEntityTableBody,
|
||||||
|
elEntityTableScroll,
|
||||||
|
elEntityTableHeaderRow,
|
||||||
|
elRefresh,
|
||||||
|
elToggleLocked,
|
||||||
|
elToggleVisible,
|
||||||
|
elDelete,
|
||||||
|
elFilterTypeSelectBox,
|
||||||
|
elFilterTypeText,
|
||||||
|
elFilterTypeCheckboxes,
|
||||||
|
elFilterSearch,
|
||||||
|
elFilterInView,
|
||||||
|
elFilterRadius,
|
||||||
|
elExport,
|
||||||
|
elPal,
|
||||||
|
elInfoToggle,
|
||||||
|
elInfoToggleGlyph,
|
||||||
|
elSelectedEntitiesCount,
|
||||||
|
elVisibleEntitiesCount,
|
||||||
|
elNoEntitiesMessage,
|
||||||
|
elToggleSpaceMode;
|
||||||
|
|
||||||
const ENABLE_PROFILING = false;
|
const ENABLE_PROFILING = false;
|
||||||
var profileIndent = '';
|
let profileIndent = '';
|
||||||
const PROFILE_NOOP = function(_name, fn, args) {
|
const PROFILE_NOOP = function(_name, fn, args) {
|
||||||
fn.apply(this, args);
|
fn.apply(this, args);
|
||||||
} ;
|
} ;
|
||||||
|
@ -140,7 +162,7 @@ function loaded() {
|
||||||
elFilterTypeText = document.getElementById("filter-type-text");
|
elFilterTypeText = document.getElementById("filter-type-text");
|
||||||
elFilterTypeCheckboxes = document.getElementById("filter-type-checkboxes");
|
elFilterTypeCheckboxes = document.getElementById("filter-type-checkboxes");
|
||||||
elFilterSearch = document.getElementById("filter-search");
|
elFilterSearch = document.getElementById("filter-search");
|
||||||
elFilterInView = document.getElementById("filter-in-view")
|
elFilterInView = document.getElementById("filter-in-view");
|
||||||
elFilterRadius = document.getElementById("filter-radius");
|
elFilterRadius = document.getElementById("filter-radius");
|
||||||
elExport = document.getElementById("export");
|
elExport = document.getElementById("export");
|
||||||
elPal = document.getElementById("pal");
|
elPal = document.getElementById("pal");
|
||||||
|
|
|
@ -281,7 +281,7 @@ SelectionManager = (function() {
|
||||||
var actionArguments = Entities.getActionArguments(properties.id, actionID);
|
var actionArguments = Entities.getActionArguments(properties.id, actionID);
|
||||||
if (actionArguments) {
|
if (actionArguments) {
|
||||||
var type = actionArguments.type;
|
var type = actionArguments.type;
|
||||||
if (type == 'hold' || type == 'far-grab') {
|
if (type === 'hold' || type === 'far-grab') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
delete actionArguments.ttl;
|
delete actionArguments.ttl;
|
||||||
|
@ -501,6 +501,7 @@ SelectionManager = (function() {
|
||||||
|
|
||||||
if (selectionUpdated) {
|
if (selectionUpdated) {
|
||||||
SelectionDisplay.useDesiredSpaceMode();
|
SelectionDisplay.useDesiredSpaceMode();
|
||||||
|
//SelectionDisplay.setSpaceMode(SPACE_LOCAL, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
properties = Entities.getEntityProperties(that.selections[0], ['type', 'boundingBox']);
|
properties = Entities.getEntityProperties(that.selections[0], ['type', 'boundingBox']);
|
||||||
|
@ -633,17 +634,6 @@ SelectionDisplay = (function() {
|
||||||
ALL: 3
|
ALL: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
const SCALE_DIRECTION = {
|
|
||||||
LBN: 0,
|
|
||||||
RBN: 1,
|
|
||||||
LBF: 2,
|
|
||||||
RBF: 3,
|
|
||||||
LTN: 4,
|
|
||||||
RTN: 5,
|
|
||||||
LTF: 6,
|
|
||||||
RTF: 7
|
|
||||||
};
|
|
||||||
|
|
||||||
const ROTATE_DIRECTION = {
|
const ROTATE_DIRECTION = {
|
||||||
PITCH: 0,
|
PITCH: 0,
|
||||||
YAW: 1,
|
YAW: 1,
|
||||||
|
@ -1342,7 +1332,7 @@ SelectionDisplay = (function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function controllerComputePickRay(hand) {
|
function controllerComputePickRay() {
|
||||||
var hand = that.triggered() ? that.triggeredHand : that.pressedHand;
|
var hand = that.triggered() ? that.triggeredHand : that.pressedHand;
|
||||||
var controllerPose = getControllerWorldLocation(hand, true);
|
var controllerPose = getControllerWorldLocation(hand, true);
|
||||||
if (controllerPose.valid) {
|
if (controllerPose.valid) {
|
||||||
|
@ -1832,7 +1822,7 @@ SelectionDisplay = (function() {
|
||||||
!isActiveTool(handleRotateYawRing) &&
|
!isActiveTool(handleRotateYawRing) &&
|
||||||
!isActiveTool(handleRotateRollRing)));
|
!isActiveTool(handleRotateRollRing)));
|
||||||
|
|
||||||
// keep duplicator always hidden for now since you can hold Alt to duplciate while
|
// keep duplicator always hidden for now since you can hold Alt to duplicate while
|
||||||
// translating an entity - we may bring duplicator back for HMD only later
|
// translating an entity - we may bring duplicator back for HMD only later
|
||||||
// that.setHandleDuplicatorVisible(!activeTool || isActiveTool(handleDuplicator));
|
// that.setHandleDuplicatorVisible(!activeTool || isActiveTool(handleDuplicator));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue