### Test summary output Source: https://github.com/yellow-dog-man/resonitelink/blob/master/TESTING.md Example output after running 'dotnet test'. Shows the test summary line and build result with warnings. ```text Test summary: total: 22, failed: 0, succeeded: 22, skipped: 0, duration: 0.6s Build succeeded with 3 warning(s) in 3.4s ``` -------------------------------- ### Install ResoniteLink package with dotnet add Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/started.md Adds the YellowDogMan.ResoniteLink NuGet package to a .NET project. Run this command in the project directory. ```bash $ dotnet add package YellowDogMan.ResoniteLink ``` -------------------------------- ### Query slot data with getSlot message Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/slots.md Use this message to fetch information about the scene hierarchy. The Root slot has the special ID "Root". Set includeComponentData to true to include full component data, or false to get only reference data. Set depth to 0 for only the requested slot, -1 to fetch as deep as possible. ```JSON { "$type" : "getSlot", "slotId" : "Root", "includeComponentData" : false, "depth" : 0 } ``` -------------------------------- ### Run tests with dotnet test Source: https://github.com/yellow-dog-man/resonitelink/blob/master/TESTING.md Run this command from the repository root to execute all tests. It produces a summary showing total, failed, succeeded, and skipped counts, along with build warnings and duration. ```bash dotnet test ``` -------------------------------- ### Slot Manipulation Messages Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/slots.md Documentation for the getSlot and addSlot WebSocket messages used to query and manipulate slots in the scene hierarchy. ```APIDOC ## getSlot ### Description Fetches information about the scene hierarchy for a specified slot. ### Message Type `getSlot` ### Parameters - **slotId** (string) - Required - ID of the slot to fetch. Root slot has special ID "Root". - **includeComponentData** (boolean) - Required - When true, response includes full component data; when false, only reference data (type & ID). - **depth** (integer) - Required - Depth of slot fetching. 0 fetches only the requested slot; -1 fetches as deep as possible. ### Request Example ```json { "$type" : "getSlot", "slotId" : "Root", "includeComponentData" : false, "depth" : 0 } ``` ### Response Returns slot data including slot IDs, names, and component references or full component data depending on `includeComponentData`. ``` ```APIDOC ## addSlot ### Description Adds a new slot to the scene hierarchy. Omitted parameters are set to defaults. ### Message Type `addSlot` ### Parameters - **data** (object) - Required - Definition of the new slot. - **data.id** (string) - Optional - ID of the new slot. If omitted, Resonite allocates one. - **data.parent.targetId** (string) - Optional - ID of the parent slot. Defaults to "Root". - **data.name.value** (string) - Optional - Name of the new slot. - **data.position.value** (object) - Optional - Position of the new slot as a float3 with x, y, z fields. ### Request Example ```json { "$type" : "addSlot", "data" : { "id" : "MySDK_0", "parent" : { "$type" : "reference", "targetId" : "Root" }, "name" : { "$type" : "string", "value" : "Hello from MySDK!" }, "position" : { "$type" : "float3", "value" : { "x" : 0, "y" : 1.5, "z" : 10 } } } } ``` ### Response Returns the result of the slot creation, including the new slot's ID and other details. ``` -------------------------------- ### Add a slot with addSlot message Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/slots.md Use this message to add a new slot. Omitted parameters are left to defaults. The data field uses the same slot definition as querying. Provide an id or omit it to let Resonite allocate one. Set parent.targetId to the parent slot ID; Root is the default. Name and position can be set, while rotation and scale default. ```JSON { "$type" : "addSlot", "data" : { "id" : "MySDK_0", "parent" : { "$type" : "reference", "targetId" : "Root" }, "name" : { "$type" : "string", "value" : "Hello from MySDK!" }, "position" : { "$type" : "float3", "value" : { "x" : 0, "y" : 1.5, "z" : 10 } } } } ``` -------------------------------- ### addComponent Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Attaches a new component to a specified slot. Requires the containerSlotId and component type. ```APIDOC ## addComponent ### Description Attaches a new component to a specified slot. Requires the containerSlotId and component type. ### Method WebSocket Message ### Endpoint Not applicable (WebSocket message) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **$type** (string) - Required - Must be "addComponent". - **containerSlotId** (string) - Required - The ID of the slot to attach the component to. - **data** (object) - Required - The component definition. - **data.id** (string) - Optional - A custom ID for the component for later reference. - **data.componentType** (string) - Required - The type of the component, using Resonite type syntax. - **data.members** (object) - Optional - Dictionary of member names to values. - **data.members.Scalable** (object) - Optional - Example member setting. - **data.members.Scalable.$type** (string) - Required - The type of the member value (e.g., "bool"). - **data.members.Scalable.value** (boolean) - Required - The value to set. ### Request Example { "$type": "addComponent", "containerSlotId": "MySDK_0", "data": { "id": "MySDK_1", "componentType": "[FrooxEngine]FrooxEngine.Grabbable", "members": { "Scalable": { "$type": "bool", "value": true } } } } ### Response #### Success Response (200) Not documented in source. #### Response Example Not documented in source. ``` -------------------------------- ### Attach a component with addComponent Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Attaches a Grabbable component to an existing slot. Requires containerSlotId and data.componentType; data.id is optional but recommended for later reference. Setting Scalable to true enables scaling; other members default. ```JSON { "$type" : "addComponent", "containerSlotId" : "MySDK_0", "data" : { "id" : "MySDK_1", "componentType" : "[FrooxEngine]FrooxEngine.Grabbable", "members" : { "Scalable" : { "$type" : "bool", "value" : true } } } } ``` -------------------------------- ### Update Slot Scale with updateSlot Message Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/slots.md Use this message to update an existing slot's properties. Only include the fields you want to change; omitted properties are left as-is. The `data.id` field is mandatory to identify which slot to update. ```JSON { "$type" : "updateSlot", "data" : { "id" : "MySDK_0", "scale" : { "$type" : "float3", "value" : { "x" : 2.5, "y" : 2.5, "z" : 2.5 } } } } ``` -------------------------------- ### removeSlot Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Removes a slot by its ID. ```APIDOC ## removeSlot ### Description Removes a slot by its ID. ### Method WebSocket Message ### Endpoint Not applicable (WebSocket message) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **$type** (string) - Required - Must be "removeSlot". - **slotId** (string) - Required - The ID of the slot to remove. ### Request Example { "$type": "removeSlot", "slotId": "MySDK_0" } ### Response #### Success Response (200) Not documented in source. #### Response Example Not documented in source. ``` -------------------------------- ### updateComponent Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Updates fields on an existing component. Requires the component ID and the member values to change. ```APIDOC ## updateComponent ### Description Updates fields on an existing component. Requires the component ID and the member values to change. ### Method WebSocket Message ### Endpoint Not applicable (WebSocket message) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **$type** (string) - Required - Must be "updateComponent". - **data** (object) - Required - The component update data. - **data.id** (string) - Required - The ID of the component to update. - **data.members** (object) - Required - Dictionary of member names to new values. - **data.members.Scalable** (object) - Required - Example member setting. - **data.members.Scalable.$type** (string) - Required - The type of the member value (e.g., "bool"). - **data.members.Scalable.value** (boolean) - Required - The new value. ### Request Example { "$type": "updateComponent", "data": { "id": "MySDK_1", "members": { "Scalable": { "$type": "bool", "value": false } } } } ### Response #### Success Response (200) Not documented in source. #### Response Example Not documented in source. ``` -------------------------------- ### Update component fields with updateComponent Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Updates fields on an existing component. The data.id is mandatory when updating. Changing componentType is not recommended and will fail if different. ```JSON { "$type" : "updateComponent", "data" : { "id" : "MySDK_1", "members" : { "Scalable" : { "$type" : "bool", "value" : false } } } } ``` -------------------------------- ### Remove a slot with removeSlot Source: https://github.com/yellow-dog-man/resonitelink/blob/master/docs/docs/websocket/components.md Removes a slot by its ID. The slotId field specifies which slot to remove. ```JSON { "$type" : "removeSlot", "slotId" : "MySDK_0" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.