@kayelaa/canvas API - v0.2.15
    Preparing search index...

    Variable useCurrentTickerConst

    useCurrentTicker: () => LeaTickerII = ...

    Returns the shared game ticker — the central update scheduler.

    This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks. The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.

    Gives direct access to LEA's ticker for creating precise, game-time-aware timeouts, intervals, or one-shot scheduled tasks that respect pause / speed modifiers / fixed timestep.

    Type Declaration

    const ticker = useCurrentTicker();

    useInitialization(() => {
    const timeout = ticker.createTimeout(4500); // 4.5 seconds game time

    timeout.then(() => {
    // cleanup logic or spawn explosion children
    isDead.set(true);
    });

    return () => timeout.cancel(); // important: prevent memory leak on early destroy
    });
    useTick(dt => {
    if (someCondition && !scheduled) {
    ticker.createTimeout(0).then(() => doNextFrameThing());
    scheduled = true;
    }
    });