carForgeStudio.editorPanel
README.md
Car Forge Studio
An editor panel for designing Car Forge cars live, in edit mode or in play. Open it from the editor's Content menu (Car Forge Studio); it docks on the right.
What a person does in it:
- Pick a preset (22 of them: city hatchback, town taxi, Ward Patrol patrol car, …) and a seed, or press Reroll for a new seed.
- Change any setting. Every setting of the kit is listed under its group (Identity, Size, Shape, Details, Paint, Wheels, Drive) with its range: sliders with a typed value for numbers and whole numbers, dropdowns for choices, switches for on/off. The preview car in the viewport rebuilds as you go; rebuilds are debounced so a slider drag stays smooth. An edited value is marked with a dot and holds until the next reroll.
- Lock a setting with its padlock. Locked settings keep their value when you reroll; everything unlocked varies around them. Group headers count locked settings; Unlock all and Reset edits clear them.
- Read the car report: name, number plate, fingerprint, top speed, mass, size, drivetrain, seats, the preview's build time, the kit's check issues (errors and warnings by setting) and the car's short code.
- Save a named variant (name field + Save variant). It is written to
carForgeVariants/<name>.variant.jsonin the world source with every setting locked, so it comes back identical after a restart. The list below shows every saved variant with its preset, seed and fingerprint; Load brings one back and confirms its fingerprint matches the file; Delete removes it. - Spawn drivable puts a real drivable copy beside the preview (walk up and press E in play). In edit mode the copy is session-only and is never saved into the scene; Remove spawned takes them away.
- Preview here moves the preview in front of the editor camera; Turn rotates it 45°.
The preview is a showroom model (Cars.display) under a temporary CarForgeStudio Preview entity, so nothing the panel builds is saved into a scene. Closing the tab removes it. The layout wraps, so the panel also works in a narrow (phone-width) dock.
Built on carForge.api (describe, check, fingerprint, summary, encode, saveVariant, loadVariant, variants, display, spawn) and the edui editor-panel framework.