API ReferenceGE Extensionsflowgraphnodesmath
Ease (Flowgraph Node)
- **Node Name:** `Ease`
Overview
- Node Name:
Ease - Category:
simple - File:
extensions/flowgraph/nodes/math/ease.lua
Applies a smoothing/easing function to a numeric input. Input is expected to be between 0 and 1 but doesn't have to be.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
value | number | Number between 0 and 1 as input to the ease function |
Output Pins
| Pin | Type | Description |
|---|---|---|
value | number | The result of the easing (between 0 and 1) |
Internals
| Field | Purpose |
|---|---|
self.easeFuncName | Name of the currently selected easing function |
self.easeFunc | The actual Lua function reference |
Available Easing Functions
linearinQuad,outQuad,inOutQuadinCubic,outCubic,inOutCubicinQuart,outQuart,inOutQuartinQuint,outQuint,inOutQuintinSin,outSin,inOutSininExp,outExp,inOutExpinCirc,outCirc,inOutCirc
How It Works
- On
init, the default function islinear. - The user selects an easing function via a combo dropdown in the node editor.
- Each frame, if input
valueis provided, it is passed through the selected easing function and the result is output. - The easing function name is serialized/deserialized so it persists across save/load.
Lua Example
-- Easing functions are pure math: t → eased t
-- inQuad: t*t
-- outQuad: t*(2-t)
-- inOutQuad: t < 0.5 ? 2*t*t : -1+(4-2*t)*t
-- In a flowgraph, connect a normalized timer (0→1) to the input
-- and use the eased output for camera interpolation, UI animations, etc.Key Dependencies
ui_imgui- for the easing function selector dropdown in the editor_flowgraph_createNode()- standard flowgraph node registration
Additional Methods
C:_onDeserialized(nodeData)
Called after the node is deserialized (loaded from file). Restores runtime state from saved data.
Parameters:
nodeData
C:_onSerialize(res)
Called when the node is serialized (saved to file). Returns data to persist.
Parameters:
res
C:drawCustomProperties()
Custom ImGui drawing for the node's properties panel in the editor.
C:drawMiddle(builder, style)
Custom ImGui drawing in the middle section of the node in the editor.
Parameters:
builderstyle
C:work()
Main work function called each frame/tick when the node is active.
See Also
- Accumulator (Flowgraph Node) - Related reference
- Increaser (Flowgraph Node) - Related reference
- Expression (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide