JME - Application Documentation
    Preparing search index...
    • Top-level function that builds the full routing graph for the junction network and enumerates every possible route through it via depth-first search.

      Runs in four passes:

      1. Internal routing — edges between every in/out lane pair within each junction.
      2. Link edges — connects junctions through JunctionLink road segments.
      3. Start/end identification — finds spawn (unlinked in-lanes) and despawn (unlinked out-lanes) points.
      4. DFS enumeration — traces every valid path from spawn to despawn, building Route objects.

      Parameters

      • junction: JunctionConfig

        The junction configuration containing all objects and links.

      • junctionObjectRefs: Group<Object3DEventMap>[]

        Three.js group refs for each junction object.

      • Optionalopts: {
            disallowUTurn?: boolean;
            maxSteps?: number;
            smoothPerSegment?: boolean;
            spacing?: number;
            tension?: number;
        }

        Optional tuning parameters.

        • OptionaldisallowUTurn?: boolean
        • OptionalmaxSteps?: number
        • OptionalsmoothPerSegment?: boolean

          If false, uses raw polylines with no smoothing or resampling.

        • Optionalspacing?: number

          Fixed spacing in metres for per-segment resample.

        • Optionaltension?: number

          Catmull-Rom tension for per-segment smoothing (0 = loose, 1 = tight).

      Returns { ends: Set<string>; graph: Graph; routes: Route[]; starts: Node[] }

      All generated routes plus the raw graph, start nodes, and end node keys.