Papaltine.FluxSDK.ResoniteLink 1.5.1-prerelease

This is a prerelease version of Papaltine.FluxSDK.ResoniteLink.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Papaltine.FluxSDK.ResoniteLink --version 1.5.1-prerelease
                    
NuGet\Install-Package Papaltine.FluxSDK.ResoniteLink -Version 1.5.1-prerelease
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Papaltine.FluxSDK.ResoniteLink" Version="1.5.1-prerelease" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Papaltine.FluxSDK.ResoniteLink" Version="1.5.1-prerelease" />
                    
Directory.Packages.props
<PackageReference Include="Papaltine.FluxSDK.ResoniteLink" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Papaltine.FluxSDK.ResoniteLink --version 1.5.1-prerelease
                    
#r "nuget: Papaltine.FluxSDK.ResoniteLink, 1.5.1-prerelease"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Papaltine.FluxSDK.ResoniteLink@1.5.1-prerelease
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Papaltine.FluxSDK.ResoniteLink&version=1.5.1-prerelease&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Papaltine.FluxSDK.ResoniteLink&version=1.5.1-prerelease&prerelease
                    
Install as a Cake Tool

This package provides ResoniteLink integration for the Flux SDK. It allows you to build ProtoGraph modules and deploy them directly to a running Resonite session, as well as perform general automation tasks within Resonite from F#.

In Brief

  • Connects to Resonite via WebSockets using the standard ResoniteLink protocol
  • A high-level DSL (step { ... }) for sequencing Resonite actions without manually passing the LinkInterface around
  • Compile ProtoGraph modules and deploy them to Resonite
  • Full F# iteractive REPL support for rapid development and testing using scripts (.fsx files)
    • Access to Nuget packages and .NET libraries in your scripts
    • Also usable from full dotnet projects (.fsproj) for more complex tooling and integration scenarios

Installation

Install via NuGet:

dotnet add package Papaltine.FluxSDK.ResoniteLink

Getting Started

Initialize Connection

open System.Threading
open FluxSDK.ResoniteLink

// Connect to local Resonite instance
let link = Link.initialize ("ws://localhost:6984", CancellationToken.None)

Define and Run Steps

A Step<'T> is an asynchronous operation that acts on the LinkInterface. You can combine them using the step { ... } builder.

open ResoniteLink

// Define a step to create a new empty slot
let createSlot : Step<unit> =
    step {
        // Create a slot under the root slot
        let! response =
            Reso.slot (ID = "MyNewSlot", Name = "Hello Resonite!") [] []
            |> Reso.addSlotUnder Slot.ROOT_SLOT_ID

        if response.Success then
            printfn "Slot created successfully!"
        else
            printfn $"Failed to create slot: {response.ErrorInfo}"
    }

// Execute the step
createSlot |> Link.runStep link

Building and Linking ProtoGraph Modules

open FluxSDK.Build.Pipeline
open FluxSDK.Types.Project

// Cache of compiled modules
let stores = Build.initializeStores "Path/To/FrooxDll"

let deployModule (projectManifest: ProjectManifest) (modulePath: string) =
    step {
        // Reset for fresh unique ID generation
        ElementID.setEpoch (DateTime.UtcNow.Ticks |> uint64) |> ignore
        
        let config = Build.defaultConfig projectManifest

        match Build.compileModule stores config modulePath with
        | Stage.Success(nodeData, logs) ->

            // You might query this from Resonite first using RPath or use a known ID
            let parentSlotId = "TargetSlotID"

            // The library handles converting the graph into a batch of create operations
            let! batchResult =
                Link.batchAddProtoGraphNodes (config, parentSlotId, dict [], dict [], nodeData)

            if batchResult.Success then
                 printfn $"Deployed {modulePath} to Resonite!"
            else
                 printfn $"Deployment failed: {batchResult.ErrorInfo}"

        | _ -> printfn "Build failed"
    }

// Execute the deployment step
deployModule myManifest "MyFlux/MyCalculator" |> Link.runStep link
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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