displayEntryFor function
The display glyph entry for motion (motion brief §2.3).
Implementation
DisplayEntry displayEntryFor(MotionSpec motion) {
final spring = springFromToken(motion.entrySpring ?? motion.release);
return switch (motion.entry) {
EntryStyle.pop || EntryStyle.stamp => DisplayEntry(
kind: DisplayEntryKind.pop,
startScale: motion.entryScalePermille / 1000,
spring: spring,
),
EntryStyle.drop => DisplayEntry(
kind: DisplayEntryKind.drop,
startOffset: motion.entryOffsetCdp / 100,
spring: spring,
),
EntryStyle.rise => DisplayEntry(
kind: DisplayEntryKind.rise,
startOffset: motion.entryOffsetCdp / 100,
spring: spring,
),
EntryStyle.segments => const DisplayEntry(
kind: DisplayEntryKind.segments,
duration: LcdDisplayFace.segmentOn,
),
// Paper & ink: ink soaks in over effectsDefault (150 ms) from 104 %.
EntryStyle.bleed => const DisplayEntry(
kind: DisplayEntryKind.bleed,
startScale: 1.04,
duration: Duration(milliseconds: 150),
),
// Terminal / Cyberpunk: instant glyph plus a 60 ms bloom 115 % → 100 %.
EntryStyle.glyph => const DisplayEntry(
kind: DisplayEntryKind.glyph,
startScale: 1.15,
duration: Duration(milliseconds: 60),
),
_ => DisplayEntry.none,
};
}