mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-06 22:49:58 +02:00
ESLint
This commit is contained in:
parent
70917198b2
commit
b00d07b029
1 changed files with 13 additions and 20 deletions
|
@ -13,7 +13,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
/* global SelectionManager, grid, rayPlaneIntersection, rayPlaneIntersection2, pushCommandForSelections,
|
/* global SelectionManager, SelectionDisplay, grid, rayPlaneIntersection, rayPlaneIntersection2, pushCommandForSelections,
|
||||||
getMainTabletIDs, getControllerWorldLocation */
|
getMainTabletIDs, getControllerWorldLocation */
|
||||||
|
|
||||||
var SPACE_LOCAL = "local";
|
var SPACE_LOCAL = "local";
|
||||||
|
@ -72,7 +72,9 @@ SelectionManager = (function() {
|
||||||
|
|
||||||
subscribeToUpdateMessages();
|
subscribeToUpdateMessages();
|
||||||
|
|
||||||
var COLOR_ORANGE_HIGHLIGHT = { red: 255, green: 99, blue: 9 }
|
// disabling this for now as it is causing rendering issues with the other handle overlays
|
||||||
|
/*
|
||||||
|
var COLOR_ORANGE_HIGHLIGHT = { red: 255, green: 99, blue: 9 };
|
||||||
var editHandleOutlineStyle = {
|
var editHandleOutlineStyle = {
|
||||||
outlineUnoccludedColor: COLOR_ORANGE_HIGHLIGHT,
|
outlineUnoccludedColor: COLOR_ORANGE_HIGHLIGHT,
|
||||||
outlineOccludedColor: COLOR_ORANGE_HIGHLIGHT,
|
outlineOccludedColor: COLOR_ORANGE_HIGHLIGHT,
|
||||||
|
@ -85,8 +87,8 @@ SelectionManager = (function() {
|
||||||
outlineWidth: 3,
|
outlineWidth: 3,
|
||||||
isOutlineSmooth: true
|
isOutlineSmooth: true
|
||||||
};
|
};
|
||||||
// disabling this for now as it is causing rendering issues with the other handle overlays
|
Selection.enableListHighlight(HIGHLIGHT_LIST_NAME, editHandleOutlineStyle);
|
||||||
//Selection.enableListHighlight(HIGHLIGHT_LIST_NAME, editHandleOutlineStyle);
|
*/
|
||||||
|
|
||||||
that.savedProperties = {};
|
that.savedProperties = {};
|
||||||
that.selections = [];
|
that.selections = [];
|
||||||
|
@ -362,8 +364,6 @@ SelectionDisplay = (function() {
|
||||||
|
|
||||||
var spaceMode = SPACE_LOCAL;
|
var spaceMode = SPACE_LOCAL;
|
||||||
var overlayNames = [];
|
var overlayNames = [];
|
||||||
var lastCameraPosition = Camera.getPosition();
|
|
||||||
var lastCameraOrientation = Camera.getOrientation();
|
|
||||||
var lastControllerPoses = [
|
var lastControllerPoses = [
|
||||||
getControllerWorldLocation(Controller.Standard.LeftHand, true),
|
getControllerWorldLocation(Controller.Standard.LeftHand, true),
|
||||||
getControllerWorldLocation(Controller.Standard.RightHand, true)
|
getControllerWorldLocation(Controller.Standard.RightHand, true)
|
||||||
|
@ -383,8 +383,6 @@ SelectionDisplay = (function() {
|
||||||
|
|
||||||
var ctrlPressed = false;
|
var ctrlPressed = false;
|
||||||
|
|
||||||
var replaceCollisionsAfterStretch = false;
|
|
||||||
|
|
||||||
var handlePropertiesTranslateArrowCones = {
|
var handlePropertiesTranslateArrowCones = {
|
||||||
shape: "Cone",
|
shape: "Cone",
|
||||||
solid: true,
|
solid: true,
|
||||||
|
@ -1019,9 +1017,6 @@ SelectionDisplay = (function() {
|
||||||
that.select = function(entityID, event) {
|
that.select = function(entityID, event) {
|
||||||
var properties = Entities.getEntityProperties(SelectionManager.selections[0]);
|
var properties = Entities.getEntityProperties(SelectionManager.selections[0]);
|
||||||
|
|
||||||
lastCameraPosition = Camera.getPosition();
|
|
||||||
lastCameraOrientation = Camera.getOrientation();
|
|
||||||
|
|
||||||
if (event !== false) {
|
if (event !== false) {
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
|
@ -1265,8 +1260,8 @@ SelectionDisplay = (function() {
|
||||||
var scaleRTFCubeToCamera = getDistanceToCamera(scaleRTFCubePosition);
|
var scaleRTFCubeToCamera = getDistanceToCamera(scaleRTFCubePosition);
|
||||||
|
|
||||||
var scaleCubeToCamera = Math.min(scaleLBNCubeToCamera, scaleRBNCubeToCamera, scaleLBFCubeToCamera,
|
var scaleCubeToCamera = Math.min(scaleLBNCubeToCamera, scaleRBNCubeToCamera, scaleLBFCubeToCamera,
|
||||||
scaleRBFCubeToCamera, scaleLTNCubeToCamera, scaleRTNCubeToCamera,
|
scaleRBFCubeToCamera, scaleLTNCubeToCamera, scaleRTNCubeToCamera,
|
||||||
scaleLTFCubeToCamera, scaleRTFCubeToCamera);
|
scaleLTFCubeToCamera, scaleRTFCubeToCamera);
|
||||||
var scaleCubeDimension = scaleCubeToCamera * SCALE_CUBE_CAMERA_DISTANCE_MULTIPLE;
|
var scaleCubeDimension = scaleCubeToCamera * SCALE_CUBE_CAMERA_DISTANCE_MULTIPLE;
|
||||||
var scaleCubeDimensions = { x: scaleCubeDimension, y: scaleCubeDimension, z: scaleCubeDimension };
|
var scaleCubeDimensions = { x: scaleCubeDimension, y: scaleCubeDimension, z: scaleCubeDimension };
|
||||||
|
|
||||||
|
@ -1619,8 +1614,7 @@ SelectionDisplay = (function() {
|
||||||
|
|
||||||
translateXZTool.pickPlanePosition = pickResult.intersection;
|
translateXZTool.pickPlanePosition = pickResult.intersection;
|
||||||
translateXZTool.greatestDimension = Math.max(Math.max(SelectionManager.worldDimensions.x,
|
translateXZTool.greatestDimension = Math.max(Math.max(SelectionManager.worldDimensions.x,
|
||||||
SelectionManager.worldDimensions.y),
|
SelectionManager.worldDimensions.y), SelectionManager.worldDimensions.z);
|
||||||
SelectionManager.worldDimensions.z);
|
|
||||||
translateXZTool.startingDistance = Vec3.distance(pickRay.origin, SelectionManager.position);
|
translateXZTool.startingDistance = Vec3.distance(pickRay.origin, SelectionManager.position);
|
||||||
translateXZTool.startingElevation = translateXZTool.elevation(pickRay.origin, translateXZTool.pickPlanePosition);
|
translateXZTool.startingElevation = translateXZTool.elevation(pickRay.origin, translateXZTool.pickPlanePosition);
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
|
@ -2136,8 +2130,8 @@ SelectionDisplay = (function() {
|
||||||
newDimensions = Vec3.sum(initialDimensions, changeInDimensions);
|
newDimensions = Vec3.sum(initialDimensions, changeInDimensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
var minimumDimension = directionEnum === STRETCH_DIRECTION.ALL ? STRETCH_ALL_MINIMUM_DIMENSION :
|
var minimumDimension = directionEnum ===
|
||||||
STRETCH_MINIMUM_DIMENSION;
|
STRETCH_DIRECTION.ALL ? STRETCH_ALL_MINIMUM_DIMENSION : STRETCH_MINIMUM_DIMENSION;
|
||||||
if (newDimensions.x < minimumDimension) {
|
if (newDimensions.x < minimumDimension) {
|
||||||
newDimensions.x = minimumDimension;
|
newDimensions.x = minimumDimension;
|
||||||
changeInDimensions.x = minimumDimension - initialDimensions.x;
|
changeInDimensions.x = minimumDimension - initialDimensions.x;
|
||||||
|
@ -2231,8 +2225,7 @@ SelectionDisplay = (function() {
|
||||||
selectedHandle = handleScaleRTFCube;
|
selectedHandle = handleScaleRTFCube;
|
||||||
}
|
}
|
||||||
offset = Vec3.multiply(directionVector, NEGATE_VECTOR);
|
offset = Vec3.multiply(directionVector, NEGATE_VECTOR);
|
||||||
var tool = makeStretchTool(mode, STRETCH_DIRECTION.ALL, directionVector,
|
var tool = makeStretchTool(mode, STRETCH_DIRECTION.ALL, directionVector, directionVector, offset, null, selectedHandle);
|
||||||
directionVector, offset, null, selectedHandle);
|
|
||||||
return addHandleTool(overlay, tool);
|
return addHandleTool(overlay, tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2363,7 +2356,7 @@ SelectionDisplay = (function() {
|
||||||
var rotationCenterToZero = Vec3.subtract(rotationZero, rotationCenter);
|
var rotationCenterToZero = Vec3.subtract(rotationZero, rotationCenter);
|
||||||
var rotationCenterToZeroLength = Vec3.length(rotationCenterToZero);
|
var rotationCenterToZeroLength = Vec3.length(rotationCenterToZero);
|
||||||
rotationDegreesPosition = Vec3.sum(rotationCenter, Vec3.multiply(Vec3.normalize(rotationCenterToZero),
|
rotationDegreesPosition = Vec3.sum(rotationCenter, Vec3.multiply(Vec3.normalize(rotationCenterToZero),
|
||||||
rotationCenterToZeroLength * ROTATE_DISPLAY_DISTANCE_MULTIPLIER));
|
rotationCenterToZeroLength * ROTATE_DISPLAY_DISTANCE_MULTIPLIER));
|
||||||
updateRotationDegreesOverlay(0, rotationDegreesPosition);
|
updateRotationDegreesOverlay(0, rotationDegreesPosition);
|
||||||
|
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
|
|
Loading…
Reference in a new issue