Garbage Truck
A 9.5 m rear-loader garbage truck with a low-entry cab, a ribbed compactor body and a rear hopper. The tailgate lifts on its top hinge (tailgate) and the bin lifter tips a wheelie bin over the hopper sill (lifter); wheels roll with distance. Headlights, tail lights, amber beacons and the hopper work light glow at night. Plain panels, no logos.
- Size
- 3.2 × 3.6 × 10.7 m
- Triangles
- 1,676
Tune it
4 knobs: Paint, Tailgate, Bin lifter, Wheelie bin.
Specs
- Size
- 3.2 × 3.6 × 10.7 m width × height × depth
- Triangles
- 1,676 of 6,000
- Draw calls
- 1 one vertex-colour material
- Loop clip
- 3.142 m of travel per cycle
- Moving parts
- 8 wheel_0 · spin, wheel_1 · spin, wheel_2 · spin, wheel_3 · spin, wheel_4 · spin, wheel_5 · spin, tailgate · rotate, lifter · rotate
- Knobs
- 4 3 presets
- Night lights
- 4 headlight, taillight, beacon, worklight
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/garbage-truck.mjs';
const garbageTruck = createAsset();
scene.add(garbageTruck); // rests on y = 0, front faces +Z
let dist = 0;
renderer.setAnimationLoop(() => {
dist += speed * clock.getDelta();
garbageTruck.position.z = dist;
garbageTruck.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/garbage-truck.mjs';
export function GarbageTruck({ 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 garbage-truck.glb (download below). It carries an in-place "Loop" animation.
@onready var anim: AnimationPlayer = $GarbageTruck/AnimationPlayer
func _physics_process(delta):
velocity = transform.basis.z * speed
move_and_slide()
anim.play("Loop")
anim.speed_scale = speed / 3.142 # one Loop = 3.142 m of travel// Import garbage-truck.glb with glTFast (com.unity.cloud.gltfast).
animator.Play("Loop");
animator.speed = speed / 3.142 // one Loop = 3.142 m of travelUse the gaitkit MCP server: get_variant({ "id": "garbage-truck", "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 |
|---|---|---|---|---|
paint | choice | white green orange blue grey | white | Body colour: white (city fleet), green (recycling), orange (municipal), blue, grey. The cab keeps the same colour with a dark lower band. |
tailgate | range | 0 to 1, step 0.05 | 0 | How far the rear tailgate is lifted on its top hinge: 0 closed, 1 raised 55 degrees to empty the body. |
lifter | range | 0 to 1, step 0.05 | 0 | Bin lifter arm: 0 down with the bin on the ground behind the truck, 1 tipped 135 degrees over the hopper. |
bin | toggle | on / off | true | A green wheelie bin hooked on the lifter. Off leaves the lifter empty. |
Presets: on the round {"lifter":0.6} · recycling truck {"paint":"green"} · tipping at the depot {"paint":"orange","tailgate":1,"bin":false}
Files
| File | What |
|---|---|
| garbage-truck.glb | GLB, default look · 246 KB |
| garbage-truck.mjs | ES module, every knob live |
| garbage-truck.obj | OBJ, static, no colour |
| garbage-truck-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.