<prompt> <inputs> Ask me for: - One topic as a "what if" question (default: "What if the Sun vanished?") - The length (default: 30 seconds) - Whether I have an ElevenLabs API key. If not, use a free local voice. </inputs> <direction> A cinematic animated science explainer at 1920x1080, 30fps, drawn entirely in code: one 2D Canvas plus one WebGL Canvas for planets. Use original characters and artwork. Do not copy existing channels' characters, styles or proprietary assets. <space> Vertical gradient #081d2c to #102348. Five huge parallax nebula blobs: teal rgb(24,150,160) at 20%, blue rgb(40,95,195) at 16%, coral rgb(220,95,110) at 10%, indigo rgb(60,70,175) at 15%. Three star layers at parallax depths .12, .35, .6 that twinkle. Draw 40% of near stars as 4-point sparkles. </space> <sun> Radius 300px, half off the left edge. Radial gradient #fff7dc to #ffc857 to #ff8f4a, with an offset highlight. Additive halo rings at 1.23, 1.48, 1.76 and 2.1 times the radius. 18 faint rotating ray wedges. 28 drifting glowing granules on its surface. Never draw prominences on the Sun's edge: no white hooks, flares or loops attached to the edge. </sun> <earth> Orthographic sphere in a fragment shader, 4x supersampled, from a 2048x1024 map painted from longitude/latitude polygons. Land #5fc47a, forest #48ad6b, desert #f5c75f, rainforest #3a9d62, ice #f1f8ff, ocean gradient #4dc7eb to #1a66b8. White capsule clouds. Tilt .26 rad, spin .55°/s. Recompute the light direction from Sun to Earth every frame. Day/night: smoothstep(-.12, .24, N·L). Navy night side with ~380 warm city lights. Coral band on the terminator. Cyan rim, ocean specular, atmosphere halo stronger on the lit side. </earth> <astronaut> Small original mascot, ~180px tall, built from rounded rectangles. Suit #f3f7fb, orange #ff8f4a boots, visor gradient #1f5a73 to #0a1c2c. Glowing cyan eyes that look at whatever matters. Blinking antenna light. Idle bob. Squash and stretch on every pose. </astronaut> <typography> Fredoka 600/700 only. Uppercase captions, 3-6px letter spacing, in teal #8fd8e6, gold #ffd98a or white. Rounded pills, background rgb(6,20,40) at 62%. Every line rises 1.3 times its own height through a clip with ease-out-quint. Never fade a whole line in at once. </typography> <finish> Vignette rgba(4,4,20,.45). 6% film grain, re-randomised 24 times a second. No static infographic strips. No full stops in on-screen text. No AI-generated images or video. No copied characters. No music with vocals, no bird sounds. </finish> </direction> <structure> For the default 30-second topic, "What if the Sun vanished?": 0s Tight Sun shot at 2.25x. 1s On "vanished": the Sun swells 6% for 0.22s, collapses over 0.33s, white flash, shockwave ring. 1.6-3s Pull back to 1x: Earth still lit, the astronaut staring at the empty spot. 3.2s On "eight": an 8:20 countdown slams in from 1.7x to 1x and ticks. LAST LIGHT rides the edge of the growing dark disc. 5.6s Dive to 2.3x on Earth, light streaks flowing in. 7s On "you": a YOU pin drops. 7.5s On "left": a photon lands on the pin. THIS LIGHT LEFT THE SUN / 8 MIN 20 SEC AGO. 8.8s On "play": the pin morphs into a play button. YOU PRESSED PLAY / 15 SEC AGO. 9.6-12.5s Pull back from 2.4x to a 0.3x orbit view. LAST LIGHT and GRAVITY ride the ring. 13.4s On "nothing": a dotted circle at the empty centre. 15.8s On "hits": darkness sweeps Earth in 0.7s, city lights pop on, the countdown turns gold at 0:00. 17.4s On "black": the background fades almost to black. 17.9s Jupiter appears: STILL SHINING FOR 1 HOUR+. 20.8s Zoom out, dashed tangent line: 30 KM/S. Earth flies straight off. 22.8s A thermometer counts from 15 to -70°C while frost grows from the poles. Label it as an estimate over about a year. 24.3s A 0.8s rewind on a separate story clock. 25.2s Sunglasses drop onto the astronaut. 27.7s A photon tagged 8:20 OLD, then the title. For any other topic, keep the shape: the event on its spoken word; pull back to show scale; dive in to make it personal ("you"); pull back out; consequences on a live counter; escalate; a funny mascot beat; a callback to an earlier visual; the title. </structure> <build> <architecture> One HTML file. Every frame is a pure function of time: window.seek(t) draws frame t. No timers, no CSS animations. </architecture> <camera> Camera moves use easeInOutCubic. Zoom interpolates in log space. Every pop uses a damped spring, damping .42-.5, frequency 12-16. </camera> <voice> With an ElevenLabs key: eleven_v4; a calm, warm, curious male voice, late 30s, crisp, light neutral European English; stability .5, similarity .75; use the with-timestamps endpoint. It returns character timings: group them into words yourself. Without a key: kokoro-onnx locally, then faster-whisper with word_timestamps=True for word times. About 165 words per minute, 0.24s between sentences, a 0.36s beat before the major reveal. Every animation event fires on its spoken word. Never pad the voice to fit the visuals; tighten the read instead. </voice> <darkness> Pixels within the darkness front's radius from the Sun turn to night with a 30px soft edge. Start at ~47px/s, ramp to 700px/s near Earth, tuned to cross Earth in 0.7s. </darkness> <clocks> Two clocks: ambient time for twinkle, spin and bob; story time for narrative events. A rewind must not corrupt ambient motion. </clocks> <rendering> Playwright with Microsoft Edge (channel "msedge"), headless. Headless browsers disable the GPU by default: launch with GPU flags, then read the WebGL renderer string, and tell me if it is software (SwiftShader) rather than pretend it is accelerated. Seek every frame at 30fps. Blend two subframes with shutter 0.6 for motion blur. Encode with libx264: master CRF 16, delivery CRF 20. Show a contact sheet of every beat before the final render. </rendering> <sound> A calm, royalty-free space music bed 7dB under the voice, its natural ending timed to the final title, swelling to 5dB under the voice there. One royalty-free effect per event type: collapse, impact, pull-back whoosh, countdown tick, dive, pin tap, photon land, play click, light hit, reveal, frost, rewind. Peak on its frame, 4-10dB under the voice. Master with gain and a limiter to -14 LUFS integrated, true peak -2.2dB. Verify every asset's licence before use. </sound> </build> <gotchas> Make the WebGL globe canvas at least 2 x radius x zoom x 1.18 pixels so close-ups do not clip. Never draw prominences on the Sun's edge; they read as white hooks. Never pad the voice to fit the visuals; tighten the read. Speed the darkness front up near Earth or it takes too long to cross. Keep ambient time separate from story time so a rewind stays consistent. ElevenLabs timestamps are per character; build word times from them. Check the WebGL renderer string in headless mode; software rendering is slow and may look different. Verify dependencies, fonts, GPU access, browser, audio and encoding tools first. Report anything unavailable instead of pretending it worked. </gotchas> <start> Ask me for the topic, the length and whether I have an ElevenLabs key. Write the narration with the beat each word triggers. Show me the narration and event timeline for approval. Build the HTML animation and the render pipeline. Show a contact sheet of every major beat. Wait for my approval, then render and give me the output files. </start></prompt>