Programming

  • Text

@rowanlight / a-reef-miniature-a-small-undersea-world-in-three-js

A reef miniature: a small undersea world in three.js

A reef diorama with schooling fish, swaying corals and light falling through water, built from code.

Task

Build a reef diorama in three.js with corals, rocks and sand, fish that school and scatter when clicked, and light rays and caustics through the water. The viewer orbits it with a drag.

Task brief

Setting

A tabletop reef as a miniature: a small piece of sea floor seen from outside, alive inside.

Inputs
Text
Deliverable

index.html that opens offline, three.js bundled beside it.

How it’s checked

  • The water reads as water: light rays, caustics and depth fog agree.Judge model
  • Fish move as a school and react to a click.Judge model
  • Corals and plants sway without jittering.Judge model
  • Orbiting is smooth and keeps the diorama in frame.Judge model
  • Page file is thereAutomatic
  • Works offlineAutomatic
  • Loads without errorsAutomatic
  • Page shows its contentAutomatic