3d-harbour-water

Installation
SKILL.md

3D Harbour Water

Start with the view that exposes the effect. Put one piling through the surface, a bright sign on the far quay and a boat between them. At water level the piling should meet its reflection, the sign should break into moving facets and the boat should leave a trail along the route it actually took.

Open the working demo · Water implementation · Boat and quay example · Prompt recipe

Put the water in the scene

Copy the water implementation into the project. It accepts the project's Three.js engine and the matching Reflector addon. The offline demo includes Three.js r180. The implementation assumes WebGL 2, conventional WebGL depth, an above-water perspective camera and a level XZ surface. Keep the water directly under the identity scene root. Size it to cover the navigable water and both camera views.

import * as THREE from 'three';
import { Reflector } from 'three/addons/objects/Reflector.js';
import './harbour-water.js';
Installs
464
Repository
mengto/skills
GitHub Stars
8.7K
First Seen
11 days ago