Log inGet started
World

Grand Prix Garage: Kart Racing Cups, Kart Select and AI Rivals Kit

Branchmain
Branchesmain
Commit0b09dd01ae

README.md

selectStage

The local 3D sets behind the kart select screen, built by grandPrixKit.KartSelect for its 3D styles. Each set is spawned on this peer only (not synced, temporary, never saved into the scene) at the position KartSelect's stageX/Y/Z names, far away from the track, and carries its own camera at a high priority, so it takes the viewport only while the stage exists and the player's camera wins again the moment it is destroyed.

Sets: garage (concrete workshop, steel turntable with an amber seam, tool chests, tyre stacks, fluorescent tubes), studio (violet cyclorama with magenta and cyan rim rings, for the roster grid), carousel (glossy white showroom with every kart on a turning ring), arcade (black void, magenta neon grid floor and a striped retro sun) and hangar (blue-black deck, landing pad ringed in cyan, holographic glass, BAY 07 door). The sets draw with the ks* materials in grandPrixKit.package/materials.

The kart is the real vehiclesKit showroom model (Vehicles.display(preset, look, paint)), rebuilt only when the pick changes.

API

  • kinds(): the set ids.
  • create(kind, origin): build a set at world origin with its camera; returns the stage table.
  • setPick(stage, { vehicle, look, paint }, catalog): show that pick (catalog is GP.catalog()).
  • update(stage, dt, { aspect, sx, sy, zoom }): spin the turntable or swing the carousel, and frame the camera so the kart lands at screen point (sx, sy) in -1..1, which is how the UI keeps the model in the gap between its panels on a desktop and above them on a phone.
  • camera(stage): the camera entity.
  • destroy(stage): remove everything it built.