Field Notes
    Preparing search index...

    Interface FogSyncManager

    Host-provided fog state manager. The controller uses this to read the current fog definition/tiles, apply winning remote state, and listen for local edits that need to be broadcast.

    interface FogSyncManager {
        applyPatchDirect(
            patch: { tiles: readonly { data: string; x: number; y: number }[] },
            meta?: { origin?: string },
        ): void;
        getState(): FogStateV1 | null;
        loadState(state: FogStateV1 | null, meta?: { origin?: string }): void;
        on(
            event: "change",
            listener: (
                event: {
                    kind: string;
                    origin?: string;
                    tiles?: readonly { x: number; y: number }[];
                },
            ) => void,
        ): () => void;
    }
    Index
    • Parameters

      • patch: { tiles: readonly { data: string; x: number; y: number }[] }
      • Optionalmeta: { origin?: string }

      Returns void

    • Parameters

      • event: "change"
      • listener: (
            event: {
                kind: string;
                origin?: string;
                tiles?: readonly { x: number; y: number }[];
            },
        ) => void

      Returns () => void