diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js index 7cd55734f7..4c61e22764 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js @@ -190,7 +190,7 @@ Script.include("/~/system/libraries/controllers.js"); var worldToSensorMat = Mat4.inverse(MyAvatar.getSensorToWorldMatrix()); var roomControllerPosition = Mat4.transformPoint(worldToSensorMat, worldControllerPosition); - var grabbedProperties = Entities.getEntityProperties(this.grabbedThingID, DISPATCHER_PROPERTIES); + var grabbedProperties = Entities.getEntityProperties(this.grabbedThingID, "position"); var now = Date.now(); var deltaObjectTime = (now - this.currentObjectTime) / MSECS_PER_SEC; // convert to seconds this.currentObjectTime = now; @@ -306,7 +306,7 @@ Script.include("/~/system/libraries/controllers.js"); this.notPointingAtEntity = function(controllerData) { var intersection = controllerData.rayPicks[this.hand]; - var entityProperty = Entities.getEntityProperties(intersection.objectID, DISPATCHER_PROPERTIES); + var entityProperty = Entities.getEntityProperties(intersection.objectID, "type"); var entityType = entityProperty.type; var hudRayPick = controllerData.hudRayPicks[this.hand]; var point2d = this.calculateNewReticlePosition(hudRayPick.intersection); @@ -341,7 +341,7 @@ Script.include("/~/system/libraries/controllers.js"); var worldControllerPosition = controllerLocation.position; var worldControllerRotation = controllerLocation.orientation; - var grabbedProperties = Entities.getEntityProperties(intersection.objectID, DISPATCHER_PROPERTIES); + var grabbedProperties = Entities.getEntityProperties(intersection.objectID, "position"); this.currentObjectPosition = grabbedProperties.position; this.grabRadius = intersection.distance; @@ -355,7 +355,7 @@ Script.include("/~/system/libraries/controllers.js"); }; this.targetIsNull = function() { - var properties = Entities.getEntityProperties(this.grabbedThingID, DISPATCHER_PROPERTIES); + var properties = Entities.getEntityProperties(this.grabbedThingID, "type"); if (Object.keys(properties).length === 0 && this.distanceHolding) { return true; } diff --git a/scripts/system/controllers/controllerModules/farGrabEntity.js b/scripts/system/controllers/controllerModules/farGrabEntity.js index b609215fa9..43109198fe 100644 --- a/scripts/system/controllers/controllerModules/farGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farGrabEntity.js @@ -224,7 +224,7 @@ Script.include("/~/system/libraries/controllers.js"); var worldToSensorMat = Mat4.inverse(MyAvatar.getSensorToWorldMatrix()); var roomControllerPosition = Mat4.transformPoint(worldToSensorMat, worldControllerPosition); - var targetProps = Entities.getEntityProperties(this.targetEntityID, DISPATCHER_PROPERTIES); + var targetProps = Entities.getEntityProperties(this.targetEntityID, "position"); var now = Date.now(); var deltaObjectTime = (now - this.currentObjectTime) / MSECS_PER_SEC; // convert to seconds this.currentObjectTime = now; @@ -358,7 +358,7 @@ Script.include("/~/system/libraries/controllers.js"); this.notPointingAtEntity = function (controllerData) { var intersection = controllerData.rayPicks[this.hand]; - var entityProperty = Entities.getEntityProperties(intersection.objectID, DISPATCHER_PROPERTIES); + var entityProperty = Entities.getEntityProperties(intersection.objectID, "type"); var entityType = entityProperty.type; var hudRayPick = controllerData.hudRayPicks[this.hand]; var point2d = this.calculateNewReticlePosition(hudRayPick.intersection); @@ -370,7 +370,7 @@ Script.include("/~/system/libraries/controllers.js"); }; this.targetIsNull = function () { - var properties = Entities.getEntityProperties(this.targetEntityID, DISPATCHER_PROPERTIES); + var properties = Entities.getEntityProperties(this.targetEntityID, "type"); if (Object.keys(properties).length === 0 && this.distanceHolding) { return true; } diff --git a/scripts/system/controllers/controllerModules/nearGrabEntity.js b/scripts/system/controllers/controllerModules/nearGrabEntity.js index 1a1b55c020..92fcc7ceb6 100644 --- a/scripts/system/controllers/controllerModules/nearGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearGrabEntity.js @@ -161,7 +161,7 @@ Script.include("/~/system/libraries/controllers.js"); var props = controllerData.nearbyEntityPropertiesByID[this.targetEntityID]; if (!props) { - props = Entities.getEntityProperties(this.targetEntityID, DISPATCHER_PROPERTIES); + props = Entities.getEntityProperties(this.targetEntityID, "type"); if (!props) { // entity was deleted this.grabbing = false; diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 77a01883b5..4368a42df4 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -7,7 +7,7 @@ /* global Script, Entities, enableDispatcherModule, disableDispatcherModule, makeRunningValues, makeDispatcherModuleParameters, Overlays, HMD, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, getEnabledModuleByName, - Picks, makeLaserParams, Settings, MyAvatar, RIGHT_HAND, LEFT_HAND, DISPATCHER_PROPERTIES + Picks, makeLaserParams, Settings, MyAvatar, RIGHT_HAND, LEFT_HAND */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -164,7 +164,7 @@ Script.include("/~/system/libraries/controllers.js"); return type; } } else if (intersection.type === Picks.INTERSECTED_ENTITY) { - var entityProperties = Entities.getEntityProperties(objectID, DISPATCHER_PROPERTIES); + var entityProperties = Entities.getEntityProperties(objectID, ["type","locked"]); var entityType = entityProperties.type; var isLocked = entityProperties.locked; if (entityType === "Web" && (!isLocked || triggerPressed)) { diff --git a/scripts/system/controllers/grab.js b/scripts/system/controllers/grab.js index 459fad3425..a9e003be45 100644 --- a/scripts/system/controllers/grab.js +++ b/scripts/system/controllers/grab.js @@ -311,7 +311,7 @@ Grabber.prototype.pressEvent = function(event) { mouse.startDrag(event); var clickedEntity = pickResults.objectID; - var entityProperties = Entities.getEntityProperties(clickedEntity, DISPATCHER_PROPERTIES); + var entityProperties = Entities.getEntityProperties(clickedEntity, ["position", "rotation", "dimensions"]); this.startPosition = entityProperties.position; this.lastRotation = entityProperties.rotation; var cameraPosition = Camera.getPosition(); @@ -422,7 +422,7 @@ Grabber.prototype.moveEvent = function(event) { Grabber.prototype.moveEventProcess = function() { this.moveEventTimer = null; - var entityProperties = Entities.getEntityProperties(this.entityID, DISPATCHER_PROPERTIES); + var entityProperties = Entities.getEntityProperties(this.entityID, "position"); if (!entityProperties || HMD.active) { return; }