← Back to LLM prompts

Superb Sunrise Animation Generator

Create stunning, customizable sunrise animations using modern web technologies with realistic color gradients, atmospheric effects, and smooth transitions.

coding a general-purpose LLM WritingCreative
<role>You are a creative frontend developer and generative artist specializing in atmospheric visual effects and performant animations.</role>

<context>The user wants to generate a breathtaking sunrise animation ([animation_type]) that captures the majestic beauty of dawn. The animation should be suitable for [use_case] and run smoothly at 60fps on [target_platform]. They value visual fidelity, performance, and easy customization.</context>

<instructions>
  <task>Design and implement a complete, production-ready sunrise animation with the following components:</task>
  <steps>
    <step>Create a layered sky gradient system using [color_palette] that transitions through authentic dawn phases: pre-dawn twilight, civil dawn, nautical dawn, and sunrise</step>
    <step>Implement atmospheric scattering simulation (Rayleigh/Mie) for realistic light diffusion and volumetric light rays</step>
    <step>Add procedural cloud layers with parallax scrolling and dynamic opacity based on sun elevation</step>
    <step>Include optional elements: [optional_elements] with physics-based movement</step>
    <step>Build a unified controller with [control_interface] for real-time parameter adjustment</step>
    <step>Optimize for [performance_target] using requestAnimationFrame, GPU acceleration, and efficient shader compilation</step>
    <step>Provide TypeScript definitions and comprehensive JSDoc documentation</step>
  </steps>
  <constraints>
    <constraint>Zero external dependencies — vanilla JS/TS, CSS, and WebGL/Canvas API only</constraint>
    <constraint>Total bundle size under [size_limit] gzipped</constraint>
    <constraint>Respects prefers-reduced-motion accessibility setting</constraint>
    <constraint>Works offline with no network requests</constraint>
    <constraint>Exports as ES module, UMD, and standalone HTML file</constraint>
  </constraints>
</instructions>

<format>
  <output>Complete source code organized as:
  /src
    index.ts          # Main entry point
    sky-engine.ts     # Gradient & atmosphere calculations
    cloud-system.ts   # Procedural cloud generation
    light-rays.ts     # Volumetric lighting shader
    controller.ts     # Animation loop & parameter API
    types.ts          # TypeScript interfaces
    config.ts         # Default configuration schema
  /dist               # Built outputs (ESM, UMD, HTML)
  /demo               # Interactive showcase with GUI controls
  README.md           # Integration guide & API reference
  package.json        # Build scripts (vite/esbuild)
  </output>
  <code_style>Clean, functional, heavily commented with JSDoc. Use descriptive variable names. Follow Airbnb JS style guide.</code_style>
</format>

<tone>Inspiring, technically precise, encouraging experimentation while maintaining professional standards.</tone>

<placeholders>
  <placeholder name="animation_type">canvas 2D | WebGL shader | CSS animation | Three.js scene | p5.js sketch</placeholder>
  <placeholder name="use_case">hero background | screensaver | meditation app | data viz backdrop | game skybox | digital art installation</placeholder>
  <placeholder name="target_platform">modern browsers | mobile Safari/Chrome | embedded webview | Electron app | Raspberry Pi display</placeholder>
  <placeholder name="color_palette">photorealistic | stylized pastel | dramatic volcanic | alien world | monochrome | custom HEX array</placeholder>
  <placeholder name="optional_elements">silhouette landscape | birds flock | water reflection | lens flare | particle dust | star fade-out</placeholder>
  <placeholder name="control_interface">dat.GUI panel | React props | Vue composable | Svelte store | URL hash params | MIDI/OSC input</placeholder>
  <placeholder name="performance_target">60fps @ 4K | 30fps @ 1080p mobile | 120fps gaming monitor | <16ms frame time</placeholder>
  <placeholder name="size_limit">15KB | 25KB | 50KB</placeholder>
</placeholders>

Generate the complete implementation now. Begin with the core sky-engine.ts atmospheric scattering calculations.
Website Source
#text