Showing the changes to scripts/system/controllers/controllerModules (10 of 22 files). Show all
Unified · Split
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, |
| 10 | − getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule, | |
| 10 | + getControllerJointIndex, enableDispatcherModule, disableDispatcherModule, | |
| 11 | 11 | Messages, makeDispatcherModuleParameters, makeRunningValues, Settings, entityHasActions, |
| 12 | 12 | Vec3, Overlays, flatten, Xform, getControllerWorldLocation, ensureDynamic, entityIsCloneable, |
| 13 | 13 | cloneEntity, DISPATCHER_PROPERTIES |
| @@ -333,7 +333,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa · 319 unmodified lines | ||
| 333 | 333 | var props = controllerData.nearbyEntityPropertiesByID[hotspot.entityID]; |
| 334 | 334 | |
| 335 | 335 | var hasParent = true; |
| 336 | − if (props.parentID === NULL_UUID) { | |
| 336 | + if (props.parentID === Uuid.NULL) { | |
| 337 | 337 | hasParent = false; |
| 338 | 338 | } |
| 339 | 339 | |
| @@ -539,7 +539,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa · 199 unmodified lines | ||
| 539 | 539 | |
| 540 | 540 | this.endEquipEntity = function () { |
| 541 | 541 | Entities.editEntity(this.targetEntityID, { |
| 542 | − parentID: NULL_UUID, | |
| 542 | + parentID: Uuid.NULL, | |
| 543 | 543 | parentJointIndex: -1 |
| 544 | 544 | }); |
| 545 | 545 | |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | /* jslint bitwise: true */ |
| 9 | 9 | |
| 10 | 10 | /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat, |
| 11 | − getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, NULL_UUID, | |
| 11 | + getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, | |
| 12 | 12 | enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, |
| 13 | 13 | makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, |
| 14 | 14 | PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, |
| @@ -238,7 +238,7 @@ Script.include("/~/system/libraries/controllers.js"); · 223 unmodified lines | ||
| 238 | 238 | tag: "far-grab-" + MyAvatar.sessionUUID, |
| 239 | 239 | ttl: ACTION_TTL |
| 240 | 240 | }); |
| 241 | − if (this.actionID === NULL_UUID) { | |
| 241 | + if (this.actionID === Uuid.NULL) { | |
| 242 | 242 | this.actionID = null; |
| 243 | 243 | } |
| 244 | 244 | |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | // |
| 12 | 12 | |
| 13 | 13 | /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat, |
| 14 | − getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, NULL_UUID, | |
| 14 | + getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, | |
| 15 | 15 | enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, |
| 16 | 16 | makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, |
| 17 | 17 | PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | 8 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, |
| 9 | − getControllerJointIndex, getGrabbableData, NULL_UUID, enableDispatcherModule, disableDispatcherModule, | |
| 9 | + getControllerJointIndex, getGrabbableData, enableDispatcherModule, disableDispatcherModule, | |
| 10 | 10 | propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, entityIsGrabbable, |
| 11 | 11 | Quat, Vec3, MSECS_PER_SEC, getControllerWorldLocation, makeDispatcherModuleParameters, makeRunningValues, |
| 12 | 12 | TRIGGER_OFF_VALUE, NEAR_GRAB_RADIUS, findGroupParent, entityIsCloneable, propsAreCloneDynamic, cloneEntity, |
| @@ -101,7 +101,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 88 unmodified lines | ||
| 101 | 101 | kinematicSetVelocity: true, |
| 102 | 102 | ignoreIK: this.ignoreIK |
| 103 | 103 | }); |
| 104 | − if (this.actionID === NULL_UUID) { | |
| 104 | + if (this.actionID === Uuid.NULL) { | |
| 105 | 105 | this.actionID = null; |
| 106 | 106 | return; |
| 107 | 107 | } |
| @@ -183,7 +183,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 75 unmodified lines | ||
| 183 | 183 | |
| 184 | 184 | if (targetProps) { |
| 185 | 185 | if ((!propsArePhysical(targetProps) && !propsAreCloneDynamic(targetProps)) || |
| 186 | − targetProps.parentID != NULL_UUID) { | |
| 186 | + targetProps.parentID !== Uuid.NULL) { | |
| 187 | 187 | return makeRunningValues(false, [], []); // let nearParentGrabEntity handle it |
| 188 | 188 | } else { |
| 189 | 189 | this.targetEntityID = targetProps.id; |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | 8 | |
| 9 | −/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID, | |
| 9 | +/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, | |
| 10 | 10 | enableDispatcherModule, disableDispatcherModule, propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, |
| 11 | 11 | TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS, |
| 12 | 12 | findGroupParent, Vec3, cloneEntity, entityIsCloneable, propsAreCloneDynamic, HAPTIC_PULSE_STRENGTH, |
| @@ -120,7 +120,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 107 unmodified lines | ||
| 120 | 120 | this.hapticTargetID = null; |
| 121 | 121 | var props = controllerData.nearbyEntityPropertiesByID[this.targetEntityID]; |
| 122 | 122 | if (this.thisHandIsParent(props)) { |
| 123 | − if (this.previousParentID[this.targetEntityID] === NULL_UUID || this.previousParentID === undefined) { | |
| 123 | + if (this.previousParentID[this.targetEntityID] === Uuid.NULL || this.previousParentID === undefined) { | |
| 124 | 124 | Entities.editEntity(this.targetEntityID, { |
| 125 | 125 | parentID: this.previousParentID[this.targetEntityID], |
| 126 | 126 | parentJointIndex: this.previousParentJointIndex[this.targetEntityID] |
| @@ -193,7 +193,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 66 unmodified lines | ||
| 193 | 193 | var UNHOOK_LOOP_DETECT_MS = 200; |
| 194 | 194 | if (_this.previouslyUnhooked[childID]) { |
| 195 | 195 | if (now - _this.previouslyUnhooked[childID] < UNHOOK_LOOP_DETECT_MS) { |
| 196 | − previousParentID = NULL_UUID; | |
| 196 | + previousParentID = Uuid.NULL; | |
| 197 | 197 | previousParentJointIndex = -1; |
| 198 | 198 | } |
| 199 | 199 | } |
| @@ -204,7 +204,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 4 unmodified lines | ||
| 204 | 204 | parentJointIndex: previousParentJointIndex |
| 205 | 205 | }); |
| 206 | 206 | } else { |
| 207 | − Entities.editEntity(childID, { parentID: NULL_UUID }); | |
| 207 | + Entities.editEntity(childID, { parentID: Uuid.NULL }); | |
| 208 | 208 | } |
| 209 | 209 | }); |
| 210 | 210 | } |
| @@ -253,7 +253,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 42 unmodified lines | ||
| 253 | 253 | |
| 254 | 254 | if (targetProps) { |
| 255 | 255 | if ((propsArePhysical(targetProps) || propsAreCloneDynamic(targetProps)) && |
| 256 | − targetProps.parentID == NULL_UUID) { | |
| 256 | + targetProps.parentID === Uuid.NULL) { | |
| 257 | 257 | return makeRunningValues(false, [], []); // let nearActionGrabEntity handle it |
| 258 | 258 | } else { |
| 259 | 259 | this.targetEntityID = targetProps.id; |
| @@ -268,7 +268,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 8 unmodified lines | ||
| 268 | 268 | this.run = function (controllerData, deltaTime) { |
| 269 | 269 | if (this.grabbing) { |
| 270 | 270 | if (controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE && |
| 271 | − controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) { | |
| 271 | + controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) { | |
| 272 | 272 | this.endNearParentingGrabEntity(controllerData); |
| 273 | 273 | return makeRunningValues(false, [], []); |
| 274 | 274 | } |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | 8 | |
| 9 | −/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID, | |
| 9 | +/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, | |
| 10 | 10 | enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, |
| 11 | 11 | makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings, |
| 12 | 12 | NEAR_GRAB_RADIUS |
| @@ -130,9 +130,9 @@ Script.include("/~/system/libraries/utils.js"); · 117 unmodified lines | ||
| 130 | 130 | |
| 131 | 131 | this.endNearParentingGrabOverlay = function () { |
| 132 | 132 | var previousParentID = this.previousParentID[this.grabbedThingID]; |
| 133 | − if ((previousParentID === NULL_UUID || previousParentID === null) && !this.robbed) { | |
| 133 | + if ((previousParentID === Uuid.NULL || previousParentID === null) && !this.robbed) { | |
| 134 | 134 | Overlays.editOverlay(this.grabbedThingID, { |
| 135 | − parentID: NULL_UUID, | |
| 135 | + parentID: Uuid.NULL, | |
| 136 | 136 | parentJointIndex: -1 |
| 137 | 137 | }); |
| 138 | 138 | } else if (!this.robbed){ |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | // Distributed under the Apache License, Version 2.0. |
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | −/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, NULL_UUID, enableDispatcherModule, disableDispatcherModule, | |
| 8 | +/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, | |
| 9 | 9 | makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, AVATAR_SELF_ID, HMD, |
| 10 | 10 | INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, |
| 11 | 11 | COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | 8 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, |
| 9 | − NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues, | |
| 9 | + enableDispatcherModule, disableDispatcherModule, makeRunningValues, | |
| 10 | 10 | Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC, |
| 11 | 11 | AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset, |
| 12 | 12 | getEnabledModuleByName |
| @@ -286,7 +286,7 @@ Script.include("/~/system/libraries/controllers.js"); · 273 unmodified lines | ||
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | // add the tabletScreen, if it is valid |
| 289 | − if (HMD.tabletScreenID && HMD.tabletScreenID !== NULL_UUID && | |
| 289 | + if (HMD.tabletScreenID && HMD.tabletScreenID !== Uuid.NULL && | |
| 290 | 290 | Overlays.getProperty(HMD.tabletScreenID, "visible")) { |
| 291 | 291 | stylusTarget = TouchEventUtils.calculateTouchTargetFromOverlay(this.stylusTip, HMD.tabletScreenID); |
| 292 | 292 | if (stylusTarget) { |
| @@ -295,7 +295,7 @@ Script.include("/~/system/libraries/controllers.js"); · 2 unmodified lines | ||
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | // add the tablet home button. |
| 298 | − if (HMD.homeButtonID && HMD.homeButtonID !== NULL_UUID && | |
| 298 | + if (HMD.homeButtonID && HMD.homeButtonID !== Uuid.NULL && | |
| 299 | 299 | Overlays.getProperty(HMD.homeButtonID, "visible")) { |
| 300 | 300 | stylusTarget = TouchEventUtils.calculateTouchTargetFromOverlay(this.stylusTip, HMD.homeButtonID); |
| 301 | 301 | if (stylusTarget) { |
| @@ -10,7 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | /* jslint bitwise: true */ |
| 12 | 12 | |
| 13 | −/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID, | |
| 13 | +/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, | |
| 14 | 14 | enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3, |
| 15 | 15 | LaserPointers, RayPick, HMD, Uuid, AvatarList |
| 16 | 16 | */ |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | /* jslint bitwise: true */ |
| 9 | 9 | |
| 10 | 10 | /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Vec3, Quat, getGrabPointSphereOffset, |
| 11 | − makeRunningValues, Entities, NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters, | |
| 11 | + makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters, | |
| 12 | 12 | PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, |
| 13 | 13 | AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays |
| 14 | 14 | */ |
| @@ -90,15 +90,15 @@ Script.include("/~/system/libraries/controllers.js"); · 75 unmodified lines | ||
| 90 | 90 | var HAPTIC_STYLUS_DURATION = 20.0; |
| 91 | 91 | |
| 92 | 92 | function laserTargetHasKeyboardFocus(laserTarget) { |
| 93 | − if (laserTarget && laserTarget !== NULL_UUID) { | |
| 93 | + if (laserTarget && laserTarget !== Uuid.NULL) { | |
| 94 | 94 | return Entities.keyboardFocusOverlay === laserTarget; |
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | function setKeyboardFocusOnLaserTarget(laserTarget) { |
| 99 | − if (laserTarget && laserTarget !== NULL_UUID) { | |
| 99 | + if (laserTarget && laserTarget !== Uuid.NULL) { | |
| 100 | 100 | Entities.wantsHandControllerPointerEvents(laserTarget); |
| 101 | − Overlays.keyboardFocusOverlay = NULL_UUID; | |
| 101 | + Overlays.keyboardFocusOverlay = Uuid.NULL; | |
| 102 | 102 | Entities.keyboardFocusEntity = laserTarget; |
| 103 | 103 | } |
| 104 | 104 | } |
| @@ -117,7 +117,7 @@ Script.include("/~/system/libraries/controllers.js"); · 12 unmodified lines | ||
| 117 | 117 | button: "None" |
| 118 | 118 | }; |
| 119 | 119 | |
| 120 | − if (laserTarget.entityID && laserTarget.entityID !== NULL_UUID) { | |
| 120 | + if (laserTarget.entityID && laserTarget.entityID !== Uuid.NULL) { | |
| 121 | 121 | Entities.sendHoverEnterEntity(laserTarget.entityID, pointerEvent); |
| 122 | 122 | } |
| 123 | 123 | } |
| @@ -137,7 +137,7 @@ Script.include("/~/system/libraries/controllers.js"); · 13 unmodified lines | ||
| 137 | 137 | button: "None" |
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | − if (laserTarget.entityID && laserTarget.entityID !== NULL_UUID) { | |
| 140 | + if (laserTarget.entityID && laserTarget.entityID !== Uuid.NULL) { | |
| 141 | 141 | Entities.sendMouseMoveOnEntity(laserTarget.entityID, pointerEvent); |
| 142 | 142 | Entities.sendHoverOverEntity(laserTarget.entityID, pointerEvent); |
| 143 | 143 | } |
| @@ -156,7 +156,7 @@ Script.include("/~/system/libraries/controllers.js"); · 12 unmodified lines | ||
| 156 | 156 | isPrimaryHeld: true |
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | − if (laserTarget.entityID && laserTarget.entityID !== NULL_UUID) { | |
| 159 | + if (laserTarget.entityID && laserTarget.entityID !== Uuid.NULL) { | |
| 160 | 160 | Entities.sendMousePressOnEntity(laserTarget.entityID, pointerEvent); |
| 161 | 161 | Entities.sendClickDownOnEntity(laserTarget.entityID, pointerEvent); |
| 162 | 162 | } |
| @@ -173,7 +173,7 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines | ||
| 173 | 173 | button: "Primary" |
| 174 | 174 | }; |
| 175 | 175 | |
| 176 | − if (laserTarget.entityID && laserTarget.entityID !== NULL_UUID) { | |
| 176 | + if (laserTarget.entityID && laserTarget.entityID !== Uuid.NULL) { | |
| 177 | 177 | Entities.sendMouseReleaseOnEntity(laserTarget.entityID, pointerEvent); |
| 178 | 178 | Entities.sendClickReleaseOnEntity(laserTarget.entityID, pointerEvent); |
| 179 | 179 | Entities.sendHoverLeaveEntity(laserTarget.entityID, pointerEvent); |
| @@ -192,7 +192,7 @@ Script.include("/~/system/libraries/controllers.js"); · 12 unmodified lines | ||
| 192 | 192 | isPrimaryHeld: true |
| 193 | 193 | }; |
| 194 | 194 | |
| 195 | − if (laserTarget.entityID && laserTarget.entityID !== NULL_UUID) { | |
| 195 | + if (laserTarget.entityID && laserTarget.entityID !== Uuid.NULL) { | |
| 196 | 196 | Entities.sendMouseMoveOnEntity(laserTarget.entityID, pointerEvent); |
| 197 | 197 | Entities.sendHoldingClickOnEntity(laserTarget.entityID, pointerEvent); |
| 198 | 198 | } |