City Tram
A modern low-floor city tram on standard gauge: one 12 m double-ended car, or three or five articulated modules (29 m or 44 m) joined by bellows that bend on rigged joints (joint_1, joint_2 ...). Double sliding doors on both sides (door_<n>_a/b, slide z), a single-arm pantograph on the roof (pantograph and pantograph_arm, rotate x), and wheels on hidden bogies that roll with distance. Lift it by a rail-track tile railTop to sit on the rails. Headlights, tail lights, blank destination boards and the cabin glow at night.
- Size
- 3.0 × 5.8 × 29.3 m
- Triangles
- 2,388
Tune it
4 knobs: Livery, Modules, Pantograph, Doors.
Specs
- Size
- 3.0 × 5.8 × 29.3 m width × height × depth
- Triangles
- 2,388 of 6,000
- Draw calls
- 1 one vertex-colour material
- Loop clip
- 2.073 m of travel per cycle
- Moving parts
- 40 wheel_0 · spin, wheel_1 · spin, wheel_2 · spin, wheel_3 · spin, wheel_4 · spin, wheel_5 · spin, wheel_6 · spin, wheel_7 · spin, wheel_8 · spin, wheel_9 · spin, wheel_10 · spin, wheel_11 · spin, door_0_a · slide, door_0_b · slide, door_1_a · slide, door_1_b · slide, door_2_a · slide, door_2_b · slide, door_3_a · slide, door_3_b · slide, joint_1 · rotate, door_4_a · slide, door_4_b · slide, door_5_a · slide, door_5_b · slide, door_6_a · slide, door_6_b · slide, door_7_a · slide, door_7_b · slide, joint_2 · rotate, door_8_a · slide, door_8_b · slide, door_9_a · slide, door_9_b · slide, door_10_a · slide, door_10_b · slide, door_11_a · slide, door_11_b · slide, pantograph · rotate, pantograph_arm · rotate
- Knobs
- 4 3 presets
- Night lights
- 4 headlight, taillight, sign, cabin
Passed the validator: real scale, rests on y = 0, front faces +Z, deterministic.
Use it
Code for the specimen as it is set up above; it follows your knobs.
import { createAsset } from 'https://gaitkit.com/cdn/tram.mjs';
const tram = createAsset();
scene.add(tram); // rests on y = 0, front faces +Z
let dist = 0;
renderer.setAnimationLoop(() => {
dist += speed * clock.getDelta();
tram.position.z = dist;
tram.userData.tick(dist); // wheels roll exactly with the distance
renderer.render(scene, camera);
});import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import { createAsset } from 'https://gaitkit.com/cdn/tram.mjs';
export function Tram({ speed = 1 }) {
const model = useMemo(() => createAsset(), []);
const dist = useRef(0);
useFrame((_, dt) => {
dist.current += speed * dt;
model.position.z = dist.current;
model.userData.tick(dist.current); // wheels roll exactly with the distance
});
return <primitive object={model} />;
}# Import tram.glb (download below). It carries an in-place "Loop" animation.
@onready var anim: AnimationPlayer = $Tram/AnimationPlayer
func _physics_process(delta):
velocity = transform.basis.z * speed
move_and_slide()
anim.play("Loop")
anim.speed_scale = speed / 2.073 # one Loop = 2.073 m of travel// Import tram.glb with glTFast (com.unity.cloud.gltfast).
animator.Play("Loop");
animator.speed = speed / 2.073 // one Loop = 2.073 m of travelUse the gaitkit MCP server: get_variant({ "id": "tram", "want": "default look" })
then place the result and drive it with userData.tick(distance).
# MCP endpoint
https://gaitkit.com/mcpKnobs
| Knob | Type | Values | Default | What it does |
|---|---|---|---|---|
livery | choice | cream and red white and blue green yellow silver and orange | cream and red | Body and accent colours: cream and red, white and blue, green (white body, green skirt and nose), yellow (with a dark skirt), silver and orange. |
modules | choice | 1 3 5 | 3 | 1 (single 12 m double-ended car with two bogies), 3 (29 m articulated tram) or 5 (44 m, the longest city trams). Joints between modules are rotate rigs about y. |
pantograph | range | 0 to 1, step 0.05 | 1 | Roof pantograph: 0 folded flat on the roof, 1 raised to meet an overhead wire about 2 m above the roof. |
doors | range | 0 to 1, step 0.05 | 0 | How far every double door is slid open: 0 closed, 1 fully open (as at a stop). |
Presets: city line {"livery":"cream and red","modules":"3"} · at the stop {"livery":"white and blue","doors":1} · heritage single {"livery":"yellow","modules":"1","pantograph":1}
Files
| File | What |
|---|---|
| tram.glb | GLB, default look · 405 KB |
| tram.mjs | ES module, every knob live |
| tram.obj | OBJ, static, no colour |
| tram-params.json | knob schema, presets, night zones |
Licence
Use it in games, apps, renders and client work, commercially and without credit. Do not resell it as an asset or train a 3D generator on it. The full licence.