Three small independent motions on one character: the head turns while the body stays still.
Three small independent motions on one character: the head turns while the body stays still.
No runs posted yet. Be the first: post yours and tag @wikiwayne.
SLEEPY OWL: Blink, Breathe, Turn
HOOK OBJECT: window.__owl
Build "SLEEPY OWL": one big, round, fluffy owl on a branch under the moon, drawn in pure SVG (no canvas, no libraries). It breathes slowly, blinks sleepily, and every few seconds turns its head to look the other way while its body stays still. It is one character and three tiny motions, and it should feel warm and alive.
LOOK
- Style: soft storybook vector art, rounded shapes, gentle gradients and no outlines. Night sky gradient #12183A (top) to #3A3A7A (horizon), a big pale moon #F4F0D8 (180 px across at 1280x720, scale with the screen) behind and to the upper right of the owl, 30 tiny stars, a dark branch #3B2A22 across the lower part of the screen with a few leaves #3F7A5A.
- The owl: body #8A6A4E with a lighter belly #D9BE98 covered in small scalloped feather marks #B79A74, wings folded at the sides #6E523C, two small feet #E0A64E gripping the branch, two ear tufts on top of the head. Head #9A7A5C with two large round eye discs #F4E8C8 (70 px across) with big dark pupils #1B1A22 (28 px) and a small white highlight, a small orange beak #F0A23C. Each eye has an eyelid in the head color that can slide down to cover the eye completely.
- The owl is about 62% of the screen height tall, centered slightly left of the moon. Parts are grouped so the head group can rotate around its neck point without moving the body group.
- FIRST FRAME (t = 0, no input): the owl facing forward with eyes wide open, filling at least 55% of the screen height, moon and stars visible, the title "SLEEPY OWL" small at the top-left, never over the owl.
MOTION / PLAY
- Breathing: the body group scales vertically between 1.00 and 1.03 (anchored at the feet) in a smooth sine, one full breath every 3.6 s, and the belly moves with it.
- Blinking: every 3–5 s (use the seed) both eyelids slide down until the eyes are at least 95% covered in 0.15 s, stay shut for 0.08 s, and slide open in 0.2 s.
- Head turn: every 7 s the head group rotates about the neck from forward to +35 degrees (looking to the owl's right side of the screen) over 1.2 s, holds for 2 s, then rotates through the middle to -35 degrees on the next turn, and so on (turns alternate right, left, right, left). The body never rotates (less than 0.5 degrees). The head turn eases in and out.
- Controls: moving the mouse or a finger makes the pupils drift toward the pointer by up to 6 px inside the eyes. Tapping or clicking the owl makes it blink once right away and turn its head toward the tap if the tap is far to the left or right of the owl. setView(zoom) zooms from 1x to 1.6x.
- All animation must be driven by one JavaScript time loop (not CSS animation alone), so advance(seconds) gives exactly the same result as real time.
- ATTRACT MODE: with no input, a hands-free demo starts on load and loops every 25–30 s, showing every main feature: breathing, about 6 blinks, 3 head turns, and, starting at 22 s, a sleepy slow-blink where the eyes stay shut for 2.5 s before waking up (this nap is not a normal blink). A fake pointer glides slowly across the screen so the pupils follow it. Any input takes over; the demo resumes after 8 s with no input.
SOUND
- A very soft slow breathing "whoosh" on each inhale.
- A tiny feather "ruffle" (a short burst of filtered noise) on each blink.
- A low, gentle two-note "hoo-hoo" at the start of each head turn.
- A faint "click" when the owl blinks at your tap.
COUNTERS
stats() returns { fps, blinks, breaths, headTurns, naps }.
- blinks: +1 exactly when both eyelids reach at least 95% closed in a normal blink (the sleepy slow-blink counts as a nap, not a blink).
- breaths: +1 exactly when a breath finishes (the body scale returns to 1.00 after reaching its peak of 1.03).
- headTurns: +1 exactly when a head turn finishes moving and the head holds still.
- naps: +1 exactly when the eyes have stayed shut for 2.5 s in the sleepy slow-blink and then start to open.
- On screen: the four counters in a small row at the bottom-left, readable in a paused frame and never over the owl.
CHECKS for ?test=1
With ?test=1, run an accelerated self-test that measures real positions and real events (not self-set flags) and logs "TEST n PASS" or "TEST n FAIL: reason" to the console and to window.__testResults:
Each check starts from a fresh load; advance() steps in 1/60 s increments.
1. The page has no canvas element, the owl has a body group, a head group, two eyes with eyelids, a beak and two feet, and at t = 0 the owl is at least 55% of the screen height with both eyes fully open.
2. Over advance(20), blinks is at least 3 and the gap between consecutive blinks is always between 3 and 5 s; each blink closes the lids to at least 95% in 0.12 to 0.2 s and reopens.
3. The body's vertical scale peaks at 1.03 (within 0.002) once per 3.6 s (within 0.1 s), and breaths equals the number of finished breaths (floor of the time over 3.6 s).
4. The head's rotation reaches +35 then -35 degrees (each within 1 degree) on alternate turns, the body never rotates more than 0.5 degrees, and headTurns goes up by exactly 1 per turn.
5. With the pointer at the far left of the screen, each pupil sits 3 to 6 px to the left of its eye center; a 28 s attract loop has at least 4 blinks, 7 breaths, 3 head turns, naps of 1, and zero console errors.
KEEP IT SHORT
- Keep the whole file under about 1,500 lines (soft target) so you can write it in one pass and finish well inside 15 minutes.
- Save lines with helpers, loops and instancing, not by dropping features. Everything above must really work: no placeholders, no TODOs.
BUILD RULES (all required):
- Deliver ONE self-contained HTML file: inline CSS and JS, no build step, no local assets. Libraries only from a CDN. If you use Three.js, use exactly this import map: {"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"}}
- It must open straight from disk in desktop Chrome and on an iPhone (Safari), fill the full screen, handle resize and touch, and stay smooth (target 60 fps).
- It must look stunning in the very FIRST frame: no black screen, no loading wait, no tiny subject. The main subject fills at least 50% of the screen height.
- SOUND (required): all sound is made in code with Web Audio (no audio files). Show a small "🔊 TAP FOR SOUND" chip; on the first tap create ONE AudioContext, route everything through a master gain of 0.6 into a DynamicsCompressor, and hide the chip. Also expose enableAudio() on the hook object named at the top.
- Expose the hook object named at the top with: setCameraOrbit(azimuthDeg, elevationDeg, distance) (or an equivalent camera setter), advance(seconds) that steps the simulation exactly that much for still captures, enableAudio(), and stats() returning {fps, ...the counters named above}. Use a fixed random seed of 360 so every run is the same.
- Every on-screen counter must count a real event you can see happen. No fake numbers.
- No text overlapping the subject; any label must be readable in a paused frame.
- No brand logos, no real people, no copyrighted characters, brand names or logos.
FAILURE MODES TO AVOID
- A blank page, or only the title on a blank page, because one script error stopped the scene.
- The whole owl rotating when only the head should turn, or the head popping off its body.
- Eyelids that fade instead of sliding, or blinks that never fully cover the eyes.
- Breathing that is too small to see or too big and wobbly, or that moves the feet off the branch.
- A scene so dark you cannot see the owl's face, or an owl that is tiny.
- Using a canvas, an image file or a library instead of plain SVG.
- Counters that tick on a timer instead of when a blink, breath, turn or nap actually happens.
- A label drawn over the owl.
- The same variable declared twice, or methods called on objects that don't exist yet.
SELF-TEST LOOP
- If you can run code: build the file, open it, read the console, run ?test=1, and take screenshots at 3 s, 10 s and 30 s at 1280x720 and 390x844. Look at the screenshots and fix what looks wrong. Fix and retest until all 5 checks pass with zero console errors. Mark anything you could not run as UNMEASURED; never invent results.
- If you are chat-only: go through this prompt line by line, check your code against each line, and fix anything that would fail. Then write one corrected, complete file.
- Final answer: ONE complete HTML file in ONE code block, then the 5 checks marked PASS, FAIL or UNMEASURED. No snippets, no "rest unchanged".
Built one? Post it on X and tag @wikiwaynePost on X