MotionBuilderExtensions
Add struct-state bindings and configure integer rounding, string scrambling, and punch or shake oscillation.
public static partial class MotionBuilderExtensionsStringMotion.cs · L50Members
- WithRichText
- WithScrambleChars
- WithRandomSeed
- WithFrequency
- WithDampingRatio
- WithShakeMode
- Bind
- WithRoundingMode
WithRichText
Choose whether string interpolation accounts for rich-text tags.
public static MotionBuilder<TValue, StringOptions, TAdapter> WithRichText<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, bool richTextEnabled = true)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>Parameters and return value
builderthis MotionBuilder<TValue, StringOptions, TAdapter>Configured builder, passed as the receiver for extension calls.richTextEnabled = trueboolWhether interpolation accounts for rich-text markup.- Returns
MotionBuilder<TValue, StringOptions, TAdapter>
WithScrambleChars
Set the character set or custom characters used to scramble unrevealed text.
public static MotionBuilder<TValue, StringOptions, TAdapter> WithScrambleChars<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, ScrambleMode scrambleMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>Parameters and return value
builderthis MotionBuilder<TValue, StringOptions, TAdapter>Configured builder, passed as the receiver for extension calls.scrambleModeScrambleModeCharacter set used to fill unrevealed text.- Returns
MotionBuilder<TValue, StringOptions, TAdapter>
public static MotionBuilder<TValue, StringOptions, TAdapter> WithScrambleChars<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, FixedString64Bytes customScrambleChars)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>Parameters and return value
builderthis MotionBuilder<TValue, StringOptions, TAdapter>Configured builder, passed as the receiver for extension calls.customScrambleCharsFixedString64BytesCharacter set used to fill unrevealed text.- Returns
MotionBuilder<TValue, StringOptions, TAdapter>
WithRandomSeed
Set the random seed for scrambling or shake.
public static MotionBuilder<TValue, StringOptions, TAdapter> WithRandomSeed<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, uint seed)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>Parameters and return value
builderthis MotionBuilder<TValue, StringOptions, TAdapter>Configured builder, passed as the receiver for extension calls.seeduintPseudorandom seed.- Returns
MotionBuilder<TValue, StringOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithRandomSeed<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, uint seed)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>Parameters and return value
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>Configured builder, passed as the receiver for extension calls.seeduintPseudorandom seed.- Returns
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithFrequency
Set the oscillation frequency for punch or shake.
public static MotionBuilder<TValue, PunchOptions, TAdapter> WithFrequency<TValue, TAdapter>( this MotionBuilder<TValue, PunchOptions, TAdapter> builder, int frequency)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, PunchOptions>Parameters and return value
builderthis MotionBuilder<TValue, PunchOptions, TAdapter>Configured builder, passed as the receiver for extension calls.frequencyintOscillation frequency setting.- Returns
MotionBuilder<TValue, PunchOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithFrequency<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, int frequency)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>Parameters and return value
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>Configured builder, passed as the receiver for extension calls.frequencyintOscillation frequency setting.- Returns
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithDampingRatio
Set how the punch or shake amplitude decays over time.
public static MotionBuilder<TValue, PunchOptions, TAdapter> WithDampingRatio<TValue, TAdapter>( this MotionBuilder<TValue, PunchOptions, TAdapter> builder, float dampingRatio)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, PunchOptions>Parameters and return value
builderthis MotionBuilder<TValue, PunchOptions, TAdapter>Configured builder, passed as the receiver for extension calls.dampingRatiofloatDamping applied to oscillation.- Returns
MotionBuilder<TValue, PunchOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithDampingRatio<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, float dampingRatio)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>Parameters and return value
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>Configured builder, passed as the receiver for extension calls.dampingRatiofloatDamping applied to oscillation.- Returns
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithShakeMode
Choose between random and Perlin shake.
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithShakeMode<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, ShakeMode shakeMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>Parameters and return value
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>Configured builder, passed as the receiver for extension calls.shakeModeShakeModeNoise mode used to evaluate the shake.- Returns
MotionBuilder<TValue, ShakeOptions, TAdapter>
Bind
Pass struct state to the setter, after the interpolated value.
public static MotionHandle Bind<TState>(this FloatMotionBuilder builder, TState state, Action<float, TState> action)
where TState : structParameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.stateTStateState passed to the setter after the interpolated value.actionAction<float, TState>Callback receiving the sampled value.- Returns
MotionHandle
public static MotionHandle Bind<TValue, TOptions, TAdapter, TState>( this MotionBuilder<TValue, TOptions, TAdapter> builder, TState state, Action<TValue, TState> action)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
where TState : structParameters and return value
builderthis MotionBuilder<TValue, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.stateTStateState passed to the setter after the interpolated value.actionAction<TValue, TState>Callback receiving the sampled value.- Returns
MotionHandle
WithRoundingMode
Choose how an interpolated int or long is rounded.
public static MotionBuilder<TValue, IntegerOptions, TAdapter> WithRoundingMode<TValue, TAdapter>( this MotionBuilder<TValue, IntegerOptions, TAdapter> builder, RoundingMode roundingMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, IntegerOptions>Parameters and return value
builderthis MotionBuilder<TValue, IntegerOptions, TAdapter>Configured builder, passed as the receiver for extension calls.roundingModeRoundingModeRounding rule for integer interpolation.- Returns
MotionBuilder<TValue, IntegerOptions, TAdapter>
MeatMotion