Cotton code
36 lines · 1.9 KB · SwiftRaw
// When a cold launch's splash comes down on the phone (295 B, walker294 on a// real-sized household: the splash's logo, then bare paper for up to a// second, then a faded Home with the logo fading over it, its fan in an// order of its own before the kept one). The splash — the logo on the paper// (`SplashOverlay`) — stands until Home is READ from the phone's own copy and// stands whole under it, then goes in one frame (`FanLaunch`, the phone's// side). Pure, so the rule is a test.import CottonKitenum FanLaunchRule {    /// The launch's first Home stands whole: its read has come back for the    /// shown database (answered, refused, or waiting on a copy still on its    /// way — `HomeModel.readShown`), the fan's settled card has drawn its    /// page, and every card in sight is printed. Until then the splash    /// stands; the read time is never seen as blank paper.    static func stands(read: Bool, settledDrawn: Bool, printsInSight: Bool) -> Bool {        read && settledDrawn && printsInSight    }    /// The fan is laid out from the read: the order the board draws is the    /// order the read holds. The read is observed by the fan a frame before    /// the order it brings arrives from the board's host, so a read come    /// back is not yet a fan laid out from it (the launch walk: read true    /// over a fan of Me and Tools, dealt again 0.2–2 s after the splash).    /// A read that brought no order (refused, nothing kept) lays out none.    static func laidOut(_ drawn: [String]?, from read: [String]?) -> Bool {        drawn == read    }    /// The longest the splash waits for Home once the window is up: the    /// boot's own ceiling (`AUTH_INIT_FALLBACK_MS`), never the fan's turn    /// (900 ms, which a real-sized Personal's read outlasts). A read wedged    /// for longer still shows Home, and Home says what it is waiting for.    static let ceiling: Duration = .milliseconds(AUTH_INIT_FALLBACK_MS)}