JME - Application Documentation
    Preparing search index...
    • Runs one simulation tick of the spawning system. Called from VehicleManager.update() once per frame.

      Parameters

      • state: SpawnState

        the mutable spawn state

      • dt: number

        delta time since last frame (seconds)

      • junctionObjectRefs: RefObject<Group<Object3DEventMap>[]>

        ref to the array of registered junction groups

      • cfg: SimConfig

        current simulation configuration

      • vehicles: Vehicle[]

        live vehicle array (mutated on spawn)

      • carModels: Group<Object3DEventMap>[]

        loaded car model templates

      • scene: Scene

        the Three.js scene to spawn into

      • junction: JunctionConfig

        the junction layout configuration

      • roundaboutControllers: Map<string, RoundaboutController>

        map of active roundabout controllers

      • nextId: () => number

        callback that returns the next unique vehicle ID

      • getRoutePointsCached: (route: Route) => Tuple3[]

        cached route-point resolver

      • findGroupById: (
            groups: Group<Object3DEventMap>[],
            id: string,
        ) => Group<Object3DEventMap> | undefined

        helper to locate a group by its structure ID

      • getStructureData: (
            group: Group,
        ) => { id: string; maxDistanceToStopLine: number; type: string } | null

        extracts structure metadata from a group

      • getGroupId: (group: Group) => string | null

        extracts the structure ID from a group

      • updateVehicleSegment: (v: Vehicle) => void

        callback to refresh a vehicle's current segment

      Returns void