← Back to templates

Water shaders

Animated ocean hero background

Animate the ocean surface while keeping landing-page content readable.

Your inputs

Requested output

A reusable component and configuration integrated into the existing repository, required styles or shaders, a runnable demo, a list of changed files, validation results and known limitations.

Original model policy · no model was executed

model-agnostic coding agent

Original usage notes

  • A prompt for a development agent implementing changes in an existing codebase; the requested output is code.

Prompt with your inputs

The default values are filled in. This prompt has not been executed.

Original reusable prompt
Implement a reusable Three.js ocean hero background for {{service}}. Build layered directional waves using an appropriate wave model such as Gerstner waves, with coherent displaced normals, restrained Fresnel highlights and {{palette}} colors. The mood is {{mood}}. Expose wave height, speed, direction, camera angle, sunlight and color as a small configuration object. Keep the {{quiet}} region visually quiet for existing HTML headlines and calls to action. Use a procedural sky or a local permitted environment asset, without depending on an external asset URL. Fit the component to its container and handle resizing. Prefer a convincing lightweight treatment over expensive physically exact simulation.

Implementation constraints:
First inspect the existing repository and installed versions. Reuse its routing, styling, build tools and dependency conventions. Use React Three Fiber only if the project already uses it or the integration is clearly justified; otherwise use the existing Three.js integration or a minimal isolated component. Do not assume version-specific APIs: check the installed package documentation and types. Do not change unrelated pages or silently replace the application architecture. Explain any required new dependency before adding it. Dispose GPU resources, remove event listeners and stop rendering when the component is not visible. Respect prefers-reduced-motion and provide a readable non-WebGL fallback. Keep links and controls in accessible HTML above the canvas. Return the changed files, configuration knobs, tests performed and known limitations.

Acceptance criteria:
- The existing headline and CTA remain legible and clickable on mobile and desktop.
- Wave motion loops continuously without sudden time resets, and normals follow the waves.
- Reduced-motion mode shows a still attractive frame.
- Measure performance on one stated desktop and one stated mobile profile; report FPS and quality settings rather than claiming an untested target.
- Unmounting and remounting do not duplicate canvases, animation loops or resize listeners.

Requested checks · not performed

  • The existing headline and CTA remain legible and clickable on mobile and desktop.
  • Wave motion loops continuously without sudden time resets, and normals follow the waves.
  • Reduced-motion mode shows a still attractive frame.
  • Measure performance on one stated desktop and one stated mobile profile; report FPS and quality settings rather than claiming an untested target.
  • Unmounting and remounting do not duplicate canvases, animation loops or resize listeners.

Execution record

Download template record ↓

Source & preservation

Kumyu Academy creative templates