diff --git a/docs/stardust-protocol/server/objects/input.md b/docs/stardust-protocol/server/objects/input.md index 7d9c8e25..a1ec8e98 100755 --- a/docs/stardust-protocol/server/objects/input.md +++ b/docs/stardust-protocol/server/objects/input.md @@ -7,4 +7,7 @@ Object managing input and interaction. ### `registerInputHandler(string name, string field, string spacePath, Vector3 position, Quat rotation, string callbackPath, string callbackMethod)` -Creates a new [InputHandler](../types/input/InputHandler.md) with the specified `name` and `field`, located relative to the space referenced in `spacePath` and the `postion` + `rotation`. \ No newline at end of file +Creates a new [InputHandler](../types/input/InputHandler.md) with the specified `name` and `field`, located relative to the space referenced in `spacePath` and the `postion` + `rotation`. + +### `Vector> getInputHandlers(string spacePath, bool excludeSelf)` +Returns a list of all [InputHandler](../types/input/InputHandler.md) UUIDs and their positions (relative to the space at `spacePath`), as well as puts aliases to those handlers in `/input/global_handler/[UUID]`. Excludes handlers from this client if `excludeSelf` is true. \ No newline at end of file diff --git a/docs/stardust-protocol/server/types/Model.md b/docs/stardust-protocol/server/types/Model.md index 7bd9ab4f..2e3d3192 100644 --- a/docs/stardust-protocol/server/types/Model.md +++ b/docs/stardust-protocol/server/types/Model.md @@ -7,14 +7,18 @@ sidebar_position: 3 A graphical model. ## Properties + +### `setVisible(bool visible)` +Enables/disables visibility. + ### `setOrigin(Vector3 origin)` Sets the origin to `origin`. ### `setOrientation(Quat orientation)` Sets the orientation to `orientation`. - -### `setPose(Vector3 origin, Quat orientation)` -Sets the pose using `origin` and `orientation` absolutely. + + + ### `destroy()` Destroys the model instance. Resources like the mesh and material and textures may be in memory still, but the resource manager will clean it up if needed. diff --git a/docs/stardust-protocol/server/types/Node.md b/docs/stardust-protocol/server/types/Node.md index ff849065..1f16f751 100644 --- a/docs/stardust-protocol/server/types/Node.md +++ b/docs/stardust-protocol/server/types/Node.md @@ -5,6 +5,6 @@ sidebar_position: 1 # Node A base type for all other types that exist in 3D space. - - - \ No newline at end of file +## Methods +### `destroy()` +Destroy this node immediately, as well as all its children if it has any. \ No newline at end of file diff --git a/docs/stardust-protocol/server/types/Spatial.md b/docs/stardust-protocol/server/types/Spatial.md index 0ec32de8..2f437d49 100644 --- a/docs/stardust-protocol/server/types/Spatial.md +++ b/docs/stardust-protocol/server/types/Spatial.md @@ -22,9 +22,6 @@ Moves the Spatial relative to itself if `translatable` is not `false`. ### `rotate(Quat rotation)` Rotates the Spatial relative to itself if `rotatable` is not `false`. -### `rotateAround(Vector3 point, Quat rotation)` -Rotates the Spatial around `point` (relative to itself) if `rotatable` is not `false`. - ### `scale(float scale)` Multiplies the Spatial's scale vector by `scale` if `scalable` is not `false`. @@ -44,4 +41,7 @@ Sets the pose relative to the Spatial's space if `translatable` and `rotatable` Sets the transform relative to the Spatial's space if `translatable`, `rotatable` and `scalable` are true. This method saves on IPC calls compared to `setOrigin`, `setOrientation`, and `setScale` in sequence. ### `setSpatialParent(string parentPath)` -Sets the spatial parent of this `Spatial` while keeping the "absolute" position in space intact. \ No newline at end of file +Sets the spatial parent of this `Spatial` while keeping the object in the same place in local space. + +### `setSpatialParentInPlace(string parentPath)` +Sets the spatial parent of this `Spatial` while not changing the object's absolute position. \ No newline at end of file diff --git a/docs/stardust-protocol/server/types/input/InputHandler.md b/docs/stardust-protocol/server/types/input/InputHandler.md index 16c7c664..1ec906df 100755 --- a/docs/stardust-protocol/server/types/input/InputHandler.md +++ b/docs/stardust-protocol/server/types/input/InputHandler.md @@ -20,4 +20,16 @@ Sets the pose using `origin` and `orientation` relative to the pose's space. Sets the field this input handler will use. ### `setCallback(string callbackPath, string callbackMethod)` -Sets the callback this input handler will use. \ No newline at end of file +Sets the callback this input handler will use. + +### `setActions(Vector actions)` +Specify all compatible action names (human-readable). + +### `Vector getActions(null)` +Get a list of all action names (human-readable). + +### `setActions(Vector actions)` +Set all the objects on this input handler to `actions`. + +### `runAction(String actionName)` +Runs the action specififed by `actionName`. \ No newline at end of file diff --git a/docs/stardust-protocol/server/types/input/InputMethod.md b/docs/stardust-protocol/server/types/input/InputMethod.md index e2d7e548..713290c1 100755 --- a/docs/stardust-protocol/server/types/input/InputMethod.md +++ b/docs/stardust-protocol/server/types/input/InputMethod.md @@ -39,6 +39,7 @@ The datamap is a dictionary containing abstracted and raw data related to the in | `float` | Analog trigger, grip | For values such as grip/trigger, make the range `0.0`-`1.0`, for something like a scroll wheel `-0.5`-`0.5`. | | `Vector2` | Touchpad, joystick | For values such as trackpad and joystick, make each component in the range of `-0.5`-`0.5` and calculate+apply deadzone before setting these values. | | `Vector3` | Pinch position, grip axis vector | For points and directions, make this a value inside the InputMethod's local space. Raw hand pose data should not be put in the datamap. | +| `string` | Input device type/name | Device name such as `"valveindex"` and device type such as `"controller"` on a PointerInput. Useful for client devs to customize input to work best with these devices. | Standard supported datamap keys will be put in the individual type's documentation, however you can put more data in and some input handlers may be able to use that data for better interactions. diff --git a/docs/stardust-protocol/server/types/input/inputtypes/HandInput.fbs b/docs/stardust-protocol/server/types/input/inputtypes/HandInput.fbs deleted file mode 100644 index 9e33d16e..00000000 --- a/docs/stardust-protocol/server/types/input/inputtypes/HandInput.fbs +++ /dev/null @@ -1,10 +0,0 @@ -include "common.fbs"; -namespace StardustXR; - -table Hand { - finger_joints:[joint] (required); - - palm:joint (required); - wrist:joint (required); - elbow:joint; -} diff --git a/docs/stardust-protocol/server/types/input/inputtypes/Input.fbs b/docs/stardust-protocol/server/types/input/inputtypes/Input.fbs deleted file mode 100644 index 4abe56ec..00000000 --- a/docs/stardust-protocol/server/types/input/inputtypes/Input.fbs +++ /dev/null @@ -1,16 +0,0 @@ -include "PointerInput.fbs"; -include "HandInput.fbs"; -namespace StardustXR; - -union InputDataRaw { - Pointer, - Hand -} - -table InputData { - input:InputDataRaw (required); - distance:float = 0; - datamap:[ubyte] (flexbuffer); -} - -root_type InputData; diff --git a/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.fbs b/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.fbs deleted file mode 100644 index 419723c9..00000000 --- a/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.fbs +++ /dev/null @@ -1,8 +0,0 @@ -include "common.fbs"; -namespace StardustXR; - -table Pointer { - origin:vec3 (required); - direction:vec3 (required); - tilt:float = 0; -} diff --git a/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.md b/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.md index 21cac0ed..3bfeae42 100755 --- a/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.md +++ b/docs/stardust-protocol/server/types/input/inputtypes/PointerInput.md @@ -22,8 +22,9 @@ The local space for a pointer is where +Z is along the pointer's direction, +X i | scroll | `Vector2` (component range `-0.5`-`0.5`) | The amount to scroll on this input tick (sensitivity determined on the receiving client). Can be used for 2D scrolling as well as adjusting depth/size when grabbing an object. | ### Built in | Key | Value Type | Description | -|--------|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|--------|--------------|-----------------------------------------------------------| | deepestPointDistance | `float` (>=`0.0`) | The distance along the ray where the deepest surface point resides. | +| type | `string` | The type of pointer. Can be one of `"eyes"`, `"mouse"`, `"controller"`, `"gaze"`, `"generic"` | ## Methods ### `setDirection(Vector3 direction)` diff --git a/docs/stardust-protocol/server/types/input/inputtypes/common.fbs b/docs/stardust-protocol/server/types/input/inputtypes/common.fbs deleted file mode 100644 index f07bd35f..00000000 --- a/docs/stardust-protocol/server/types/input/inputtypes/common.fbs +++ /dev/null @@ -1,25 +0,0 @@ -namespace StardustXR; - -struct vec3 { - x:float; - y:float; - z:float; -} - -struct quat { - w:float; - x:float; - y:float; - z:float; -} - -struct pose { - position:vec3; - rotation:quat; -} - -struct joint { - position:vec3; - rotation:quat; - radius:float; -} diff --git a/docs/stardust-protocol/server/types/input/inputtypes/convert_cpp.sh b/docs/stardust-protocol/server/types/input/inputtypes/convert_cpp.sh deleted file mode 100644 index fa7faaf3..00000000 --- a/docs/stardust-protocol/server/types/input/inputtypes/convert_cpp.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -flatc -c *.fbs $@ diff --git a/src/css/custom.css b/src/css/custom.css index 5a18150a..a1f77d98 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -7,7 +7,7 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #dde000; + --ifm-color-primary: #e1e456; --ifm-color-primary-dark: rgb(175, 173, 33); --ifm-color-primary-darker: rgb(165, 163, 31); --ifm-color-primary-darkest: rgb(134, 136, 26);