History

Update system scripts to use new properties

David Rowe committed 9 years ago

Commit fc4e4401 parent 949ed3b22 files · +109 −255Browse files

Showing the changes to scripts/system/controllers/controllerModules (10 of 22 files). Show all

Unified · Split

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