Steam Train
A standard-gauge steam locomotive, about 9 m long, with an optional coal tender. Drives by distance: the wheels roll, the side rods circle with the crank pins, the pistons slide in and out of the cylinders and smoke puffs rise from the chimney. Sits on rail-track tiles when lifted by their railTop height.
- Size
- 2.8 × 5.1 × 10.8 m
- Triangles
- 5,020
- Kit
- City Street
Tune it
4 knobs: Livery, Wheels, Tender, Smoke.
Specs
- Size
- 2.8 × 5.1 × 10.8 m width × height × depth
- Triangles
- 5,020 of 6,000
- Draw calls
- 1 one vertex-colour material
- Loop clip
- 4.398 m of travel per cycle
- Moving parts
- 19 wheel_0_R · spin, wheel_0_L · spin, wheel_1_R · spin, wheel_1_L · spin, wheel_2_R · spin, wheel_2_L · spin, trailing_R · spin, trailing_L · spin, tenderwheel_R · spin, tenderwheel_L · spin, crosshead_L · slide, conrod_L · rotate, coupling_L · slide, crosshead_R · slide, conrod_R · rotate, coupling_R · slide, smoke_0 · slide, smoke_1 · slide, smoke_2 · slide
- Knobs
- 4 3 presets
- Night lights
- 2 headlamp, fire
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/steam-train.mjs';
const steamTrain = createAsset();
scene.add(steamTrain); // rests on y = 0, front faces +Z
let dist = 0;
renderer.setAnimationLoop(() => {
dist += speed * clock.getDelta();
steamTrain.position.z = dist;
steamTrain.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/steam-train.mjs';
export function SteamTrain({ 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 steam-train.glb (download below). It carries an in-place "Loop" animation.
@onready var anim: AnimationPlayer = $SteamTrain/AnimationPlayer
func _physics_process(delta):
velocity = transform.basis.z * speed
move_and_slide()
anim.play("Loop")
anim.speed_scale = speed / 4.398 # one Loop = 4.398 m of travel// Import steam-train.glb with glTFast (com.unity.cloud.gltfast).
animator.Play("Loop");
animator.speed = speed / 4.398 // one Loop = 4.398 m of travelUse the gaitkit MCP server: get_variant({ "id": "steam-train", "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 | green black red blue | green | Paint scheme: green with brass trim, black with red lining, red with gold, blue with cream. |
wheels | choice | 0-4-0 0-6-0 2-6-0 | 0-6-0 | Wheel arrangement: 0-4-0 (small shunter, two driving axles), 0-6-0 (three coupled axles), 2-6-0 (a leading pony truck and three coupled axles, longer). |
tender | toggle | on / off | true | A coal and water tender coupled behind the cab. Off = a tank engine on its own. |
smoke | toggle | on / off | true | Smoke puffs that rise from the chimney and drift back as it drives. |
Presets: yard shunter {"wheels":"0-4-0","tender":false,"livery":"black"} · branch line {"wheels":"0-6-0","livery":"green"} · express {"wheels":"2-6-0","livery":"red"}
Files
| File | What |
|---|---|
| steam-train.glb | GLB, default look · 634 KB |
| steam-train.mjs | ES module, every knob live |
| steam-train.obj | OBJ, static, no colour |
| steam-train-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.