Update for rust
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Server Objects",
|
||||
"position": 2
|
||||
}
|
||||
13
docs-archive/stardust-protocol/server/objects/drawable.md
Normal file
13
docs-archive/stardust-protocol/server/objects/drawable.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# /drawable
|
||||
|
||||
Object managing anything drawable, from the skytex to models.
|
||||
|
||||
## Signals
|
||||
### `createModelFromFile(string name, string spacePath, string path)`
|
||||
Creates a new [Model](../types/Model.md) at `/model/[name]` with parent at `spacePath`.
|
||||
|
||||
### `setSkytex(string path)`
|
||||
Sets the sky texture to be the image (HDR) at the absolute `path`.
|
||||
|
||||
### `setSkylight(string path)`
|
||||
Sets the ambient lighting (using spherical harmonics) to the HDR at the absolute `path`.
|
||||
13
docs-archive/stardust-protocol/server/objects/field.md
Normal file
13
docs-archive/stardust-protocol/server/objects/field.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# /field
|
||||
|
||||
Object managing fields for interaction.
|
||||
|
||||
## Signals
|
||||
### `createBoxField(string name, string spacePath, Vector3 origin, Quaternion orientation, Vector3 size)`
|
||||
Creates a new [BoxField](../types/field/BoxField.md) at `/field/[name]` with parent at `spacePath`.
|
||||
|
||||
### `createCylinderField(string name, string spacePath, Vector3 origin, Quaternion orientation, float length, float radius)`
|
||||
Creates a new [CylinderField](../types/field/CylinderField.md) at `/field/[name]` with parent at `spacePath`.
|
||||
|
||||
### `createSphereField(string name, string spacePath, Vector3 origin, float radius)`
|
||||
Creates a new [SphereField](../types/field/SphereField.md) at `/field/[name]` with parent at `spacePath`.
|
||||
9
docs-archive/stardust-protocol/server/objects/hmd.md
Normal file
9
docs-archive/stardust-protocol/server/objects/hmd.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# /hmd
|
||||
|
||||
Reference object to the HMD being used to render content and track head position. This does not currently work, but is planned to.
|
||||
|
||||
<!-- ## Signals -->
|
||||
<!-- ### `setPosition(Vector3 position)` -->
|
||||
<!-- ### `setRotation(Quaternion rotation)` -->
|
||||
<!-- ### `setPose(Vector3 position, Quaternion rotation)` -->
|
||||
<!-- ### `setIPD(double meters)` -->
|
||||
16
docs-archive/stardust-protocol/server/objects/input.md
Executable file
16
docs-archive/stardust-protocol/server/objects/input.md
Executable file
@@ -0,0 +1,16 @@
|
||||
# /input
|
||||
|
||||
Object managing input and interaction.
|
||||
|
||||
## Signals
|
||||
<!-- ### `registerPointerInput(string name, Vector3 origin, Vector3 direction, float tilt)` -->
|
||||
<!-- Creates a new [PointerInput](../types/input/inputtypes/PointerInput.fbs) at `/input/methods/[name]` with the origin, direction, and tilt specified. -->
|
||||
|
||||
### `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`.
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
### `Vector<Vector<string inputHandlerUUID, Vector3 position>> 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.
|
||||
14
docs-archive/stardust-protocol/server/objects/root.md
Normal file
14
docs-archive/stardust-protocol/server/objects/root.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# /
|
||||
|
||||
Object managing the client/server relationship as a whole.
|
||||
|
||||
## Signals
|
||||
### `subscribeLogicStep(string path, string method)`
|
||||
Executes `method` on object at `path` on the client when the main logic loop of the server starts each frame.
|
||||
|
||||
`method` must have arguments of `(double delta, double timeToRender)`.
|
||||
|
||||
`delta` gives the time in seconds between the current time and the last time the logic loop executed while `timeToRender` gives the time in ms since epoch when the current frame is expected to reach the user's eyes (returns 0 for now).
|
||||
|
||||
### `disconnect(null)`
|
||||
Lets the server know that the client wishes to disconnect. After this it can be assumed the client is disconnected from the server.
|
||||
10
docs-archive/stardust-protocol/server/objects/spatial.md
Normal file
10
docs-archive/stardust-protocol/server/objects/spatial.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# /spatial
|
||||
|
||||
Object managing spatial objects and spatial manipulation.
|
||||
|
||||
## Signals
|
||||
### `createSpatial(string name, string spacePath, Vector3 origin, Quat orientation, Vector3 scale, bool translatable, bool rotatable, bool scalable)`
|
||||
Creates a new [Spatial](../types/Spatial.md) at `/spatial/spatial/[name]` with parent at `spacePath`.
|
||||
|
||||
### `createZone(string name, string fieldPath, string spacePath, Vector3 origin, Quat orientation, string callbackPath, string callbackMethod)`
|
||||
Creates a new [Zone](../types/Zone.md) at `/spatial/zone/[name]` with parent at `spacePath` and field at `fieldPath`. The arguments `callbackPath` and `callbackMethod` refer to a callback method accepting a `Vector` of 2 `TypedVector`s, the first being a list of names of nodes that have just entered the field and the second being names of nodes that left (as `string`).
|
||||
Reference in New Issue
Block a user