motionSeedsFor function
Reads the motion seeds for name.
Implementation
MotionSeeds motionSeedsFor(String name,
{HiblobOptions options = const HiblobOptions()}) {
final seed = options.normalize ? normalizeSeed(name) : name;
return MotionSeeds(
bobPhase: stream(seed, 'motion.bob.phase') * 2 * math.pi,
bobPeriod: 2.4 + stream(seed, 'motion.bob.period') * 1.2,
breathePhase: stream(seed, 'motion.breathe.phase') * 2 * math.pi,
breathePeriod: 3.0 + stream(seed, 'motion.breathe.period') * 1.5,
blinkPeriod: 2.8 + stream(seed, 'motion.blink.period') * 2.7,
blinkOffset: stream(seed, 'motion.blink.offset') * 0.35,
glancePeriod: 1.8 + stream(seed, 'motion.glance.period') * 2.0,
glanceSeed: stream(seed, 'motion.glance.seed'),
seesawPhase: stream(seed, 'motion.seesaw.phase') * 2 * math.pi,
tremorPhase: stream(seed, 'motion.tremor.phase') * 2 * math.pi,
expression: options.expression,
);
}