Papaltine.ResoniteLink.Builder
0.1.1
dotnet add package Papaltine.ResoniteLink.Builder --version 0.1.1
NuGet\Install-Package Papaltine.ResoniteLink.Builder -Version 0.1.1
<PackageReference Include="Papaltine.ResoniteLink.Builder" Version="0.1.1" />
<PackageVersion Include="Papaltine.ResoniteLink.Builder" Version="0.1.1" />
<PackageReference Include="Papaltine.ResoniteLink.Builder" />
paket add Papaltine.ResoniteLink.Builder --version 0.1.1
#r "nuget: Papaltine.ResoniteLink.Builder, 0.1.1"
#:package Papaltine.ResoniteLink.Builder@0.1.1
#addin nuget:?package=Papaltine.ResoniteLink.Builder&version=0.1.1
#tool nuget:?package=Papaltine.ResoniteLink.Builder&version=0.1.1
ResoniteLink.Builder
A declarative EDSL for constructing ResoniteLink slot hierarchies. Define nested slots, components, and members as a tree, then flatten the result into DataModelOperation batches ready to send over the link.
Quick start
open ResoniteLink
open ResoniteLink.Builder
let tree =
Reso.slot (Name = "Greeting", IsActive = true)
[ Reso.comp (ComponentType = "[FrooxEngine]FrooxEngine.DynamicField<System.String>")
[ "Value", Reso.str "Hello, world!" ] ]
[ Reso.slot (Name = "Child") [] [] ]
tree
|> Reso.addSlotUnder Slot.ROOT_SLOT_ID
|> link.RunDataModelOperationBatch
API overview
Members
Create typed field values to attach to components:
Reso.bool true
Reso.str "hello"
Reso.int 42
Reso.long 100L
Reso.float 1.5f
Reso.double 3.14
Reso.float3 (1.0f, 2.0f, 3.0f)
Reso.floatQ (0.0f, 0.0f, 0.0f, 1.0f)
Reso.reference "some-target-id"
Components
Build components with Reso.comp. The member list is a separate argument so it can be placed outside the parentheses:
Reso.comp (ComponentType = "[FrooxEngine]FrooxEngine.DynamicField<System.Boolean>")
[ "Enabled", Reso.bool true
"Value", Reso.bool false ]
Slots
Build slots with Reso.slot. Components and children are the second and third arguments respectively:
Reso.slot (Name = "Parent", Tag = "myTag")
[] // components (empty here)
[ Reso.slot (Name = "ChildA") [] []
Reso.slot (Name = "ChildB") [] [] ]
All slot properties are optional: ID, Name, IsActive, IsPersistent, Tag, Position, Rotation, Scale, OrderOffset. IDs are auto-generated (GUID) during flattening for any slot that has children or components.
Generating children from sequences
Because the children and component arguments are plain sequences, comprehensions work naturally:
Reso.slot (Name = "Generated") []
[ for i in 1..5 -> Reso.slot (Name = $"Child{i}", OrderOffset = int64 i) [] [] ]
Flattening
Flatten a tree into a batch of DataModelOperations parented under a given slot ID:
// Single root node
let ops = Reso.addSlotUnder parentId node
// Multiple sibling nodes
let ops = Reso.addSlotsUnder parentId [ node1; node2; node3 ]
Operations are emitted in pre-order traversal.
Items to note
- Declarative: Describe what the data looks like; not how to build it
- Composable:
SlotNodetrees are ordinary values; combine or generate them with standard F# expressions.- Be careful if you plan on reusing SlotNodes, because the slots will have IDs (if not specified) set when operations are generated. This can cause duplicate ID issues if you add slots multiple times.
- .NET Standard 2.0: compatible with .NET and .NET Framework (Unity).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FSharp.Core (>= 10.0.103)
- YellowDogMan.ResoniteLink (>= 0.9.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.1 | 78 | 3/9/2026 |