Rail Track
A standard-gauge railway tile on a 4 m grid: straight (1 to 4 cells), a 90 degree curve of 6 m radius filling 2 x 2 cells, a diamond crossing or a buffer stop, on a ground board so tiles butt edge to edge. userData.tile lists the grid cells, the track ends (position and direction) and the rail-top height for placing trains.
- Size
- 4.0 × 0.55 × 4.0 m
- Triangles
- 168
- Kit
- City Street
Tune it
4 knobs: Piece, Length, Ground, Sleepers.
Specs
- Size
- 4.0 × 0.55 × 4.0 m width × height × depth
- Triangles
- 168 of 6,000
- Draw calls
- 1 one vertex-colour material
- Knobs
- 4 3 presets
- Night lights
- 1 lamp
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/rail-track.mjs';
const railTrack = createAsset();
scene.add(railTrack); // rests on y = 0, front faces +Zimport { useMemo } from 'react';
import { createAsset } from 'https://gaitkit.com/cdn/rail-track.mjs';
export function RailTrack() {
const model = useMemo(() => createAsset(), []);
return <primitive object={model} />;
}# Import rail-track.glb (download below). It is a static mesh, one material per colour.
add_child(preload("res://rail-track.glb").instantiate())// Import rail-track.glb with glTFast (com.unity.cloud.gltfast).
// Drop it in the scene: 1 unit = 1 metre, +Z is its front.Use the gaitkit MCP server: get_variant({ "id": "rail-track", "want": "default look" })
then place the result.
# MCP endpoint
https://gaitkit.com/mcpKnobs
| Knob | Type | Values | Default | What it does |
|---|---|---|---|---|
piece | choice | straight curve crossing buffer | straight | straight: track along Z. curve: a quarter turn from the south edge to the east edge of a 2 x 2 cell board. crossing: two straights crossing at right angles. buffer: a straight that ends in a buffer stop at +Z. |
length | range | 1 to 4, step 1 | 1 | Straight and buffer pieces only: length in 4 m grid cells. |
ground | choice | grass gravel sand snow | grass | The board under the ballast: grass, gravel (yard), sand (desert line), snow. |
sleepers | choice | timber concrete | timber | Sleeper (tie) material: timber (brown, branch line) or concrete (grey, main line). |
Presets: curve {"piece":"curve"} · yard end {"piece":"buffer","ground":"gravel","sleepers":"concrete"} · snowy main line {"piece":"straight","length":3,"ground":"snow","sleepers":"concrete"}
Files
| File | What |
|---|---|
| rail-track.glb | GLB, default look · 29 KB |
| rail-track.mjs | ES module, every knob live |
| rail-track.obj | OBJ, static, no colour |
| rail-track-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.