Skip to content

Let users choose slider (with min/max) for published number parameters #378

Description

@demagalhaescalvet

Use case

I'm using Fabric Editor live (VJ-style Rutt-Etra composition driven by a Syphon input). Most of the parameters I tweak during a performance are numbers: rotation, translation, resolution, point size. In the Published panel they all show up as text fields, so adjusting them means click → type → return. A slider would let me drag them in real time.

Today the control type is fixed by the node's code: Compose Orientation, Number Generator, Remap, Clamp, LFO, Math Expression, the Mesh Position, etc. all declare .inputfield. The only way I found to get real sliders is declaring them inside a Live Image shader (// slider, min, max, default, Label), which works great for image parameters but can't produce a number output.

Current behaviour (Beta 1)

  • Port.hydrate(from:) deliberately keeps control type and range as declared in code ("the document does not own it"), so even a hand-edited .fabric file with controlType: "slider" is ignored.
  • ParameterPort.hydrate clamps slider values to the declared range, so ranges also need to be user-editable for this to be useful.

Proposal

A per-port override, editable from the Published panel (e.g. right-click a published parameter → Show as slider with min/max fields), stored in the document as document-owned state:

  • Applies to Float, Int (and maybe Vector 2/3 as multi-sliders).
  • Persisted alongside published / publishedName in the port snapshot (controlType, min, max as optional overrides).
  • Code-declared defaults stay the fallback; connected inlets are unaffected.

This would also resolve #271 in a general way (that request is the same need for one node).

Environment

Fabric Editor Beta 1.0 (macOS 15, Apple Silicon)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions