From a1fc1c4810df8eec32b52969b45fd2e0d5c7448b Mon Sep 17 00:00:00 2001
From: David Rowe Note: Can only be connected to via Note: Can only be connected to via Properties The default scripts implement hand controller actions that use {@link Entities.callEntityMethod} to call entity script
+ * methods, if present in the entity being interacted with. All the entity methods are called with the following two arguments: Enable the mapping using {@link MappingObject#enable|enable} or {@link Controller.enableMapping} for it to take effect.
+ *
+ * Enable the mapping using {@link MappingObject#enable|enable} or {@link Controller.enableMapping} for it to take
+ * effect. Mappings and their routes are applied according to the following rules:this.preload = function (...) { ... }
in the entity script.
+ * @function Entities.preload
+ * @param {Uuid} entityID - The ID of the entity that the script is running in.
+ * @returns {Signal}
+ * @example Available in: Client Entity Scripts Server Entity Scripts this.unoad = function () { ... }
in the entity script.
+ * @function Entities.unload
+ * @returns {Signal}
+ */
void ScriptEngine::unloadEntityScript(const EntityItemID& entityID, bool shouldRemoveFromMap) {
if (QThread::currentThread() != thread()) {
#ifdef THREAD_DEBUGGING
From 65f5915372912077c51319937415f7396df5d923 Mon Sep 17 00:00:00 2001
From: David Rowe Available in: Client Entity Scripts Server Entity Scripts Functions:
+ * Functions
*
*
@@ -143,6 +143,61 @@ class ScriptEngine;
*
*
+ * Entity Methods:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method Name Description Example
+ *
+ *
+ * startFarTrigger
continueFarTrigger
stopFarTrigger
These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the
+ * user starts, continues, or stops squeezing the trigger.
+ *
+ * A light switch that can be toggled on and off from a distance.
+ *
+ *
+ *
+ * startNearTrigger
continueNearTrigger
stopNearTrigger
These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the
+ * user starts, continues, or stops squeezing the trigger.
+ * A doorbell that can be rung when a user is near.
+ *
+ *
+ *
+ * startDistanceGrab
continueDistanceGrab
These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or
+ * grabbable and not locked, and the user starts or continues to squeeze the trigger.
+ * A comet that emits icy particle trails when a user is dragging it through the sky.
+ *
+ *
+ *
+ * startNearGrab
continueNearGrab
These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or
+ * grabbable and not locked, and the user starts or continues to squeeze the trigger.
+ * A ball that glows when it's being held close.
+ *
+ *
+ *
+ * releaseGrab
This method is called when a user releases the trigger when having been either distance or near grabbing an
+ * entity.
+ * Turn off the ball glow or comet trail with the user finishes grabbing it.
+ *
+ *
+ *
+ *
+ * startEquip
continueEquip
releaseEquip
These methods are called when a user starts, continues, or stops equipping an entity.
+ * A glass that stays in the user's hand after the trigger is clicked.
+ *
+ *
+ *
* @namespace Controller
*
* @property {Controller.Actions} Actions - Predefined actions on Interface and the user's avatar. These can be used as end
From 2482da3c259752b670fc4f2acbf3c087073b80ad Mon Sep 17 00:00:00 2001
From: David Rowe "hand,userID"
— where "hand" is "left"
or "right"
, and "userID"
+ * is the user's {@link MyAvatar|MyAvatar.sessionUUID}.
@@ -49,7 +51,7 @@ class UserInputMapper;
* output that already has a route the new route is ignored.
*
A route in a {@link MappingObject} used by the {@link Controller} API.
* *Create a route using {@link MappingObject} methods and apply this object's methods to process it, terminating with
- * {@link RouteObject#to} to apply it to a Standard
control, action, or script function.
Standard
control, action, or script function. Note: Loops are not
+ * permitted.
*
* Some methods apply to routes with number data, some apply routes with {@link Pose} data, and some apply to both route * types.