diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 533b5a4bee..027b7efe37 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1891,7 +1891,6 @@ QString Application::getUserAgent() { void Application::toggleTabletUI(bool shouldOpen) const { auto tabletScriptingInterface = DependencyManager::get(); auto hmd = DependencyManager::get(); - qDebug() << "Application::toggleTabletUI" << shouldOpen << hmd->getShouldShowTablet(); if (!(shouldOpen && hmd->getShouldShowTablet())) { auto HMD = DependencyManager::get(); HMD->toggleShouldShowTablet(); diff --git a/scripts/system/controllers/controllerModules/equipEntity.js b/scripts/system/controllers/controllerModules/equipEntity.js index 5ad7fc9e16..5b73204c8e 100644 --- a/scripts/system/controllers/controllerModules/equipEntity.js +++ b/scripts/system/controllers/controllerModules/equipEntity.js @@ -10,7 +10,7 @@ getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Settings, entityHasActions, Vec3, Overlays, flatten, Xform, getControllerWorldLocation, ensureDynamic, entityIsCloneable, - cloneEntity + cloneEntity, DISPATCHER_PROPERTIES */ Script.include("/~/system/libraries/Xform.js"); diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index f05eab348d..00fba45ae6 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -10,7 +10,7 @@ getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule, propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS, - findGroupParent, Vec3 + findGroupParent, Vec3, cloneEntity, entityIsCloneable */ Script.include("/~/system/controllers/controllerDispatcherUtils.js"); @@ -46,19 +46,20 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); } var handJointIndex = MyAvatar.getJointIndex(this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"); - if (props.parentJointIndex == handJointIndex) { + if (props.parentJointIndex === handJointIndex) { return true; } var controllerJointIndex = this.controllerJointIndex; - if (props.parentJointIndex == controllerJointIndex) { + if (props.parentJointIndex === controllerJointIndex) { return true; } var controllerCRJointIndex = MyAvatar.getJointIndex(this.hand === RIGHT_HAND ? - "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : - "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND"); - if (props.parentJointIndex == controllerCRJointIndex) { + "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : + "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND"); + + if (props.parentJointIndex === controllerCRJointIndex) { return true; } @@ -172,7 +173,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); this.run = function (controllerData, deltaTime) { if (this.grabbing) { - if (controllerData.triggerClicks[this.hand] == 0) { + if (controllerData.triggerClicks[this.hand] === 0) { this.endNearParentingGrabEntity(); return makeRunningValues(false, [], []); } @@ -185,7 +186,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); if (!readiness.active) { return readiness; } - if (controllerData.triggerClicks[this.hand] == 1) { + if (controllerData.triggerClicks[this.hand] === 1) { // switch to grab var targetProps = this.getTargetProps(controllerData); var targetCloneable = entityIsCloneable(targetProps); @@ -196,9 +197,9 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); var cloneProps = Entities.getEntityProperties(cloneID); this.grabbing = true; - this.targetEntityID = cloneID + this.targetEntityID = cloneID; this.startNearParentingGrabEntity(controllerData, cloneProps); - + } else if (targetProps) { this.grabbing = true; this.startNearParentingGrabEntity(controllerData, targetProps); diff --git a/scripts/system/controllers/controllerModules/nearTrigger.js b/scripts/system/controllers/controllerModules/nearTrigger.js index fd24aeefa2..239778040c 100644 --- a/scripts/system/controllers/controllerModules/nearTrigger.js +++ b/scripts/system/controllers/controllerModules/nearTrigger.js @@ -84,7 +84,7 @@ Script.include("/~/system/controllers/controllerDispatcherUtils.js"); }; this.run = function (controllerData) { - if (controllerData.triggerClicks[this.hand] == 0) { + if (controllerData.triggerClicks[this.hand] === 0) { this.endNearTrigger(controllerData); return makeRunningValues(false, [], []); } diff --git a/scripts/system/controllers/controllerModules/overlayLaserInput.js b/scripts/system/controllers/controllerModules/overlayLaserInput.js index ec2aa7750a..86623dbc72 100644 --- a/scripts/system/controllers/controllerModules/overlayLaserInput.js +++ b/scripts/system/controllers/controllerModules/overlayLaserInput.js @@ -10,7 +10,8 @@ Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC, AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, - DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE + DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, + DISPATCHER_PROPERTIES */ Script.include("/~/system/controllers/controllerDispatcherUtils.js"); diff --git a/scripts/system/controllers/grab.js b/scripts/system/controllers/grab.js index 50f9a5c5f0..2844940d2b 100644 --- a/scripts/system/controllers/grab.js +++ b/scripts/system/controllers/grab.js @@ -21,8 +21,6 @@ (function() { // BEGIN LOCAL_SCOPE Script.include("/~/system/libraries/utils.js"); -Script.include("/~/system/controllers/controllerDispatcherUtils.js"); -Script.include("/~/system/libraries/controllers.js"); var MAX_SOLID_ANGLE = 0.01; // objects that appear smaller than this can't be grabbed var DELAY_FOR_30HZ = 33; // milliseconds @@ -253,12 +251,6 @@ function Grabber() { z: 0 }; - this.paramters = makeDispatcherModuleParameters( - 300, - "mouse", - [], - 100); - this.targetPosition = null; this.targetRotation = null; diff --git a/scripts/system/controllers/handControllerPointer.js b/scripts/system/controllers/handControllerPointer.js index fbbb708a92..538fe0b1e4 100644 --- a/scripts/system/controllers/handControllerPointer.js +++ b/scripts/system/controllers/handControllerPointer.js @@ -639,7 +639,6 @@ function update() { // If there's a HUD element at the (newly moved) reticle, just make it visible and bail. if (isPointingAtOverlay(hudPoint2d) && isPointerEnabled) { - //print("--------> pointing at HUD <--------"); if (HMD.active) { Reticle.depth = hudReticleDistance();