Web motion
Lightweight interactive particle background
Add subtle depth and pointer interaction to a background.
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 ambient particle background for {{service}} with a {{style}} visual style. Choose Canvas 2D for simple flat particles or reuse the existing Three.js stack when true depth is needed; explain the choice. Use slow coherent motion and a subtle attraction or repulsion response to a pointer, with a touch-safe behavior that does not block scrolling. Expose particle count, speed, interaction radius and {{palette}} colors. Keep the main content legible and all decorative rendering pointer-transparent. Adapt particle count and device pixel ratio to an explicit quality preset, with reasonable upper bounds.
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:
- Pointer effects do not consume touch scroll gestures or block links.
- No animation loop runs when the component is unmounted or the page is hidden.
- Reduced-motion mode uses a static background and no pointer-driven movement.
- Particle buffers are reused rather than allocated every frame.
- Provide a static fallback and report measured performance at the selected maximum particle count.Requested checks · not performed
- Pointer effects do not consume touch scroll gestures or block links.
- No animation loop runs when the component is unmounted or the page is hidden.
- Reduced-motion mode uses a static background and no pointer-driven movement.
- Particle buffers are reused rather than allocated every frame.
- Provide a static fallback and report measured performance at the selected maximum particle count.
Execution record
Download template record ↓Source & preservation
Kumyu Academy creative templates