introduce editorconfig
This commit is contained in:
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
indent_size = 1
|
||||||
|
|
||||||
|
[*.{css,js,json}]
|
||||||
|
indent_style = tab
|
||||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -32,4 +32,4 @@ jobs:
|
|||||||
# The GH actions bot is used by default if you didn't specify the two fields.
|
# The GH actions bot is used by default if you didn't specify the two fields.
|
||||||
# You can swap them out with your own user credentials.
|
# You can swap them out with your own user credentials.
|
||||||
user_name: github-actions[bot]
|
user_name: github-actions[bot]
|
||||||
user_email: 41898282+github-actions[bot]@users.noreply.github.com
|
user_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
GIT_USER=$1 USE_SSH=true yarn deploy
|
GIT_USER=$1 USE_SSH=true yarn deploy
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ Every message uses [flatbuffers](https://google.github.io/flatbuffers/) and [fle
|
|||||||
namespace StardustXR;
|
namespace StardustXR;
|
||||||
|
|
||||||
table Message {
|
table Message {
|
||||||
type: ubyte;
|
type: ubyte;
|
||||||
id: uint;
|
id: uint;
|
||||||
object: string;
|
object: string;
|
||||||
method: string;
|
method: string;
|
||||||
error: string;
|
error: string;
|
||||||
data:[ubyte] (flexbuffer);
|
data:[ubyte] (flexbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
root_type Message;
|
root_type Message;
|
||||||
@@ -75,4 +75,4 @@ A `Vector` of 2 `double` is treated as a `Vector2`.
|
|||||||
### Vector3
|
### Vector3
|
||||||
A `Vector` of 3 `double` is treated as a `Vector3`.
|
A `Vector` of 3 `double` is treated as a `Vector3`.
|
||||||
### Quaternion
|
### Quaternion
|
||||||
A `Vector` of 4 `double` is treated as a `Quaternion`.
|
A `Vector` of 4 `double` is treated as a `Quaternion`.
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ Creates a new [Model](../types/Model.md) at `/model/[name]` with parent at `spac
|
|||||||
Sets the sky texture to be the image (HDR) at the absolute `path`.
|
Sets the sky texture to be the image (HDR) at the absolute `path`.
|
||||||
|
|
||||||
### `setSkylight(string path)`
|
### `setSkylight(string path)`
|
||||||
Sets the ambient lighting (using spherical harmonics) to the HDR at the absolute `path`.
|
Sets the ambient lighting (using spherical harmonics) to the HDR at the absolute `path`.
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ Creates a new [BoxField](../types/field/BoxField.md) at `/field/[name]` with par
|
|||||||
Creates a new [CylinderField](../types/field/CylinderField.md) at `/field/[name]` with parent at `spacePath`.
|
Creates a new [CylinderField](../types/field/CylinderField.md) at `/field/[name]` with parent at `spacePath`.
|
||||||
|
|
||||||
### `createSphereField(string name, string spacePath, Vector3 origin, float radius)`
|
### `createSphereField(string name, string spacePath, Vector3 origin, float radius)`
|
||||||
Creates a new [SphereField](../types/field/SphereField.md) at `/field/[name]` with parent at `spacePath`.
|
Creates a new [SphereField](../types/field/SphereField.md) at `/field/[name]` with parent at `spacePath`.
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ Creates a new [InputHandler](../types/input/InputHandler.md) with the specified
|
|||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
### `Vector<Vector<string inputHandlerUUID, Vector3 position>> getInputHandlers(string spacePath, bool excludeSelf)`
|
### `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.
|
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.
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ Object managing spatial objects and spatial manipulation.
|
|||||||
Creates a new [Spatial](../types/Spatial.md) at `/spatial/spatial/[name]` with parent at `spacePath`.
|
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)`
|
### `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`).
|
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`).
|
||||||
|
|||||||
@@ -38,4 +38,4 @@ Sets the material property `propertyName` on this model's submesh at `submeshInd
|
|||||||
|`emission` | `string` | Path to the emission texture of the material (if it has one). |
|
|`emission` | `string` | Path to the emission texture of the material (if it has one). |
|
||||||
|`metal` | `string` | Path to the metalness texture of the material (if it has one). |
|
|`metal` | `string` | Path to the metalness texture of the material (if it has one). |
|
||||||
|`normal` | `string` | Path to the normal map texture of the material (if it has one). |
|
|`normal` | `string` | Path to the normal map texture of the material (if it has one). |
|
||||||
|`occlusion` | `string` | Path to the occlusion map texture of the material (if it has one). |
|
|`occlusion` | `string` | Path to the occlusion map texture of the material (if it has one). |
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ A base type for all other types that exist in 3D space.
|
|||||||
Destroy this node immediately, as well as all its children if it has any.
|
Destroy this node immediately, as well as all its children if it has any.
|
||||||
|
|
||||||
### `setEnabled(bool enabled)`
|
### `setEnabled(bool enabled)`
|
||||||
Set if this node is enabled or not, for example a disabled model will not render and a disabled input handler will not recieve input.
|
Set if this node is enabled or not, for example a disabled model will not render and a disabled input handler will not recieve input.
|
||||||
|
|||||||
@@ -53,4 +53,4 @@ Enable/disable this spatial's zoneable property.
|
|||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
### `Vector<Vector3 origin, Quat orientation, Vector3 scale> getTransform(null)`
|
### `Vector<Vector3 origin, Quat orientation, Vector3 scale> getTransform(null)`
|
||||||
Returns the `origin`, `orientation`, and `scale` of this spatial relative to its parent.
|
Returns the `origin`, `orientation`, and `scale` of this spatial relative to its parent.
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ Returns `true`/`false` if the [Spatial](Spatial) is captured by this zone or ano
|
|||||||
Captures the [Spatial](Spatial) at `spatialUUID` if that [Spatial](Spatial) exists and is accessible by this zone. This means that the [Spatial](Spatial) cannot be seen or affected by other zones unless a zone is closer to the [Spatial](Spatial) than this zone.
|
Captures the [Spatial](Spatial) at `spatialUUID` if that [Spatial](Spatial) exists and is accessible by this zone. This means that the [Spatial](Spatial) cannot be seen or affected by other zones unless a zone is closer to the [Spatial](Spatial) than this zone.
|
||||||
|
|
||||||
### `release(string spatialUUID)`
|
### `release(string spatialUUID)`
|
||||||
Uncaptures the [Spatial](Spatial) at `spatialUUID` so any zone the [Spatial](Spatial) is inside can access it.
|
Uncaptures the [Spatial](Spatial) at `spatialUUID` so any zone the [Spatial](Spatial) is inside can access it.
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ This field is in a rectangular prism shape.
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
### `setSize(Vector3 size)`
|
### `setSize(Vector3 size)`
|
||||||
Sets the size of the box.
|
Sets the size of the box.
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ A cylinder shaped field defined by radius and length, along the forward vector.
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
### `setSize(Vector3 size)`
|
### `setSize(Vector3 size)`
|
||||||
Sets the size of the box.
|
Sets the size of the box.
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ Returns the distance from `point` to the surface of the object, positive if the
|
|||||||
Returns the normal of `point` compared to the surface of the object. Normal always points toward object.
|
Returns the normal of `point` compared to the surface of the object. Normal always points toward object.
|
||||||
|
|
||||||
### `Vector3 closestPoint(string spacePath, Vector3 point)`
|
### `Vector3 closestPoint(string spacePath, Vector3 point)`
|
||||||
Returns the closest point from `point` to the surface of the object. Use this instead of `distance` and `normal` when best to limit IPC calls.
|
Returns the closest point from `point` to the surface of the object. Use this instead of `distance` and `normal` when best to limit IPC calls.
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ This Field is in a sphere shape.
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
### `setRadius(double size)`
|
### `setRadius(double size)`
|
||||||
Sets the radius of the sphere.
|
Sets the radius of the sphere.
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ Get a list of all action names (human-readable).
|
|||||||
Set all the objects on this input handler to `actions`.
|
Set all the objects on this input handler to `actions`.
|
||||||
|
|
||||||
### `runAction(String actionName)`
|
### `runAction(String actionName)`
|
||||||
Runs the action specififed by `actionName`.
|
Runs the action specififed by `actionName`.
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ Standard supported datamap keys will be put in the individual type's documentati
|
|||||||
<!-- Sets the position of this [InputMethod](../input/InputMethod). This pose also defines the main interaction point. -->
|
<!-- Sets the position of this [InputMethod](../input/InputMethod). This pose also defines the main interaction point. -->
|
||||||
|
|
||||||
### `modifyDatamap(Dictionary data)`
|
### `modifyDatamap(Dictionary data)`
|
||||||
Merges the datamap of this [InputMethod](InputMethod) with `data`. Each key here will add to the datamap if not present and set the existing value if present. Any key not present in `data` will be unaffected.
|
Merges the datamap of this [InputMethod](InputMethod) with `data`. Each key here will add to the datamap if not present and set the existing value if present. Any key not present in `data` will be unaffected.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# HandInput
|
# HandInput
|
||||||
|
|
||||||
### Derived from [InputMethod](../InputMethod)
|
### Derived from [InputMethod](../InputMethod)
|
||||||
|
|
||||||
A full 27-bone hand+forearm input with useful abstractions provided through the datamap.
|
A full 27-bone hand+forearm input with useful abstractions provided through the datamap.
|
||||||
@@ -6,6 +7,7 @@ A full 27-bone hand+forearm input with useful abstractions provided through the
|
|||||||
The local space of a hand is where +Z is away from the palm, +Y is from the palm to the fingers, and +X is orthogonal and to the right.
|
The local space of a hand is where +Z is away from the palm, +Y is from the palm to the fingers, and +X is orthogonal and to the right.
|
||||||
|
|
||||||
## Serialization
|
## Serialization
|
||||||
|
|
||||||
| Key | Value Type |
|
| Key | Value Type |
|
||||||
|-----------|--------------|
|
|-----------|--------------|
|
||||||
| origin | `Vector3` |
|
| origin | `Vector3` |
|
||||||
@@ -15,36 +17,39 @@ The local space of a hand is where +Z is away from the palm, +Y is from the palm
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
[
|
[
|
||||||
thumb metacarpal,
|
thumb metacarpal,
|
||||||
thumb proximal,
|
thumb proximal,
|
||||||
thumb distal,
|
thumb distal,
|
||||||
thumb tip,
|
thumb tip,
|
||||||
index metacarpal,
|
index metacarpal,
|
||||||
index proximal,
|
index proximal,
|
||||||
index intermediate,
|
index intermediate,
|
||||||
index distal,
|
index distal,
|
||||||
index tip,
|
index tip,
|
||||||
middle metacarpal,
|
middle metacarpal,
|
||||||
middle proximal,
|
middle proximal,
|
||||||
middle intermediate,
|
middle intermediate,
|
||||||
middle distal,
|
middle distal,
|
||||||
middle tip,
|
middle tip,
|
||||||
ring metacarpal,
|
ring metacarpal,
|
||||||
ring proximal,
|
ring proximal,
|
||||||
ring intermediate,
|
ring intermediate,
|
||||||
ring distal,
|
ring distal,
|
||||||
ring tip,
|
ring tip,
|
||||||
little metacarpal,
|
little metacarpal,
|
||||||
little proximal,
|
little proximal,
|
||||||
little intermediate,
|
little intermediate,
|
||||||
little distal,
|
little distal,
|
||||||
little tip
|
little tip
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
(This section is WIP)
|
(This section is WIP)
|
||||||
|
|
||||||
## Datamap
|
## Datamap
|
||||||
|
|
||||||
### Required
|
### Required
|
||||||
|
|
||||||
| Key | Value Type | Description |
|
| Key | Value Type | Description |
|
||||||
|-----------------|-----------------------------|--------------------------------------------------------------------|
|
|-----------------|-----------------------------|--------------------------------------------------------------------|
|
||||||
| confidence | `float` (range `0.0`-`1.0`) | How confident the hand tracker is of the pose of the hand |
|
| confidence | `float` (range `0.0`-`1.0`) | How confident the hand tracker is of the pose of the hand |
|
||||||
@@ -54,4 +59,5 @@ The local space of a hand is where +Z is away from the palm, +Y is from the palm
|
|||||||
| grabStrength | `float` (range `0.0`-`1.0`) | How much the hand is making a fist |
|
| grabStrength | `float` (range `0.0`-`1.0`) | How much the hand is making a fist |
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
**TODO**: Properly secured field distance calculation accessible to clients
|
|
||||||
|
**TODO**: Properly secured field distance calculation accessible to clients
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
docId: 'getting-started/overview',
|
docId: 'overview',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
},
|
},
|
||||||
|
|||||||
13
sidebars.js
13
sidebars.js
@@ -1,12 +1,13 @@
|
|||||||
/**
|
/**
|
||||||
* Creating a sidebar enables you to:
|
Creating a sidebar enables you to:
|
||||||
- create an ordered group of docs
|
- create an ordered group of docs
|
||||||
- render a sidebar for each doc of that group
|
- render a sidebar for each doc of that group
|
||||||
- provide next/previous navigation
|
- provide next/previous navigation
|
||||||
|
|
||||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
||||||
|
|
||||||
Create as many sidebars as you want.
|
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||||
|
|
||||||
|
Create as many sidebars as you want.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -43,4 +43,4 @@ li.task-list-item > input[type="checkbox"] {
|
|||||||
.gallery {
|
.gallery {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 1250px;
|
max-width: 1250px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,4 +70,4 @@ title: Roadmap
|
|||||||
- [ ] Panel Item UI
|
- [ ] Panel Item UI
|
||||||
- [ ] Flatland
|
- [ ] Flatland
|
||||||
|
|
||||||
More to come!
|
More to come!
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
stardustxr.org
|
stardustxr.org
|
||||||
|
|||||||
Reference in New Issue
Block a user