Tropical Fish
A small coral-reef fish, 10-25 cm long depending on species: clownfish, blue tang, angelfish, butterflyfish or yellow tang, alone or as a little school. Swims by distance: the tail sweeps, the body flexes and the side fins paddle; it cruises 0.5 m above the reef.
- Size
- 0.03 × 0.05 × 0.10 m
- Triangles
- 880
Tune it
4 knobs: Species, School, Formation, Size.
Specs
- Size
- 0.03 × 0.05 × 0.10 m width × height × depth
- Triangles
- 880 of 6,000
- Draw calls
- 1 one vertex-colour material
- Loop clip
- 0.07 m of travel per cycle
- Altitude
- 0.5 m below the surface
- Moving parts
- 6 body_0 · rotate, seg_0 · rotate, tail_0 · rotate, pectoral_0_L · rotate, pectoral_0_R · rotate, fish_0 · slide
- Knobs
- 4 3 presets
- Night lights
- 0 none
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/tropical-fish.mjs';
const tropicalFish = createAsset();
scene.add(tropicalFish); // rests on y = 0, front faces +Z
let dist = 0;
renderer.setAnimationLoop(() => {
dist += speed * clock.getDelta();
tropicalFish.position.set(0, groundY + tropicalFish.userData.altitude, dist);
tropicalFish.userData.tick(dist); // the body waves 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/tropical-fish.mjs';
export function TropicalFish({ speed = 1 }) {
const model = useMemo(() => createAsset(), []);
const dist = useRef(0);
useFrame((_, dt) => {
dist.current += speed * dt;
model.position.set(0, groundY + model.userData.altitude, dist.current);
model.userData.tick(dist.current); // the body waves with the distance
});
return <primitive object={model} />;
}# Import tropical-fish.glb (download below). It carries an in-place "Loop" animation.
@onready var anim: AnimationPlayer = $TropicalFish/AnimationPlayer
func _physics_process(delta):
velocity = transform.basis.z * speed
move_and_slide()
anim.play("Loop")
anim.speed_scale = speed / 0.07 # one Loop = 0.07 m of travel// Import tropical-fish.glb with glTFast (com.unity.cloud.gltfast).
animator.Play("Loop");
animator.speed = speed / 0.07 // one Loop = 0.07 m of travelUse the gaitkit MCP server: get_variant({ "id": "tropical-fish", "want": "default look" })
then place the result.
# MCP endpoint
https://gaitkit.com/mcpKnobs
| Knob | Type | Values | Default | What it does |
|---|---|---|---|---|
species | choice | clown tang angel butterfly yellowtang | clown | clown (orange with three white bands edged black, 10 cm), tang (royal blue with a black swirl and yellow tail, 25 cm), angel (tall silver angelfish with black bars and long sail fins), butterfly (yellow disc with a black eye band and a false eye spot), yellowtang (bright yellow oval). |
school | range | 1 to 6, step 1 | 1 | How many fish swim together as one model, in a loose formation that beats out of step. |
seed | range | 1 to 30, step 1 | 2 | Seed for where each fish of a school sits and its rhythm. |
size | range | 0.5 to 8, step 0.1 | 1 | Uniform scale on top of the species length. 1 is real size; 4 makes a 40 cm aquarium centrepiece; 8 is a fish you could ride. |
Presets: blue tang {"species":"tang"} · clownfish pair {"species":"clown","school":2,"seed":4} · angelfish school {"species":"angel","school":4,"seed":9}
Files
| File | What |
|---|---|
| tropical-fish.glb | GLB, default look · 110 KB |
| tropical-fish.mjs | ES module, every knob live |
| tropical-fish.obj | OBJ, static, no colour |
| tropical-fish-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.