ecspresso
    Preparing search index...

    Interface SpatialIndexPluginOptions<G>

    interface SpatialIndexPluginOptions<G extends string = "spatialIndex"> {
        cellSize?: number;
        phases?: readonly SpatialIndexPhase[];
        priority?: number;
        systemGroup?: G;
    }

    Type Parameters

    • G extends string = "spatialIndex"
    Index

    Properties

    cellSize?: number

    Cell size for the spatial hash grid (default: 64)

    phases?: readonly SpatialIndexPhase[]

    Phases to register rebuild systems in (default: ['fixedUpdate', 'postUpdate']).

    When both phases are registered, the postUpdate rebuild is automatically skipped on cycles where:

    1. The fixedUpdate rebuild already ran this cycle, AND
    2. No entity hierarchy exists.

    In flat-hierarchy scenes transform-propagation copies localTransform → worldTransform unchanged, so the postUpdate grid would duplicate the fixedUpdate one. The skip is automatic and re-engages once any parent relationship is set, or whenever fixedUpdate doesn't run that cycle (sub-fixed-DT frames).

    Edge case: if you write to worldTransform directly between phases without using transform-propagation or entity hierarchy, the auto-skip will leave your writes unindexed. Set phases: ['postUpdate'] explicitly to bypass the auto-skip.

    priority?: number

    Priority for rebuild systems (default: 2000, before collision)

    systemGroup?: G

    System group name (default: 'spatialIndex')