Gaitkit Open the lab
Key and Lock Door, A colour-coded key pickup and its locked door: a big game key (0.8 m, pickup scale) that spins about y (part key), and a stone door frame 2 m wide, 3 m tall and 1 m deep holding a banded gate with a padlock in the same colour. The gate (part gate) is hinged on the left post and swings inward (-Z) to open. Show both, only the key, or only the door.
Prop · 2 moving parts

Key and Lock Door

A colour-coded key pickup and its locked door: a big game key (0.8 m, pickup scale) that spins about y (part key), and a stone door frame 2 m wide, 3 m tall and 1 m deep holding a banded gate with a padlock in the same colour. The gate (part gate) is hinged on the left post and swings inward (-Z) to open. Show both, only the key, or only the door.

Size
2.1 × 3.0 × 2.2 m
Triangles
752
Open in the lab Ready for any engine. The download carries the knobs you set here.

Tune it

4 knobs: Piece, Colour, Open, Frame.

Specs

Size
2.1 × 3.0 × 2.2 m
width × height × depth
Triangles
752
of 6,000
Draw calls
1
one vertex-colour material
Loop clip
8 m
of travel per cycle
Moving parts
2
gate · rotate, key · spin
Knobs
4
3 presets
Night lights
1
glow

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.

JavaScript
import { createAsset } from 'https://gaitkit.com/cdn/key-and-lock.mjs';

const keyAndLock = createAsset();
scene.add(keyAndLock);                      // rests on y = 0, front faces +Z

// 'gate' pivots on its hinge: -100° to 0° around y
keyAndLock.getObjectByName('gate').rotation.y = THREE.MathUtils.degToRad(-100);

More in the docs; agents can fetch all of this through MCP.

Knobs

KnobTypeValuesDefaultWhat it does
piecechoiceboth key doorbothboth (the door with its key floating 1.6 m in front of it), key (the key pickup on its own), door (the locked door on its own, a 2 x 1 grid piece).
colorchoicegold silver red blue greengoldColour shared by the key and its lock, so players match them: gold, silver, red, blue or green.
openrange0 to 1, step 0.050How far the gate has swung open, inward away from the viewer. 0 locked shut, 1 fully open (100 degrees).
framechoicestone woodstonestone (castle blocks with a lintel) or wood (heavy timber posts and beam, for a mine or a forest hut).

Presets: red key door {"color":"red"} · blue key {"piece":"key","color":"blue"} · opened gate {"piece":"door","open":1,"color":"green","frame":"wood"}

Files

FileWhat
key-and-lock.glbGLB, default look · 104 KB
key-and-lock.mjsES module, every knob live
key-and-lock.objOBJ, static, no colour
key-and-lock-params.jsonknob 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.