Showing the changes to scripts/system/controllers/controllerModules (11 of 13 files). Show all
Unified · Split
| @@ -6,7 +6,7 @@ · 5 unmodified lines | |||
| 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 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, | 9 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, |
| 10 | getControllerJointIndex, 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, |
| @@ -491,7 +491,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa · 478 unmodified lines | |||
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | var reparentProps = { | 493 | var reparentProps = { |
| 494 | parentID: AVATAR_SELF_ID, | 494 | parentID: MyAvatar.SELF_ID, |
| 495 | parentJointIndex: handJointIndex, | 495 | parentJointIndex: handJointIndex, |
| 496 | localVelocity: {x: 0, y: 0, z: 0}, | 496 | localVelocity: {x: 0, y: 0, z: 0}, |
| 497 | localAngularVelocity: {x: 0, y: 0, z: 0}, | 497 | localAngularVelocity: {x: 0, y: 0, z: 0}, |
| @@ -9,10 +9,10 @@ · 8 unmodified lines | |||
| 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, | 11 | getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, |
| 12 | enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, | 12 | enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, entityIsGrabbable, |
| 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, |
| 15 | AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic, | 15 | DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic, |
| 16 | getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI | 16 | getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI |
| 17 | 17 | ||
| 18 | */ | 18 | */ |
| @@ -33,7 +33,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 33 | lineWidth: 5, | 33 | lineWidth: 5, |
| 34 | ignoreRayIntersection: true, // always ignore this | 34 | ignoreRayIntersection: true, // always ignore this |
| 35 | drawInFront: true, // Even when burried inside of something, show it. | 35 | drawInFront: true, // Even when burried inside of something, show it. |
| 36 | parentID: AVATAR_SELF_ID | 36 | parentID: MyAvatar.SELF_ID |
| 37 | }; | 37 | }; |
| 38 | var halfEnd = { | 38 | var halfEnd = { |
| 39 | type: "sphere", | 39 | type: "sphere", |
| @@ -54,7 +54,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 54 | lineWidth: 5, | 54 | lineWidth: 5, |
| 55 | ignoreRayIntersection: true, // always ignore this | 55 | ignoreRayIntersection: true, // always ignore this |
| 56 | drawInFront: true, // Even when burried inside of something, show it. | 56 | drawInFront: true, // Even when burried inside of something, show it. |
| 57 | parentID: AVATAR_SELF_ID | 57 | parentID: MyAvatar.SELF_ID |
| 58 | }; | 58 | }; |
| 59 | var fullEnd = { | 59 | var fullEnd = { |
| 60 | type: "sphere", | 60 | type: "sphere", |
| @@ -75,7 +75,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 75 | lineWidth: 5, | 75 | lineWidth: 5, |
| 76 | ignoreRayIntersection: true, // always ignore this | 76 | ignoreRayIntersection: true, // always ignore this |
| 77 | drawInFront: true, // Even when burried inside of something, show it. | 77 | drawInFront: true, // Even when burried inside of something, show it. |
| 78 | parentID: AVATAR_SELF_ID | 78 | parentID: MyAvatar.SELF_ID |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | var renderStates = [ | 81 | var renderStates = [ |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset, | 9 | /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset, |
| 10 | makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters, | 10 | makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters, |
| 11 | PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, | 11 | PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, |
| 12 | AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData | 12 | DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | Script.include("/~/system/libraries/controllerDispatcherUtils.js"); | 15 | Script.include("/~/system/libraries/controllerDispatcherUtils.js"); |
| @@ -26,7 +26,7 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines | |||
| 26 | lineWidth: 5, | 26 | lineWidth: 5, |
| 27 | ignoreRayIntersection: true, // always ignore this | 27 | ignoreRayIntersection: true, // always ignore this |
| 28 | drawInFront: true, // Even when burried inside of something, show it. | 28 | drawInFront: true, // Even when burried inside of something, show it. |
| 29 | parentID: AVATAR_SELF_ID | 29 | parentID: MyAvatar.SELF_ID |
| 30 | }; | 30 | }; |
| 31 | var halfEnd = { | 31 | var halfEnd = { |
| 32 | type: "sphere", | 32 | type: "sphere", |
| @@ -47,7 +47,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 47 | lineWidth: 5, | 47 | lineWidth: 5, |
| 48 | ignoreRayIntersection: true, // always ignore this | 48 | ignoreRayIntersection: true, // always ignore this |
| 49 | drawInFront: true, // Even when burried inside of something, show it. | 49 | drawInFront: true, // Even when burried inside of something, show it. |
| 50 | parentID: AVATAR_SELF_ID | 50 | parentID: MyAvatar.SELF_ID |
| 51 | }; | 51 | }; |
| 52 | var fullEnd = { | 52 | var fullEnd = { |
| 53 | type: "sphere", | 53 | type: "sphere", |
| @@ -68,7 +68,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 68 | lineWidth: 5, | 68 | lineWidth: 5, |
| 69 | ignoreRayIntersection: true, // always ignore this | 69 | ignoreRayIntersection: true, // always ignore this |
| 70 | drawInFront: true, // Even when burried inside of something, show it. | 70 | drawInFront: true, // Even when burried inside of something, show it. |
| 71 | parentID: AVATAR_SELF_ID | 71 | parentID: MyAvatar.SELF_ID |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | var renderStates = [ | 74 | var renderStates = [ |
| @@ -15,7 +15,7 @@ · 14 unmodified lines | |||
| 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, |
| 18 | AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic, | 18 | DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic, |
| 19 | getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI | 19 | getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI |
| 20 | 20 | ||
| 21 | */ | 21 | */ |
| @@ -32,7 +32,7 @@ · 10 unmodified lines | |||
| 32 | lineWidth: 5, | 32 | lineWidth: 5, |
| 33 | ignoreRayIntersection: true, // always ignore this | 33 | ignoreRayIntersection: true, // always ignore this |
| 34 | drawHUDLayer: true, | 34 | drawHUDLayer: true, |
| 35 | parentID: AVATAR_SELF_ID | 35 | parentID: MyAvatar.SELF_ID |
| 36 | }; | 36 | }; |
| 37 | var halfEnd = { | 37 | var halfEnd = { |
| 38 | type: "sphere", | 38 | type: "sphere", |
| @@ -53,7 +53,7 @@ · 14 unmodified lines | |||
| 53 | lineWidth: 5, | 53 | lineWidth: 5, |
| 54 | ignoreRayIntersection: true, // always ignore this | 54 | ignoreRayIntersection: true, // always ignore this |
| 55 | drawHUDLayer: true, | 55 | drawHUDLayer: true, |
| 56 | parentID: AVATAR_SELF_ID | 56 | parentID: MyAvatar.SELF_ID |
| 57 | }; | 57 | }; |
| 58 | var fullEnd = { | 58 | var fullEnd = { |
| 59 | type: "sphere", | 59 | type: "sphere", |
| @@ -74,7 +74,7 @@ · 14 unmodified lines | |||
| 74 | lineWidth: 5, | 74 | lineWidth: 5, |
| 75 | ignoreRayIntersection: true, // always ignore this | 75 | ignoreRayIntersection: true, // always ignore this |
| 76 | drawHUDLayer: true, | 76 | drawHUDLayer: true, |
| 77 | parentID: AVATAR_SELF_ID | 77 | parentID: MyAvatar.SELF_ID |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | var renderStates = [ | 80 | var renderStates = [ |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | /* jslint bitwise: true */ | 8 | /* jslint bitwise: true */ |
| 9 | 9 | ||
| 10 | /* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues, | 10 | /* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues, |
| 11 | Messages, makeDispatcherModuleParameters, AVATAR_SELF_ID, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, | 11 | Messages, makeDispatcherModuleParameters, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, |
| 12 | COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, | 12 | COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, |
| 13 | getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick | 13 | getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick |
| 14 | */ | 14 | */ |
| @@ -28,7 +28,7 @@ Script.include("/~/system/libraries/utils.js"); · 13 unmodified lines | |||
| 28 | lineWidth: 5, | 28 | lineWidth: 5, |
| 29 | ignoreRayIntersection: true, // always ignore this | 29 | ignoreRayIntersection: true, // always ignore this |
| 30 | drawInFront: true, // Even when burried inside of something, show it. | 30 | drawInFront: true, // Even when burried inside of something, show it. |
| 31 | parentID: AVATAR_SELF_ID | 31 | parentID: MyAvatar.SELF_ID |
| 32 | }; | 32 | }; |
| 33 | var halfEnd = { | 33 | var halfEnd = { |
| 34 | type: "sphere", | 34 | type: "sphere", |
| @@ -49,7 +49,7 @@ Script.include("/~/system/libraries/utils.js"); · 14 unmodified lines | |||
| 49 | lineWidth: 5, | 49 | lineWidth: 5, |
| 50 | ignoreRayIntersection: true, // always ignore this | 50 | ignoreRayIntersection: true, // always ignore this |
| 51 | drawInFront: true, // Even when burried inside of something, show it. | 51 | drawInFront: true, // Even when burried inside of something, show it. |
| 52 | parentID: AVATAR_SELF_ID | 52 | parentID: MyAvatar.SELF_ID |
| 53 | }; | 53 | }; |
| 54 | var fullEnd = { | 54 | var fullEnd = { |
| 55 | type: "sphere", | 55 | type: "sphere", |
| @@ -70,7 +70,7 @@ Script.include("/~/system/libraries/utils.js"); · 14 unmodified lines | |||
| 70 | lineWidth: 5, | 70 | lineWidth: 5, |
| 71 | ignoreRayIntersection: true, // always ignore this | 71 | ignoreRayIntersection: true, // always ignore this |
| 72 | drawInFront: true, // Even when burried inside of something, show it. | 72 | drawInFront: true, // Even when burried inside of something, show it. |
| 73 | parentID: AVATAR_SELF_ID | 73 | parentID: MyAvatar.SELF_ID |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | var renderStates = [ | 76 | var renderStates = [ |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | |||
| 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 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, | 9 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, 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, |
| @@ -50,7 +50,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 37 unmodified lines | |||
| 50 | return false; | 50 | return false; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) { | 53 | if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) { |
| 54 | return false; | 54 | return false; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| @@ -90,7 +90,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 33 unmodified lines | |||
| 90 | Entities.callEntityMethod(targetProps.id, "startNearGrab", args); | 90 | Entities.callEntityMethod(targetProps.id, "startNearGrab", args); |
| 91 | 91 | ||
| 92 | var reparentProps = { | 92 | var reparentProps = { |
| 93 | parentID: AVATAR_SELF_ID, | 93 | parentID: MyAvatar.SELF_ID, |
| 94 | parentJointIndex: handJointIndex, | 94 | parentJointIndex: handJointIndex, |
| 95 | localVelocity: {x: 0, y: 0, z: 0}, | 95 | localVelocity: {x: 0, y: 0, z: 0}, |
| 96 | localAngularVelocity: {x: 0, y: 0, z: 0} | 96 | localAngularVelocity: {x: 0, y: 0, z: 0} |
| @@ -152,7 +152,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 55 unmodified lines | |||
| 152 | var now = Date.now(); | 152 | var now = Date.now(); |
| 153 | if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * TEAR_AWAY_CHECK_TIME) { | 153 | if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * TEAR_AWAY_CHECK_TIME) { |
| 154 | this.lastUnequipCheckTime = now; | 154 | this.lastUnequipCheckTime = now; |
| 155 | if (props.parentID == AVATAR_SELF_ID) { | 155 | if (props.parentID === MyAvatar.SELF_ID) { |
| 156 | var sensorScaleFactor = MyAvatar.sensorToWorldScale; | 156 | var sensorScaleFactor = MyAvatar.sensorToWorldScale; |
| 157 | var handPosition = controllerData.controllerLocations[this.hand].position; | 157 | var handPosition = controllerData.controllerLocations[this.hand].position; |
| 158 | var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props); | 158 | var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props); |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | |||
| 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 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, | 9 | /* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, 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_RADIUS | 12 | NEAR_GRAB_RADIUS |
| @@ -48,7 +48,7 @@ Script.include("/~/system/libraries/utils.js"); · 35 unmodified lines | |||
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | this.thisHandIsParent = function(props) { | 50 | this.thisHandIsParent = function(props) { |
| 51 | if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) { | 51 | if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) { |
| 52 | return false; | 52 | return false; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| @@ -94,7 +94,7 @@ Script.include("/~/system/libraries/utils.js"); · 39 unmodified lines | |||
| 94 | var grabbedProperties = this.getGrabbedProperties(); | 94 | var grabbedProperties = this.getGrabbedProperties(); |
| 95 | 95 | ||
| 96 | var reparentProps = { | 96 | var reparentProps = { |
| 97 | parentID: AVATAR_SELF_ID, | 97 | parentID: MyAvatar.SELF_ID, |
| 98 | parentJointIndex: handJointIndex, | 98 | parentJointIndex: handJointIndex, |
| 99 | velocity: {x: 0, y: 0, z: 0}, | 99 | velocity: {x: 0, y: 0, z: 0}, |
| 100 | angularVelocity: {x: 0, y: 0, z: 0} | 100 | angularVelocity: {x: 0, y: 0, z: 0} |
| @@ -6,7 +6,7 @@ · 5 unmodified lines | |||
| 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 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, 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, 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, |
| 12 | TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay | 12 | TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay |
| @@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 27 | lineWidth: 5, | 27 | lineWidth: 5, |
| 28 | ignoreRayIntersection: true, // always ignore this | 28 | ignoreRayIntersection: true, // always ignore this |
| 29 | drawInFront: true, // Even when burried inside of something, show it. | 29 | drawInFront: true, // Even when burried inside of something, show it. |
| 30 | parentID: AVATAR_SELF_ID | 30 | parentID: MyAvatar.SELF_ID |
| 31 | }; | 31 | }; |
| 32 | var halfEnd = { | 32 | var halfEnd = { |
| 33 | type: "sphere", | 33 | type: "sphere", |
| @@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 48 | lineWidth: 5, | 48 | lineWidth: 5, |
| 49 | ignoreRayIntersection: true, // always ignore this | 49 | ignoreRayIntersection: true, // always ignore this |
| 50 | drawInFront: true, // Even when burried inside of something, show it. | 50 | drawInFront: true, // Even when burried inside of something, show it. |
| 51 | parentID: AVATAR_SELF_ID | 51 | parentID: MyAvatar.SELF_ID |
| 52 | }; | 52 | }; |
| 53 | var fullEnd = { | 53 | var fullEnd = { |
| 54 | type: "sphere", | 54 | type: "sphere", |
| @@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 69 | lineWidth: 5, | 69 | lineWidth: 5, |
| 70 | ignoreRayIntersection: true, // always ignore this | 70 | ignoreRayIntersection: true, // always ignore this |
| 71 | drawInFront: true, // Even when burried inside of something, show it. | 71 | drawInFront: true, // Even when burried inside of something, show it. |
| 72 | parentID: AVATAR_SELF_ID | 72 | parentID: MyAvatar.SELF_ID |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | var renderStates = [ | 75 | var renderStates = [ |
| @@ -235,7 +235,7 @@ Script.include("/~/system/libraries/controllers.js"); · 159 unmodified lines | |||
| 235 | var POINTER_PRESS_TO_MOVE_DELAY = 0.33; // seconds | 235 | var POINTER_PRESS_TO_MOVE_DELAY = 0.33; // seconds |
| 236 | if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY || | 236 | if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY || |
| 237 | distance2D(this.laserTarget.position2D, | 237 | distance2D(this.laserTarget.position2D, |
| 238 | this.pressEnterLaserTarget.position2D) > this.deadspotRadius) { | 238 | this.pressEnterLaserTarget.position2D) > this.deadspotRadius) { |
| 239 | TouchEventUtils.sendTouchMoveEventToTouchTarget(this.hand, this.laserTarget); | 239 | TouchEventUtils.sendTouchMoveEventToTouchTarget(this.hand, this.laserTarget); |
| 240 | this.deadspotExpired = true; | 240 | this.deadspotExpired = true; |
| 241 | } | 241 | } |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, | 8 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, |
| 9 | 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 | HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset, |
| 12 | getEnabledModuleByName | 12 | getEnabledModuleByName |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| @@ -172,7 +172,7 @@ Script.include("/~/system/libraries/controllers.js"); · 157 unmodified lines | |||
| 172 | visible: true, | 172 | visible: true, |
| 173 | ignoreRayIntersection: true, | 173 | ignoreRayIntersection: true, |
| 174 | drawInFront: false, | 174 | drawInFront: false, |
| 175 | parentID: AVATAR_SELF_ID, | 175 | parentID: MyAvatar.SELF_ID, |
| 176 | parentJointIndex: MyAvatar.getJointIndex(this.hand === RIGHT_HAND ? | 176 | parentJointIndex: MyAvatar.getJointIndex(this.hand === RIGHT_HAND ? |
| 177 | "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : | 177 | "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : |
| 178 | "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND") | 178 | "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND") |
| @@ -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, | 13 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex, |
| 14 | enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3, | 14 | enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3, |
| 15 | LaserPointers, RayPick, HMD, Uuid, AvatarList | 15 | LaserPointers, RayPick, HMD, Uuid, AvatarList |
| 16 | */ | 16 | */ |
| @@ -10,7 +10,7 @@ · 9 unmodified lines | |||
| 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, 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, Overlays | 13 | DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | Script.include("/~/system/libraries/controllerDispatcherUtils.js"); | 16 | Script.include("/~/system/libraries/controllerDispatcherUtils.js"); |
| @@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines | |||
| 27 | lineWidth: 5, | 27 | lineWidth: 5, |
| 28 | ignoreRayIntersection: true, // always ignore this | 28 | ignoreRayIntersection: true, // always ignore this |
| 29 | drawInFront: true, // Even when burried inside of something, show it. | 29 | drawInFront: true, // Even when burried inside of something, show it. |
| 30 | parentID: AVATAR_SELF_ID | 30 | parentID: MyAvatar.SELF_ID |
| 31 | }; | 31 | }; |
| 32 | var halfEnd = { | 32 | var halfEnd = { |
| 33 | type: "sphere", | 33 | type: "sphere", |
| @@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 48 | lineWidth: 5, | 48 | lineWidth: 5, |
| 49 | ignoreRayIntersection: true, // always ignore this | 49 | ignoreRayIntersection: true, // always ignore this |
| 50 | drawInFront: true, // Even when burried inside of something, show it. | 50 | drawInFront: true, // Even when burried inside of something, show it. |
| 51 | parentID: AVATAR_SELF_ID | 51 | parentID: MyAvatar.SELF_ID |
| 52 | }; | 52 | }; |
| 53 | var fullEnd = { | 53 | var fullEnd = { |
| 54 | type: "sphere", | 54 | type: "sphere", |
| @@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines | |||
| 69 | lineWidth: 5, | 69 | lineWidth: 5, |
| 70 | ignoreRayIntersection: true, // always ignore this | 70 | ignoreRayIntersection: true, // always ignore this |
| 71 | drawInFront: true, // Even when burried inside of something, show it. | 71 | drawInFront: true, // Even when burried inside of something, show it. |
| 72 | parentID: AVATAR_SELF_ID | 72 | parentID: MyAvatar.SELF_ID |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | var renderStates = [ | 75 | var renderStates = [ |