Tweeny 4.1.0
A Tweening library for modern C++
Loading...
Searching...
No Matches

◆ from()

template<typename FirstValue, typename... RemainingValues>
tweeny_builder< false, FirstValue, RemainingValues... > from ( FirstValue firstComponent,
RemainingValues... remainingComponents )

Creates a new tween builder starting from the specified value(s).

This is the entry point for creating all tweens. It deduces types automatically and supports single values, multiple values, and heterogeneous types.

Parameters
firstComponentInitial value for the first component
remainingComponentsInitial values for additional components (optional)
Returns
A builder in the initial state (must call to() next)
// Single value
auto t1 = tweeny::from(0).to(100).during(60U).build();
// Multiple homogeneous values
auto t2 = tweeny::from(0, 0).to(100, 100).during(60U).build();
// Heterogeneous types
auto t3 = tweeny::from(0, 0.0f, 0u).to(10, 5.0f, 100u).during(60U).build();
tweeny_builder< true, FirstValue, RemainingValues... > to(const FirstValue &firstComponent, const RemainingValues &... remainingComponents) &
Adds a target keyframe to the tween.
Definition tweeny.h:109
tweeny_builder & during(FrameCountsType... frame_counts)
Specifies per-component frame durations for the last keyframe segment.
Definition tweeny.h:245
tweeny_builder< false, FirstValue, RemainingValues... > from(FirstValue firstComponent, RemainingValues... remainingComponents)
Creates a new tween builder starting from the specified value(s).
Definition tweeny.h:347