Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

Video: "Kokon 0.11" (Update011), Kokon on other devices

Gabriele Lozupone69a872315858
diff --git a/marketing/README.md b/marketing/README.md
index b70a59b..3b66e4b 100644
--- a/marketing/README.md
+++ b/marketing/README.md
@@ -50,6 +50,25 @@ D:/AI/tts/.venv/Scripts/python audio/gen_voice.py build --from audio/voice/updat
npx remotion render Update010 out/kokon-0.10-update.mp4 # in video/, 1920×1080
```
+**"Kokon 0.11" video** (`Update011`, ~76 s): Kokon on other devices. The site's "Other devices"
+scene (`src/app/Devices011.tsx`: the computer with the GPU, a MacBook and an iPhone, frames from
+Devices.css, MIT, in `src/app/devices.css`), the three setup steps, the phone in use, safe by
+default, the server and Docker, the end card. The app on screen is the app itself: Settings →
+Other devices in the desktop window, and the browser UI in the phone layout (`loaders/phone-container.cjs`
+turns the 720 px media query into a container query; `src/mocks/platform.ts` switches desktop and
+browser per window). The QR codes in the camera shot and on the end card open the setup guide.
+Clock `src/app/timeline011.ts` (bars of the music, shots, voice cues), script `audio/voiceover-0.11.md`,
+music one ACE-Step take played whole at one level (`gen_music.py v011-steady`, steady deep house at
+118 BPM), new effects `make_sfx.py 011` (three variants each in `public/sfx/011`, the one played is
+picked in `sound.tsx`).
+
+```powershell
+D:/AI/tts/.venv/Scripts/python audio/gen_voice.py audition-011 --seeds 3 # voice/update-0.11/audition-<stamp>/
+D:/AI/tts/.venv/Scripts/python audio/gen_voice.py build-011 --from voice/update-0.11/audition-<stamp> --pick 1.0:17,...
+python audio/gen_music.py v011-steady # takes/v011-steady-<stamp>-N.wav (ACE-Step API running)
+npx remotion render Update011 out/kokon-0.11.mp4 # in video/, 1920×1080
+```
+
`src/app/timeline.ts` is the film's clock: scene lengths, the frame where each voice-over sentence
plays, the frames of the actions the voice names (Remove, Add, the montage cuts) and the music's
beat grid. Retime there and pictures, voice and music move together.
diff --git a/marketing/audio/gen_music.py b/marketing/audio/gen_music.py
index 8b31766..ebd91db 100644
--- a/marketing/audio/gen_music.py
+++ b/marketing/audio/gen_music.py
@@ -49,8 +49,50 @@ STYLES = {
118,
"A Minor",
),
+ # The "use cases" video (~88 s, with voice): one track whose sections follow the video, playful
+ # at the start, a quiet piano part in the middle (grandparents, privacy, kids), the groove back
+ # for the second half, a clean ending. The sections come from structure tags (STRUCTURE).
+ "usecases": (
+ "instrumental, no vocals, feel-good upbeat indie pop, warm electric piano, clean funky guitar, "
+ "bouncy bass, crisp claps and tight drums, playful and bright; a soft heartfelt solo piano "
+ "breakdown in the middle with the drums out; then the full groove returns; clean definite "
+ "ending, modern clean mix, sits under a voice-over",
+ 116,
+ "D Major",
+ ),
+}
+# Lyrics as a map of the sections (no words): ACE-Step plans energy and dynamics from the tags.
+STRUCTURE = {
+ "usecases": "\n\n".join([
+ "[Intro - upbeat, drums from the first bar]",
+ "[Verse - playful groove, full band]",
+ "[Breakdown - soft solo piano and warm pads, no drums, tender]",
+ "[Piano Interlude - gentle, emotional]",
+ "[Build - drums come back]",
+ "[Chorus - full playful groove, bright]",
+ "[Chorus - full playful groove, bright]",
+ "[Outro - clean definite ending]",
+ ]),
+}
+# The "Kokon 0.11" video (76 s, one track played whole under the voice, no cuts): the 0.10 prompt as
+# it was, and the same sound with the same energy from the first bar to the last.
+STYLES["v011"] = (STYLES["update"][0], 118, "A Minor")
+STYLES["v011-steady"] = (
+ "deep melodic house, instrumental, warm sub bass, crisp hi-hats, dreamy bright chords, soft plucks, "
+ "confident and playful, steady groove from the first bar to the end, same energy all the way, "
+ "no breakdown, no build-ups, clean definite ending, modern clean mix, sits under a voice-over",
+ 118,
+ "A Minor",
+)
+DURATIONS = {"update": 44, "usecases": 94, "v011": 80, "v011-steady": 80}
+# New versions of an existing take (ACE-Step "cover": same tempo, harmony and form, new notes and
+# sounds). name: (style whose prompt describes it, source take, cover strength: near 1 stays close).
+# The source is the launch film's house-4, which lives in the main clone's takes/ folder.
+LAUNCH_TAKES = Path("C:/AI/qwen-local-studio/marketing/audio/takes")
+COVERS = {
+ "house4-cover": ("house", LAUNCH_TAKES / "house-4.wav", 0.9),
+ "house4-cover-loose": ("house", LAUNCH_TAKES / "house-4.wav", 0.75),
}
-DURATIONS = {"update": 44}
def call(path: str, body: dict | None = None) -> dict:
@@ -62,11 +104,29 @@ def call(path: str, body: dict | None = None) -> dict:
return resp["data"]
+def call_with_file(path: str, fields: dict, field: str, file: Path) -> dict:
+ """A multipart request: the API takes source audio only as an upload, never as a local path."""
+ boundary = f"----kokon{int(time.time() * 1000)}"
+ parts = []
+ for k, v in fields.items():
+ v = json.dumps(v) if isinstance(v, bool) else str(v)
+ parts.append(f'--{boundary}\r\nContent-Disposition: form-data; name="{k}"\r\n\r\n{v}\r\n'.encode())
+ parts.append(f'--{boundary}\r\nContent-Disposition: form-data; name="{field}"; filename="{file.name}"\r\nContent-Type: audio/wav\r\n\r\n'.encode())
+ parts += [file.read_bytes(), f"\r\n--{boundary}--\r\n".encode()]
+ req = urllib.request.Request(API + path, data=b"".join(parts), headers={"Content-Type": f"multipart/form-data; boundary={boundary}"})
+ with urllib.request.urlopen(req, timeout=600) as r:
+ resp = json.load(r)
+ if resp.get("code") != 200:
+ raise RuntimeError(f"{path}: {resp.get('error')}")
+ return resp["data"]
+
+
def generate(style: str) -> None:
- prompt, bpm, key = STYLES[style]
- task = call("/release_task", {
+ base, src, strength = COVERS.get(style, (style, None, None))
+ prompt, bpm, key = STYLES[base]
+ body = {
"prompt": prompt,
- "lyrics": "[Instrumental]",
+ "lyrics": STRUCTURE.get(style, "[Instrumental]"),
"instrumental": True,
"thinking": True,
"bpm": bpm,
@@ -76,7 +136,13 @@ def generate(style: str) -> None:
"batch_size": TAKES,
"inference_steps": 8,
"audio_format": "wav",
- })
+ }
+ if src:
+ body.update(task_type="cover", audio_cover_strength=strength)
+ del body["audio_duration"] # the source's length
+ task = call_with_file("/release_task", body, "src_audio", src)
+ else:
+ task = call("/release_task", body)
task_id = task["task_id"]
stamp = time.strftime("%Y%m%d-%H%M%S")
t0 = time.time()
@@ -90,7 +156,7 @@ def generate(style: str) -> None:
results = json.loads(item["result"]) if isinstance(item["result"], str) else item["result"]
OUT.mkdir(exist_ok=True)
for n, res in enumerate(results, 1):
- dest = OUT / (f"{style}-{stamp}-{n}.wav" if style in DURATIONS else f"{style}-{n}.wav")
+ dest = OUT / (f"{style}-{stamp}-{n}.wav" if style in DURATIONS or style in COVERS else f"{style}-{n}.wav")
urllib.request.urlretrieve(API + res["file"], dest)
print(f"{dest.name} seed {res.get('seed_value', '?')} {res.get('metas', {})}")
print(f"{style}: {len(results)} takes in {time.time() - t0:.0f} s")
@@ -99,7 +165,7 @@ def generate(style: str) -> None:
if __name__ == "__main__":
# A style must be named: running every style would write over the launch takes.
if not sys.argv[1:]:
- raise SystemExit(f"usage: python gen_music.py STYLE [...] ({', '.join(STYLES)})")
+ raise SystemExit(f"usage: python gen_music.py STYLE [...] ({', '.join([*STYLES, *COVERS])})")
try:
urllib.request.urlopen(API, timeout=5).close()
except urllib.error.HTTPError:
diff --git a/marketing/audio/gen_voice.py b/marketing/audio/gen_voice.py
index 4839d22..abaf389 100644
--- a/marketing/audio/gen_voice.py
+++ b/marketing/audio/gen_voice.py
@@ -17,6 +17,11 @@ launch take is never touched:
-> voice/update-0.10/final-<stamp>/NN.wav, copied to
video/public/voice-0.10 with video/src/app/voice-0.10.json
+The "use cases" video (voiceover-usecases.md) works the same way, with a tone per line:
+
+ D:/AI/tts/.venv/Scripts/python gen_voice.py audition-usecases [--seeds 4]
+ D:/AI/tts/.venv/Scripts/python gen_voice.py build-usecases --from voice/usecases/audition-<stamp> --pick 1.0:11,...
+
redo/splice change single sentences of the approved take: `--keep NEW:OLD` reuses old sentence
OLD (cut from voice/final/raw by raw/spans.json) as new sentence NEW; the other sentences of the
line in voiceover.md get takes to audition, and `--pick NEW:SEED` chooses one each (the auditioned file itself). splice backs
@@ -53,7 +58,16 @@ TAKES = {
"expressive": ("base", 0.7, 0.3, 0.8),
"turbo": ("turbo", 0.0, 0.0, 0.8),
"calmer": ("base", 0.55, 0.2, 0.8),
+ # The "use cases" video's tones (voiceover-usecases.md, column Tone). "playful" is Chatterbox
+ # Turbo, which reads paralinguistic tags ([chuckle], [happy], [laugh]...); it has no voice of its
+ # own here, so it clones the launch voice from TURBO_REF.
+ "punchy": ("base", 0.75, 0.35, 0.8),
+ "playful": ("turbo", 0.0, 0.0, 0.8),
+ "tender": ("base", 0.3, 0.45, 0.65),
+ "intimate": ("base", 0.25, 0.5, 0.55),
}
+# A clean line of the launch take (12.8 s), the voice Turbo copies.
+TURBO_REF = HERE.parent / "video" / "public" / "voice" / "03.wav"
# The approved take (`gen_voice.py final`), picked by ear line by line. Each line is read one
# sentence at a time (seed + i for sentence i) with a pause in between, which slows the
@@ -76,9 +90,13 @@ MASTER = "aresample=48000,highpass=f=80,deesser=i=0.4,acompressor=threshold=-20d
LUFS = -16.0
-def script_lines(script: str = "voiceover.md") -> list[str]:
+def script_rows(script: str) -> list[list[str]]:
rows = [l for l in (HERE / script).read_text(encoding="utf-8").splitlines() if re.match(r"^\| \d+ \|", l)]
- return [r.split("|")[4].strip() for r in rows]
+ return [[c.strip() for c in r.split("|")] for r in rows]
+
+
+def script_lines(script: str = "voiceover.md") -> list[str]:
+ return [r[4] for r in script_rows(script)]
_models: dict = {}
@@ -98,6 +116,8 @@ def say(take: str, text: str, ref: Path | None, seed: int) -> np.ndarray:
kind, exag, cfg, temp = TAKES[take]
m = model(kind)
torch.manual_seed(seed)
+ if kind == "turbo" and ref is None:
+ ref = TURBO_REF
kw = dict(audio_prompt_path=str(ref) if ref else None, temperature=temp)
if kind == "base":
kw.update(exaggeration=exag, cfg_weight=cfg)
@@ -262,32 +282,66 @@ UPDATE_PAUSES = {3: 0.7}
UPDATE_SPLITS = {"3.0": [(0.93, 0.35)]}
-def audition(seeds: int, base: int) -> None:
- """`seeds` takes of every sentence of the update script, read one at a time, for picking by ear."""
- folder = UPDATE["dir"] / f"audition-{time.strftime('%Y%m%d-%H%M%S')}"
- folder.mkdir(parents=True)
- for n, line in enumerate(script_lines(UPDATE["script"]), 1):
- take = UPDATE_TAKES.get(n, "expressive")
+# The "use cases" video (voiceover-usecases.md): each line's tone is in the script's Tone column.
+USECASES = {"script": "voiceover-usecases.md", "dir": OUT / "usecases", "public": "voice-usecases", "json": "voice-usecases.json"}
+USECASES_TONES = {n: r[3] for n, r in enumerate(script_rows(USECASES["script"]), 1)}
+# The "Kokon 0.11" video (voiceover-0.11.md): the 0.10 voice, each sentence in both of its tones
+# (seeds k of the second tone are offset by 5, so every take keeps its own file name).
+V011 = {"script": "voiceover-0.11.md", "dir": OUT / "update-0.11", "public": "voice-0.11", "json": "voice-0.11.json"}
+V011_TONES = {n: ["calmer", "expressive"] for n in range(1, len(script_rows(V011["script"])) + 1)}
+PROJECTS = {"update": (UPDATE, UPDATE_TAKES), "usecases": (USECASES, USECASES_TONES), "011": (V011, V011_TONES)}
+# build-011: sentences cut into parts that the video places one by one ("LINE.SENTENCE": about
+# where, in seconds into the take; each cut moves to the quietest 10 ms within 0.15 s). "Scan the
+# code, / sign in once, / and add Kokon to your home screen." goes with three shots; "Pick a photo, /
+# describe the change." gets a pause at the comma (the takes read it in one breath).
+V011_CUTS = {"3.1": [0.95, 1.78], "4.0": [1.0]}
+
+
+def quiet_cuts(c: np.ndarray, near: list[float]) -> list[int]:
+ """Sample positions of the quietest 10 ms windows around each time in `near`."""
+ w, out = int(0.01 * SR), []
+ for t0 in near:
+ lo, hi = int((t0 - 0.15) * SR), int((t0 + 0.15) * SR)
+ best = min(range(lo, hi - w, w // 2), key=lambda i: float(np.abs(c[i:i + w]).mean()))
+ out.append(best + w // 2)
+ return out
+
+
+def audition(seeds: int, base: int, project: str = "update", lines: set[int] | None = None, into: Path | None = None) -> None:
+ """`seeds` takes of every sentence of a script, read one at a time, for picking by ear. `lines`:
+ only these lines; `into`: add the takes to an earlier audition folder (a changed line, or more
+ seeds of one: pass another --seed so the names don't collide)."""
+ proj, takes = PROJECTS[project]
+ folder = into or proj["dir"] / f"audition-{time.strftime('%Y%m%d-%H%M%S')}"
+ folder.mkdir(parents=True, exist_ok=into is not None)
+ for n, line in enumerate(script_lines(proj["script"]), 1):
+ if lines and n not in lines:
+ continue
+ tones = takes.get(n, "expressive")
+ tones = [tones] if isinstance(tones, str) else tones
for i, text in enumerate(sentences(line)):
- for k in range(seeds):
+ for k, take in ((k + 5 * j, t) for j, t in enumerate(tones) for k in range(seeds)):
seed = base + 10 * i + k
a = say(take, text, None, seed)
raw = folder / f"{n:02d}-s{i}-seed{seed}.raw.wav"
sf.write(raw, a, SR)
master(raw, folder / f"{n:02d}-s{i}-seed{seed}.wav")
- print(f"{n:02d} s{i} seed {seed} {a.size / SR:4.1f} s {text}", flush=True)
+ print(f"{n:02d} s{i} seed {seed} {take} {a.size / SR:4.1f} s {text}", flush=True)
print(f"takes in {folder}")
-def build(src: Path, pick: dict[str, int]) -> None:
+def build(src: Path, pick: dict[str, int], project: str = "update") -> None:
"""The update's lines from the picked sentence takes (`pick` "LINE.SENTENCE" -> seed), 0.4 s
between sentences (UPDATE_PAUSES, UPDATE_SPLITS), mastered like the launch take (-16 LUFS over all lines). Each build goes to
a new folder; the video gets the files and their sentence spans."""
- lines = script_lines(UPDATE["script"])
+ proj = PROJECTS[project][0]
+ pauses = UPDATE_PAUSES if project == "update" else {}
+ splits = UPDATE_SPLITS if project == "update" else {}
+ lines = script_lines(proj["script"])
missing = [f"{n}.{i}" for n, l in enumerate(lines, 1) for i in range(len(sentences(l))) if f"{n}.{i}" not in pick]
if missing:
raise SystemExit(f"no take picked for {', '.join(missing)}")
- folder = UPDATE["dir"] / f"final-{time.strftime('%Y%m%d-%H%M%S')}"
+ folder = proj["dir"] / f"final-{time.strftime('%Y%m%d-%H%M%S')}"
(folder / "raw").mkdir(parents=True)
spans: dict[int, dict] = {}
files = []
@@ -297,13 +351,18 @@ def build(src: Path, pick: dict[str, int]) -> None:
for i in range(len(parts)):
c, sr = sf.read(src / f"{n:02d}-s{i}-seed{pick[f'{n}.{i}']}.raw.wav", dtype="float32")
assert sr == SR
- for t, gap in sorted(UPDATE_SPLITS.get(f"{n}.{i}", []), reverse=True):
+ for t, gap in sorted(splits.get(f"{n}.{i}", []), reverse=True):
c = np.concatenate([c[:int(t * SR)], np.zeros(int(gap * SR), dtype=np.float32), c[int(t * SR):]])
- chunks.append(c)
- marks.append([round(pos / SR, 3), round((pos + c.size) / SR, 3)])
- pos += c.size
+ cuts = quiet_cuts(c, V011_CUTS.get(f"{n}.{i}", [])) if project == "011" else []
+ for a, b in zip([0, *cuts], [*cuts, c.size]):
+ if a:
+ chunks.append(np.zeros(int(SENTENCE_PAUSE * SR), dtype=np.float32))
+ pos += chunks[-1].size
+ chunks.append(c[a:b])
+ marks.append([round(pos / SR, 3), round((pos + b - a) / SR, 3)])
+ pos += b - a
if i < len(parts) - 1:
- chunks.append(np.zeros(int(UPDATE_PAUSES.get(n, SENTENCE_PAUSE) * SR), dtype=np.float32))
+ chunks.append(np.zeros(int(pauses.get(n, SENTENCE_PAUSE) * SR), dtype=np.float32))
pos += chunks[-1].size
spans[n] = {"dur": round(pos / SR, 3), "sentences": marks}
raw = folder / "raw" / f"{n:02d}.wav"
@@ -320,12 +379,12 @@ def build(src: Path, pick: dict[str, int]) -> None:
master(f, tmp, gain)
tmp.replace(f)
(folder / "picks.json").write_text(json.dumps({"from": str(src), "pick": pick}, indent=1) + "\n", encoding="utf-8")
- dst = VIDEO / "public" / UPDATE["public"]
+ dst = VIDEO / "public" / proj["public"]
dst.mkdir(parents=True, exist_ok=True)
for f in files:
shutil.copy(f, dst / f.name)
- (VIDEO / "src" / "app" / UPDATE["json"]).write_text(json.dumps(spans, indent=1) + "\n", encoding="utf-8")
- print(f"{folder}: all.wav {preview.size / 48000:.1f} s at {lufs(folder / 'all.wav'):.1f} LUFS; copied to video/public/{UPDATE['public']}, spans in video/src/app/{UPDATE['json']}")
+ (VIDEO / "src" / "app" / proj["json"]).write_text(json.dumps(spans, indent=1) + "\n", encoding="utf-8")
+ print(f"{folder}: all.wav {preview.size / 48000:.1f} s at {lufs(folder / 'all.wav'):.1f} LUFS; copied to video/public/{proj['public']}, spans in video/src/app/{proj['json']}")
if __name__ == "__main__":
@@ -338,11 +397,15 @@ if __name__ == "__main__":
ap.add_argument("--seeds", type=int, default=6, help="redo: takes per new sentence")
ap.add_argument("--take", help="redo: model settings (default: the line's approved take in FINAL)")
ap.add_argument("--from", dest="src", type=Path)
+ ap.add_argument("--lines", help="audition: only these lines, e.g. 4,6")
+ ap.add_argument("--into", type=Path, help="audition: add to this audition folder")
a = ap.parse_args()
- if a.takes[:1] == ["audition"]:
- raise SystemExit(audition(a.seeds, a.seed))
- if a.takes[:1] == ["build"]:
- raise SystemExit(build(a.src, {k: int(v) for k, v in (p.split(":") for p in a.pick.split(","))}))
+ for proj in PROJECTS:
+ suffix = "" if proj == "update" else f"-{proj}"
+ if a.takes[:1] == [f"audition{suffix}"]:
+ raise SystemExit(audition(a.seeds, a.seed, proj, {int(x) for x in a.lines.split(",")} if a.lines else None, a.into))
+ if a.takes[:1] == [f"build{suffix}"]:
+ raise SystemExit(build(a.src, {k: int(v) for k, v in (p.split(":") for p in a.pick.split(","))}, proj))
if a.takes[:1] == ["redo"]:
n = int(a.takes[1])
raise SystemExit(redo(n, pairs(a.keep), a.seeds, a.take or FINAL[n][0], a.seed))
diff --git a/marketing/audio/make_sfx.py b/marketing/audio/make_sfx.py
index c759110..cc5a9d0 100644
--- a/marketing/audio/make_sfx.py
+++ b/marketing/audio/make_sfx.py
@@ -186,7 +186,113 @@ def riser(sec: float = 1.6) -> np.ndarray:
return x * np.linspace(0.2, 1, x.size) ** 1.5
+def pop() -> np.ndarray:
+ """A soft, round pop: a caption landing. A short pitch drop on a sine, a breath of air."""
+ x = t(0.18)
+ f = 330 + 520 * np.exp(-x / 0.018)
+ body = np.sin(2 * np.pi * np.cumsum(f) / SR) * env(x.size, 0.001, 0.04)
+ air = band(noise(0.18), 1500, 5000) * env(x.size, 0.0005, 0.008) * 0.25
+ return fade(body + air, 0.0005, 0.04)
+
+
+def swipe() -> np.ndarray:
+ """A short, light whoosh panned left to right: a before/after wipe."""
+ x = swish(0.42, 700, 2500, 2500, 8000)
+ pan = np.linspace(0.1, 0.9, x.size)
+ st = room(x, 0.15)[: x.size]
+ return np.stack([st[:, 0] * np.cos(pan * np.pi / 2) * 1.3, st[:, 1] * np.sin(pan * np.pi / 2) * 1.3], axis=1)
+
+
+def deep() -> np.ndarray:
+ """A low, soft hit with a long dark tail, under the privacy line."""
+ x = t(3.2)
+ f = 41 + 30 * np.exp(-x / 0.08)
+ sub = np.sin(2 * np.pi * np.cumsum(f) / SR) * env(x.size, 0.008, 1.1)
+ body = low(noise(3.2), 600) * env(x.size, 0.004, 0.25) * 0.3
+ return fade(sub + body, 0.002, 0.6)
+
+
+# The "use cases" video's effects; write only these with: python make_sfx.py pop swipe deep
+EXTRA = {"pop": (pop, -8), "swipe": (swipe, -8), "deep": (deep, -4)}
+
+
+# The "Kokon 0.11" video's effects, three variants each to pick by ear (video/public/sfx/011/
+# NAME-K.wav, `python make_sfx.py 011`); sound.tsx plays the picked one.
+def lock(k: int) -> np.ndarray:
+ """A padlock shutting: a short metal click on a low knock (variant 2: two parts, ka-chunk)."""
+ def clack(pitch: float, gain: float) -> np.ndarray:
+ n = int(0.16 * SR)
+ metal = band(rng.standard_normal(n), 2200 * pitch, 7000 * pitch) * env(n, 0.0003, 0.012)
+ ring = tone(2900 * pitch, 0.16, 0.0005, 0.03, ((1, 1.0), (1.47, 0.6)))[:n] * 0.25
+ knock = np.sin(2 * np.pi * 130 * pitch * t(0.16)) * env(n, 0.001, 0.025) * 0.8
+ return (metal + ring + knock) * gain
+ if k == 2:
+ a, b = clack(1.1, 0.6), clack(0.85, 1.0)
+ x = np.zeros(int(0.32 * SR))
+ x[: a.size] += a
+ i = int(0.085 * SR)
+ x[i:i + b.size] += b
+ return fade(x, 0.0005, 0.05)
+ return fade(clack([1.0, 0.8][k], 1.0), 0.0005, 0.05)
+
+
+def spinup(k: int, sec: float = 1.8) -> np.ndarray:
+ """The computer's fans speeding up: air rising in pitch and level, a hum under it."""
+ x = t(sec)
+ r = (x / sec) ** [1.2, 0.8, 1.0][k]
+ lo, hi = [(300, 1400), (180, 900), (400, 2200)][k]
+ air = noise(sec)
+ # The band moves up with the speed: two passes, crossfaded.
+ a = band(air, lo, lo * 3) * (1 - r) + band(air, hi / 3, hi) * r
+ hum = np.sin(2 * np.pi * np.cumsum(55 + 110 * r) / SR) * 0.25
+ flutter = 1 + (0.35 * np.sin(2 * np.pi * np.cumsum(6 + 40 * r) / SR) if k == 2 else 0)
+ return fade((a * flutter + hum) * (0.15 + 0.85 * r), 0.05, 0.25)
+
+
+def power(k: int) -> np.ndarray:
+ """The computer switched on: a soft button, then a warm swell."""
+ x = t(1.4)
+ btn = np.zeros(x.size)
+ c = click()
+ btn[: c.size] += c * 0.8
+ f0 = [65.4, 82.4, 98.0][k]
+ swell = tone(f0, 1.4, 0.35, 0.5, ((1, 1.0), (2, 0.5), (3, 0.25), (4, 0.12))) * 0.7
+ sweep = band(noise(1.4), 400, 2400) * env(x.size, 0.3, 0.25) * [0.0, 0.25, 0.12][k]
+ return fade(btn + swell + sweep, 0.0005, 0.3)
+
+
+def swipe011(k: int) -> np.ndarray:
+ """A request going from the phone to the computer: a short whoosh panned left to right."""
+ sec, lo0, hi0, lo1, hi1 = [(0.42, 700, 2500, 2500, 8000), (0.6, 400, 1600, 1600, 6000), (0.36, 900, 3000, 3000, 9000)][k]
+ x = swish(sec, lo0, hi0, lo1, hi1)
+ if k == 2:
+ x = x + tone(2093, sec, 0.15, 0.12) * 0.15
+ pan = np.linspace(0.1, 0.9, x.size)
+ st = room(x, 0.15)[: x.size]
+ return np.stack([st[:, 0] * np.cos(pan * np.pi / 2) * 1.3, st[:, 1] * np.sin(pan * np.pi / 2) * 1.3], axis=1)
+
+
+V011 = {"lock": (lock, -6), "spinup": (spinup, -10), "power": (power, -6), "travel": (swipe011, -8)}
+
+
+def save011() -> None:
+ global OUT
+ out, OUT = OUT, OUT / "011"
+ for name, (make, peak) in V011.items():
+ for k in range(3):
+ save(f"{name}-{k + 1}", make(k), peak)
+ OUT = out
+
if __name__ == "__main__":
+ import sys
+
+ if sys.argv[1:] == ["011"]:
+ raise SystemExit(save011())
+ if sys.argv[1:]:
+ for name in sys.argv[1:]:
+ make, peak = EXTRA[name]
+ save(name, make(), peak)
+ raise SystemExit
save("click", click(), -6)
save("typing", typing(), -6)
save("send", send(), -6)
diff --git a/marketing/audio/voiceover-0.11.md b/marketing/audio/voiceover-0.11.md
new file mode 100644
index 0000000..3bf786a
--- /dev/null
+++ b/marketing/audio/voiceover-0.11.md
@@ -0,0 +1,24 @@
+# Voiceover script: "Kokon 0.11" video (2026-10-23)
+
+About 70 s, for Reddit (it autoplays muted, so the on-screen text carries every message on its
+own), then YouTube. Same voice as the 0.10 video (Chatterbox base, built-in voice, one sentence
+at a time). "0.11" is spelled out for the voice. Honest claims only: the other devices use the
+computer's GPU over the home network (plain HTTP, so a network you trust); off until a password
+is set; 5 wrong tries make that device wait; from outside, Tailscale or another VPN, never port
+forwarding; Docker image for NVIDIA only; requirements 12 GB GPU or Apple Silicon.
+
+| # | Shot | Window | Line |
+|---|---|---|---|
+| 1 | Hook: iPhone, the flamingo photo | 0:00–0:04 | Kokon now works on your phone. |
+| 2 | The idea: PC, MacBook, iPhone, Home Wi-Fi | 0:04–0:14 | Your computer with the graphics card makes the images. Your phone, tablet or laptop just opens Kokon in a browser. No cloud, no account. |
+| 3 | Setup in 3 steps | 0:14–0:32 | Open Settings, Other devices, and choose a password. Scan the code, sign in once, and add Kokon to your home screen. |
+| 4 | Using it from the phone | 0:32–0:44 | Pick a photo, describe the change. Your PC does the work and sends it back. |
+| 5 | Safe by default | 0:44–0:52 | It stays off until you set a password. Away from home, use Tailscale or another VPN, never an open port. |
+| 6 | Server and Docker | 0:52–1:04 | Have a home server? Run Kokon on Linux, or in Docker with an Nvidia card. One file, one command. |
+| 7 | Close | 1:04–1:12 | Kokon zero point eleven. Your GPU, on every screen. |
+
+Takes: `gen_voice.py audition-011` (every sentence in two tones, calmer and expressive, three
+seeds each, in voice/update-0.11/audition-<stamp>, with pick.html to choose by ear), then
+`gen_voice.py build-011 --from <that folder> --pick LINE.SENTENCE:SEED,...`, which writes
+voice/update-0.11/final-<stamp>/ and copies the lines to video/public/voice-0.11 with their
+sentence spans in video/src/app/voice-0.11.json.
diff --git a/marketing/audio/voiceover-usecases.md b/marketing/audio/voiceover-usecases.md
new file mode 100644
index 0000000..7398c83
--- /dev/null
+++ b/marketing/audio/voiceover-usecases.md
@@ -0,0 +1,40 @@
+# Voiceover script: "use cases" video (2026-10-23)
+
+About 85 s, English, for the site and YouTube. The voice tells the story; the on-screen captions stay
+as they are. Honest claims only (no "keeps your face", no "best", "free for personal use", "no daily
+limit" means usage limits); every image on screen is an example made with Kokon.
+
+One narrator, the launch voice, in a different tone per section (`Tone`, the settings are in
+gen_voice.py `USECASES_TONES`):
+- **punchy** (the opening): base model, more exaggeration, firm and quick.
+- **playful** (fun beats): Chatterbox Turbo, cloned from the launch voice, with its paralinguistic tags
+ (`[chuckle]`, `[happy]`...) where a smile helps.
+- **tender** (grandparents, family, kids): base model, low exaggeration, slower and softer.
+- **intimate** (the privacy line, alone on dark): base model, the lowest exaggeration, slowest.
+- **warm** (the close): base model, the launch take's settings.
+
+Order: beat 10 (kids) comes right after beat 5 (privacy), so the serious part is one block (3, 4, 5,
+10, 6) and the music has one quiet section in the middle.
+
+| # | Beat | Tone | Line |
+|---|---|---|---|
+| 1 | Why Kokon? (opening) | punchy | Why Kokon? Private: your photos never leave your computer. Unlimited: no subscription, no daily limit. |
+| 2 | 01 tourists | playful | Photobombers in your holiday photo? [chuckle] Gone. |
+| 3 | 02 blink | playful | Someone always blinks. Add the other shot, and it's fixed. |
+| 4 | 03 restore | tender | Your grandparents' wedding photo, creased and scratched. Restore it… |
+| 5 | 03 colour | tender | and bring it back in colour. |
+| 6 | privacy, text on dark | intimate | Your family's memories are yours. They never leave your computer. |
+| 7 | 05 child | tender | The same goes for photos of your kids. They don't belong on someone else's server. |
+| 8 | 04 grandma | tender | Someone missing from the photo? Bring them in. |
+| 9 | 17 flamingo | playful | [happy] And when it's time to have fun: your holiday, upgraded. |
+| 10 | 13 hair | playful | Try a new haircut before the hairdresser. |
+| 11 | 14 jacket | playful | Try on a jacket before you buy it. |
+| 12 | montage 10, 11, 12 | playful | Redo your home before you spend a cent. |
+| 13 | 16 CV | playful | Turn a kitchen selfie into a headshot. |
+| 14 | 15 invite | playful | It even writes the text. |
+| 15 | end card | warm | Kokon. Edit photos by describing the change. On your own computer, free for personal use. Get it at kokon dot app. |
+
+Takes: `gen_voice.py audition-usecases` (every sentence, a few seeds each, in voice/usecases/audition-<stamp>),
+then `gen_voice.py build-usecases --from <that folder> --pick LINE.SENTENCE:SEED,...`, which writes
+voice/usecases/final-<stamp>/ and copies the lines to video/public/voice-usecases with their sentence spans in
+video/src/app/voice-usecases.json. The launch and 0.10 takes are never touched.
diff --git a/marketing/video/loaders/phone-container.cjs b/marketing/video/loaders/phone-container.cjs
new file mode 100644
index 0000000..aecd1d5
--- /dev/null
+++ b/marketing/video/loaders/phone-container.cjs
@@ -0,0 +1,11 @@
+// Two things the device shots need from the app's styles.css, the rules themselves unchanged:
+// - the phone layout (`@media (max-width: 720px)`) as a container query, so a window rendered
+// phone-sized inside the 1920-px video gets it (AppWindow `phone`), while desktop windows keep
+// the desktop layout;
+// - the light theme's tokens (the first `:root` block) also on `.kokon-light`, so a window can be
+// light while the video's document is dark (AppWindow `light`).
+module.exports = function (source) {
+ const root = source.match(/:root \{([\s\S]*?)\n\}/);
+ const light = root ? `\n.kokon-window.kokon-light {${root[1]}\n}\n` : "";
+ return source.replace(/@media \(max-width: 720px\)/g, "@container (max-width: 720px)") + light;
+};
diff --git a/marketing/video/public/img/beach-flamingo.jpg b/marketing/video/public/img/beach-flamingo.jpg
new file mode 100644
index 0000000..b7c4d89
Binary files /dev/null and b/marketing/video/public/img/beach-flamingo.jpg differ
diff --git a/marketing/video/public/img/beach.jpg b/marketing/video/public/img/beach.jpg
new file mode 100644
index 0000000..396fdc6
Binary files /dev/null and b/marketing/video/public/img/beach.jpg differ
diff --git a/marketing/video/public/img/kokon-icon.png b/marketing/video/public/img/kokon-icon.png
new file mode 100644
index 0000000..d4dc131
Binary files /dev/null and b/marketing/video/public/img/kokon-icon.png differ
diff --git a/marketing/video/public/img/remote-laptop.webp b/marketing/video/public/img/remote-laptop.webp
new file mode 100644
index 0000000..560c8b7
Binary files /dev/null and b/marketing/video/public/img/remote-laptop.webp differ
diff --git a/marketing/video/public/music-0.11-house4.m4a b/marketing/video/public/music-0.11-house4.m4a
new file mode 100644
index 0000000..b8ec77c
Binary files /dev/null and b/marketing/video/public/music-0.11-house4.m4a differ
diff --git a/marketing/video/public/sfx/011/lock-1.wav b/marketing/video/public/sfx/011/lock-1.wav
new file mode 100644
index 0000000..ff2b8d0
Binary files /dev/null and b/marketing/video/public/sfx/011/lock-1.wav differ
diff --git a/marketing/video/public/sfx/011/lock-2.wav b/marketing/video/public/sfx/011/lock-2.wav
new file mode 100644
index 0000000..eed5307
Binary files /dev/null and b/marketing/video/public/sfx/011/lock-2.wav differ
diff --git a/marketing/video/public/sfx/011/lock-3.wav b/marketing/video/public/sfx/011/lock-3.wav
new file mode 100644
index 0000000..b639d17
Binary files /dev/null and b/marketing/video/public/sfx/011/lock-3.wav differ
diff --git a/marketing/video/public/sfx/011/power-1.wav b/marketing/video/public/sfx/011/power-1.wav
new file mode 100644
index 0000000..f3422ef
Binary files /dev/null and b/marketing/video/public/sfx/011/power-1.wav differ
diff --git a/marketing/video/public/sfx/011/power-2.wav b/marketing/video/public/sfx/011/power-2.wav
new file mode 100644
index 0000000..2e05b0c
Binary files /dev/null and b/marketing/video/public/sfx/011/power-2.wav differ
diff --git a/marketing/video/public/sfx/011/power-3.wav b/marketing/video/public/sfx/011/power-3.wav
new file mode 100644
index 0000000..281654f
Binary files /dev/null and b/marketing/video/public/sfx/011/power-3.wav differ
diff --git a/marketing/video/public/sfx/011/spinup-1.wav b/marketing/video/public/sfx/011/spinup-1.wav
new file mode 100644
index 0000000..839a6bb
Binary files /dev/null and b/marketing/video/public/sfx/011/spinup-1.wav differ
diff --git a/marketing/video/public/sfx/011/spinup-2.wav b/marketing/video/public/sfx/011/spinup-2.wav
new file mode 100644
index 0000000..6d61963
Binary files /dev/null and b/marketing/video/public/sfx/011/spinup-2.wav differ
diff --git a/marketing/video/public/sfx/011/spinup-3.wav b/marketing/video/public/sfx/011/spinup-3.wav
new file mode 100644
index 0000000..04b5bec
Binary files /dev/null and b/marketing/video/public/sfx/011/spinup-3.wav differ
diff --git a/marketing/video/public/sfx/011/travel-1.wav b/marketing/video/public/sfx/011/travel-1.wav
new file mode 100644
index 0000000..d2813b8
Binary files /dev/null and b/marketing/video/public/sfx/011/travel-1.wav differ
diff --git a/marketing/video/public/sfx/011/travel-2.wav b/marketing/video/public/sfx/011/travel-2.wav
new file mode 100644
index 0000000..44b3966
Binary files /dev/null and b/marketing/video/public/sfx/011/travel-2.wav differ
diff --git a/marketing/video/public/sfx/011/travel-3.wav b/marketing/video/public/sfx/011/travel-3.wav
new file mode 100644
index 0000000..3427b08
Binary files /dev/null and b/marketing/video/public/sfx/011/travel-3.wav differ
diff --git a/marketing/video/public/sfx/pop.wav b/marketing/video/public/sfx/pop.wav
new file mode 100644
index 0000000..64239f9
Binary files /dev/null and b/marketing/video/public/sfx/pop.wav differ
diff --git a/marketing/video/public/sfx/swipe.wav b/marketing/video/public/sfx/swipe.wav
new file mode 100644
index 0000000..de42d03
Binary files /dev/null and b/marketing/video/public/sfx/swipe.wav differ
diff --git a/marketing/video/public/thumb/beach-flamingo.jpg b/marketing/video/public/thumb/beach-flamingo.jpg
new file mode 100644
index 0000000..becc276
Binary files /dev/null and b/marketing/video/public/thumb/beach-flamingo.jpg differ
diff --git a/marketing/video/public/thumb/beach.jpg b/marketing/video/public/thumb/beach.jpg
new file mode 100644
index 0000000..482b123
Binary files /dev/null and b/marketing/video/public/thumb/beach.jpg differ
diff --git a/marketing/video/public/voice-0.11/01.wav b/marketing/video/public/voice-0.11/01.wav
new file mode 100644
index 0000000..ca92df9
Binary files /dev/null and b/marketing/video/public/voice-0.11/01.wav differ
diff --git a/marketing/video/public/voice-0.11/02.wav b/marketing/video/public/voice-0.11/02.wav
new file mode 100644
index 0000000..fe6b1e3
Binary files /dev/null and b/marketing/video/public/voice-0.11/02.wav differ
diff --git a/marketing/video/public/voice-0.11/03.wav b/marketing/video/public/voice-0.11/03.wav
new file mode 100644
index 0000000..2b8243a
Binary files /dev/null and b/marketing/video/public/voice-0.11/03.wav differ
diff --git a/marketing/video/public/voice-0.11/04.wav b/marketing/video/public/voice-0.11/04.wav
new file mode 100644
index 0000000..7dd11ba
Binary files /dev/null and b/marketing/video/public/voice-0.11/04.wav differ
diff --git a/marketing/video/public/voice-0.11/05.wav b/marketing/video/public/voice-0.11/05.wav
new file mode 100644
index 0000000..4b932b5
Binary files /dev/null and b/marketing/video/public/voice-0.11/05.wav differ
diff --git a/marketing/video/public/voice-0.11/06.wav b/marketing/video/public/voice-0.11/06.wav
new file mode 100644
index 0000000..422f3a9
Binary files /dev/null and b/marketing/video/public/voice-0.11/06.wav differ
diff --git a/marketing/video/public/voice-0.11/07.wav b/marketing/video/public/voice-0.11/07.wav
new file mode 100644
index 0000000..c2b9d65
Binary files /dev/null and b/marketing/video/public/voice-0.11/07.wav differ
diff --git a/marketing/video/remotion.config.ts b/marketing/video/remotion.config.ts
index 3299b1e..437257c 100644
--- a/marketing/video/remotion.config.ts
+++ b/marketing/video/remotion.config.ts
@@ -30,6 +30,7 @@ Config.overrideWebpackConfig((c) => {
...(c.module?.rules ?? []).map((r) => (r && typeof r === "object" && r.type === "asset/resource" ? { ...r, resourceQuery: { not: [/raw/] } } : r)),
{ resourceQuery: /raw/, type: "asset/source" },
{ test: /\.tsx?$/, include: app, enforce: "pre" as const, use: path.resolve(root, "loaders/vite-glob.cjs") },
+ { test: /styles\.css$/, include: app, enforce: "pre" as const, use: path.resolve(root, "loaders/phone-container.cjs") },
],
},
resolve: {
@@ -54,6 +55,7 @@ Config.overrideWebpackConfig((c) => {
swap(/^(\.\.?\/)+(lib\/)?store$/, "store.ts"),
swap(/^(\.\.?\/)+(lib\/)?api$/, "api.ts"),
swap(/^(\.\.?\/)+(lib\/)?native$/, "native.ts"),
+ swap(/^(\.\.?\/)+(lib\/)?platform$/, "platform.ts"),
swap(/^\.\/Compare$/, "Compare.tsx"),
swap(/^\.\/Cocoon$/, "Cocoon.tsx"),
swap(/^\.\/jobMotion$/, "jobMotion.ts"),
diff --git a/marketing/video/src/Root.tsx b/marketing/video/src/Root.tsx
index a4874d4..1fbce8b 100644
--- a/marketing/video/src/Root.tsx
+++ b/marketing/video/src/Root.tsx
@@ -13,6 +13,8 @@ import { Update010, UPDATE_FRAMES } from "./scenes/Update010";
import { LENGTH } from "./app/timeline";
import { REELS, ReelScene, reelFrames } from "./scenes/Reels";
import { AppShot, PH_SLIDES } from "./scenes/ProductHunt";
+import { Probe011 } from "./scenes/Probe011";
+import { Update011, UPDATE011_FRAMES } from "./scenes/Update011";
import { VREELS, VReelScene, vreelFrames } from "./scenes/VReels";
const withPreload = (C: ComponentType) => () => (
@@ -27,6 +29,8 @@ export function Root() {
return (
<>
<Composition id="KokonLaunch" component={withPreload(Main)} durationInFrames={MAIN_FRAMES} {...S} />
+ <Composition id="Update011" component={withPreload(Update011)} durationInFrames={UPDATE011_FRAMES} {...S} />
+ <Composition id="Probe011" component={withPreload(Probe011)} durationInFrames={1} {...S} />
<Composition id="Update010" component={withPreload(Update010)} durationInFrames={UPDATE_FRAMES} {...S} />
<Composition id="Montage" component={withPreload(Montage)} durationInFrames={MONTAGE_FRAMES} {...S} />
<Composition id="Agent" component={withPreload(Agent)} durationInFrames={AGENT_FRAMES} {...S} />
diff --git a/marketing/video/src/app/AppWindow.tsx b/marketing/video/src/app/AppWindow.tsx
index 05ead9e..16b7c0b 100644
--- a/marketing/video/src/app/AppWindow.tsx
+++ b/marketing/video/src/app/AppWindow.tsx
@@ -13,6 +13,7 @@ import "../../../../src/styles.css";
import { CardMotionContext, type CardMotion } from "../mocks/card";
import { CompareSplitContext } from "../mocks/Compare";
import { setWordPace } from "../mocks/jobMotion";
+import { setPlatform } from "../mocks/platform";
import { FrameStateContext, setFrameState, type State } from "../mocks/store";
import { FPS } from "./timeline";
import "./theme.css";
@@ -22,10 +23,13 @@ if (typeof document !== "undefined") document.documentElement.dataset.theme = "d
/** `split` is the before/after slider position for this frame (0–1); `card` the clock of the
* job card in the stage (cocoon, Prompt+ text, hatching); `className` "silk" shows the thread
- * that runs round the composer while you write (app/theme.css). */
-export function AppWindow({ state, width, height, overlay, hideComposer, split = 0.5, card, className }: { state: State; width: number; height: number; overlay?: ReactNode; hideComposer?: boolean; split?: number; card?: CardMotion; className?: string }) {
+ * that runs round the composer while you write (app/theme.css). `phone`: Kokon in a phone's
+ * browser (the app's phone layout, loaders/phone-container.cjs); otherwise the desktop app.
+ * `light`: the app's light theme (the document stays dark). `waitFor`: what Settings must show before the frame is taken (default: the dialog itself). */
+export function AppWindow({ state, width, height, overlay, hideComposer, split = 0.5, card, className, phone = false, light = false, waitFor = ".modal" }: { state: State; width: number; height: number; overlay?: ReactNode; hideComposer?: boolean; split?: number; card?: CardMotion; className?: string; phone?: boolean; light?: boolean; waitFor?: string }) {
const f = useCurrentFrame();
setFrameState(state);
+ setPlatform(phone, phone);
setWordPace(card?.cps ?? 60);
// CSS loops (the status capsule's silk, shimmer, caret) run on the frame clock; entrances
// have long finished (app/theme.css).
@@ -34,7 +38,7 @@ export function AppWindow({ state, width, height, overlay, hideComposer, split =
<FrameStateContext.Provider value={state}>
<CompareSplitContext.Provider value={split}>
<CardMotionContext.Provider value={card ?? null}>
- <div className={className ? `kokon-window ${className}` : "kokon-window"} style={{ width, height, ...vt }}>
+ <div className={["kokon-window", className, light && "kokon-light"].filter(Boolean).join(" ")} style={{ width, height, ...vt, ...(phone ? { containerType: "inline-size" } : {}) }}>
<div className="app">
{state.sidebar && <Sidebar />}
<div className="workspace">
@@ -48,7 +52,7 @@ export function AppWindow({ state, width, height, overlay, hideComposer, split =
{state.overlay === "settings" && (
<>
<Settings />
- <WaitFor selector=".modal" />
+ <WaitFor selector={waitFor} />
</>
)}
</div>
diff --git a/marketing/video/src/app/Devices011.tsx b/marketing/video/src/app/Devices011.tsx
new file mode 100644
index 0000000..258747f
--- /dev/null
+++ b/marketing/video/src/app/Devices011.tsx
@@ -0,0 +1,281 @@
+// The devices of the "Kokon 0.11" video, from the kokon.app "Other devices" scene
+// (site/index.html#devices, site/assets/style.css): the computer with the graphics card, a MacBook
+// and an iPhone (frames from Devices.css, MIT, in devices.css), joined by dotted links. On the site
+// the fans and links run on CSS animations; here everything is a function of the frame, so the
+// render is the same in any order: fans turn by an angle the scene integrates (`fanAngle`), links
+// flow by the frame and draw in by a progress.
+import type { CSSProperties, ReactNode } from "react";
+import { Img, staticFile } from "remotion";
+import { MARK_PATHS } from "./Mark";
+import { FPS } from "./timeline";
+import "./devices.css";
+
+const font = '"Inter Variable", Inter, sans-serif';
+const WARM = "#ffd68c";
+
+/** Degrees a fan has turned by frame `f`, at `rps(frame)` turns a second. */
+export function fanAngle(f: number, rps: (frame: number) => number): number {
+ let a = 0;
+ for (let i = 0; i < f; i++) a += (rps(i) * 360) / FPS;
+ return a;
+}
+
+function Fan({ size, angle, style }: { size: number; angle: number; style?: CSSProperties }) {
+ return (
+ <span
+ style={{
+ display: "block",
+ width: size,
+ height: size,
+ flex: "none",
+ borderRadius: "50%",
+ background: "radial-gradient(circle, #2a2a2e 0 16%, transparent 17%), repeating-conic-gradient(from 0deg, #3a3a40 0 14deg, #1a1a1d 14deg 40deg)",
+ boxShadow: "inset 0 0 0 3px #232326, 0 0 0 4px #18181b",
+ transform: `rotate(${angle}deg)`,
+ ...style,
+ }}
+ />
+ );
+}
+
+/** The computer with the graphics card (220×430). `on` 0–1: the power light; `glow` 0–1: the
+ * GPU's warm light (the site's resting look is about 0.6); `angle`: the fans. */
+export function Pc({ angle, glow = 0.6, on = 1, style }: { angle: number; glow?: number; on?: number; style?: CSSProperties }) {
+ const g = glow;
+ return (
+ <div
+ style={{
+ position: "absolute",
+ width: 220,
+ height: 430,
+ borderRadius: 20,
+ background: "linear-gradient(160deg, #2a2a2e, #141416 60%)",
+ boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.13), inset 0 1px 0 rgba(255,255,255,0.18), 0 50px 90px rgba(0,0,0,0.7)",
+ ...style,
+ }}
+ >
+ <div
+ style={{
+ position: "absolute",
+ inset: "14px 14px 70px",
+ borderRadius: 12,
+ overflow: "hidden",
+ background: `radial-gradient(ellipse at 50% 62%, rgba(255,214,140,${0.37 * g}), transparent 60%), linear-gradient(135deg, #18181b, #0c0c0e)`,
+ boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.1)",
+ }}
+ >
+ <div style={{ position: "absolute", left: 14, right: 14, top: 14, height: 140, borderRadius: 8, background: "#141416", boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.06)" }}>
+ <Fan size={64} angle={angle * 0.8} style={{ position: "absolute", left: 30, top: 40 }} />
+ <div style={{ position: "absolute", right: 40, top: 22, width: 8, height: 96, borderRadius: 3, background: "linear-gradient(#2c2c30, #1f1f22)", boxShadow: "14px 0 0 #232326" }} />
+ </div>
+ <div
+ style={{
+ position: "absolute",
+ left: 10,
+ right: 10,
+ top: 190,
+ height: 76,
+ borderRadius: 9,
+ background: "linear-gradient(180deg, #26262a, #18181b)",
+ boxShadow: `inset 0 0 0 1px rgba(255,255,255,0.12), 0 0 ${50 + 40 * g}px rgba(255,214,140,${0.47 * g})`,
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ gap: 9,
+ }}
+ >
+ <Fan size={46} angle={angle} />
+ <Fan size={46} angle={angle * 1.14 + 20} />
+ <Fan size={46} angle={angle * 0.89 + 40} />
+ <div style={{ position: "absolute", left: 12, right: 12, bottom: -1, height: 3, borderRadius: 3, background: `linear-gradient(90deg, transparent, ${WARM}, transparent)`, boxShadow: `0 0 ${18 + 12 * g}px ${WARM}`, opacity: Math.min(1, g * 1.6) }} />
+ </div>
+ <div style={{ position: "absolute", inset: 0, background: "linear-gradient(115deg, rgba(255,255,255,0.09) 0 22%, transparent 22% 60%, rgba(255,255,255,0.04) 60% 64%, transparent 64%)" }} />
+ </div>
+ <div style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: 70, display: "flex", alignItems: "center", justifyContent: "space-between", padding: "0 22px" }}>
+ <svg width={22} height={22} viewBox="0 0 1024 1024" style={{ display: "block" }}>
+ {Object.values(MARK_PATHS).map((d, i) => (
+ <path key={i} d={d} fill="rgba(242,241,237,0.55)" />
+ ))}
+ </svg>
+ <i style={{ display: "block", width: 12, height: 12, borderRadius: "50%", background: on > 0 ? WARM : "#3a3a3a", opacity: 0.35 + 0.65 * on, boxShadow: `0 0 ${10 * on}px ${WARM}, 0 0 0 4px rgba(255,255,255,0.06)` }} />
+ </div>
+ </div>
+ );
+}
+
+/** The phone's status bar (9:41, signal, Wi-Fi, battery), black on light screens. */
+function StatusBar({ light }: { light: boolean }) {
+ const c = light ? "#fff" : "#000";
+ return (
+ <div style={{ position: "absolute", top: 0, left: 0, right: 0, height: 54, display: "flex", alignItems: "center", justifyContent: "space-between", padding: "6px 30px 0 46px", color: c, font: `600 17px/1 -apple-system, "SF Pro Text", ${font}`, letterSpacing: "-0.01em", zIndex: 5 }}>
+ <span>9:41</span>
+ <span style={{ display: "flex", gap: 6, alignItems: "center" }}>
+ <svg viewBox="0 0 18 12" height={13} fill={c}>
+ <rect x="0" y="8" width="3" height="4" rx="1" />
+ <rect x="5" y="5.5" width="3" height="6.5" rx="1" />
+ <rect x="10" y="3" width="3" height="9" rx="1" />
+ <rect x="15" y="0" width="3" height="12" rx="1" />
+ </svg>
+ <svg viewBox="0 0 16 12" height={13} fill={c}>
+ <path d="M8 2.6c2.3 0 4.4.9 6 2.4l1.3-1.4A10.4 10.4 0 0 0 8 .6 10.4 10.4 0 0 0 .7 3.6L2 5c1.6-1.5 3.7-2.4 6-2.4zm0 3.6c1.3 0 2.5.5 3.4 1.3l1.3-1.4A6.9 6.9 0 0 0 8 4.2c-1.8 0-3.5.7-4.7 1.9l1.3 1.4C5.5 6.7 6.7 6.2 8 6.2zm0 3.5c-.6 0-1.1.2-1.5.6L8 11.9l1.5-1.6c-.4-.4-.9-.6-1.5-.6z" />
+ </svg>
+ <svg viewBox="0 0 27 13" height={13}>
+ <rect x="0.5" y="0.5" width="23" height="12" rx="3.5" fill="none" stroke={c} opacity="0.4" />
+ <rect x="2" y="2" width="20" height="9" rx="2" fill={c} />
+ <path d="M25 4.5v4c.8-.3 1.3-1.1 1.3-2s-.5-1.7-1.3-2z" fill={c} opacity="0.45" />
+ </svg>
+ </span>
+ </div>
+ );
+}
+
+/** Where a phone's content goes: 390×776 under the status bar. */
+export const PHONE_SCREEN = { w: 390, h: 776 };
+
+/** An iPhone 14 Pro (428×868 at scale 1) with the Dynamic Island, at (x, y) scaled from its top
+ * left. `children` fill the screen under the status bar; `full` children fill the whole screen
+ * (a camera, a home screen) and `dark` makes the status bar white for them. `off` (0–1) darkens the
+ * whole screen: the phone before it opens Kokon. */
+export function IPhone({ x, y, scale = 1, children, full, dark = false, off = 0, ground = "#f4f4f4", style }: { x: number; y: number; scale?: number; children?: ReactNode; full?: ReactNode; dark?: boolean; off?: number; ground?: string; style?: CSSProperties }) {
+ return (
+ <div className="device device-iphone-14-pro" style={{ position: "absolute", left: x, top: y, transform: `scale(${scale})`, transformOrigin: "top left", filter: "drop-shadow(0 40px 60px rgba(0,0,0,0.55))", ...style }}>
+ <div className="device-frame">
+ <div className="device-screen" style={{ background: ground, position: "relative" }}>
+ {full}
+ {children && <div style={{ position: "absolute", left: 0, top: 54, width: PHONE_SCREEN.w, height: PHONE_SCREEN.h, overflow: "hidden" }}>{children}</div>}
+ <StatusBar light={dark} />
+ <div style={{ position: "absolute", left: "50%", bottom: 8, width: 134, height: 5, marginLeft: -67, borderRadius: 3, background: dark ? "#fff" : "#111", zIndex: 6 }} />
+ {off > 0 && <div style={{ position: "absolute", inset: 0, background: "#0b0b0c", opacity: off, zIndex: 7 }} />}
+ </div>
+ </div>
+ <div className="device-stripe" />
+ <div className="device-header" />
+ <div className="device-sensors" />
+ <div className="device-btns" />
+ <div className="device-power" />
+ <div className="device-home" />
+ </div>
+ );
+}
+
+/** A MacBook Pro (740×434 at scale 1): a browser bar with the address, the screen image under it. */
+export function MacBook({ x, y, scale = 1, src, address, on = 1 }: { x: number; y: number; scale?: number; src: string; address: string; on?: number }) {
+ return (
+ <div className="device device-macbook-pro" style={{ position: "absolute", left: x, top: y, transform: `scale(${scale})`, transformOrigin: "top left", filter: "drop-shadow(0 40px 60px rgba(0,0,0,0.55))" }}>
+ <div className="device-frame">
+ <div className="device-screen" style={{ background: "#f4f4f4" }}>
+ <div style={{ opacity: on, height: "100%" }}>
+ <div style={{ height: 22, display: "flex", alignItems: "center", gap: 5, padding: "0 8px", background: "#e9e9eb", borderBottom: "1px solid #d6d6d8" }}>
+ {["#ff5f57", "#febc2e", "#28c840"].map((c) => (
+ <i key={c} style={{ display: "block", width: 7, height: 7, borderRadius: "50%", background: c }} />
+ ))}
+ <span style={{ marginLeft: 14, padding: "2px 22px 2px 10px", borderRadius: 5, background: "#fff", font: `500 8.5px/1.2 -apple-system, ${font}`, color: "#444", boxShadow: "0 0 0 0.5px #d0d0d2" }}>{address}</span>
+ </div>
+ <Img src={staticFile(src)} style={{ display: "block", width: "100%", height: "calc(100% - 22px)", objectFit: "cover", objectPosition: "top" }} />
+ </div>
+ <div style={{ position: "absolute", inset: 0, background: "#0b0b0c", opacity: 1 - on }} />
+ </div>
+ </div>
+ <div className="device-stripe" />
+ <div className="device-header" />
+ <div className="device-sensors" />
+ <div className="device-btns" />
+ <div className="device-power" />
+ </div>
+ );
+}
+
+/** A cubic link: the path, and the point at `t` (0–1) along it, for a packet riding it. */
+export type Curve = [number, number, number, number, number, number, number, number];
+export const curvePath = (c: Curve) => `M${c[0]} ${c[1]} C ${c[2]} ${c[3]}, ${c[4]} ${c[5]}, ${c[6]} ${c[7]}`;
+export function curveAt(c: Curve, t: number): [number, number] {
+ const u = 1 - t;
+ const a = u * u * u;
+ const b = 3 * u * u * t;
+ const d = 3 * u * t * t;
+ const e = t * t * t;
+ return [a * c[0] + b * c[2] + d * c[4] + e * c[6], a * c[1] + b * c[3] + d * c[5] + e * c[7]];
+}
+
+/** A dotted, glowing link that flows from its start to its end (by frame `f`), drawn in over `p`
+ * (0–1); `hot` (0–1) brightens it while something travels on it. */
+export function Link({ c, f, p = 1, hot = 0, width = 2.4, id }: { c: Curve; f: number; p?: number; hot?: number; width?: number; id: string }) {
+ const d = curvePath(c);
+ return (
+ <g>
+ <defs>
+ <mask id={`draw-${id}`} maskUnits="userSpaceOnUse" x={-2000} y={-2000} width={6000} height={6000}>
+ <path d={d} pathLength={1} fill="none" stroke="#fff" strokeWidth={40} strokeDasharray={`${p} 2`} />
+ </mask>
+ </defs>
+ <g mask={`url(#draw-${id})`}>
+ <path d={d} fill="none" stroke={`rgba(255,214,140,${0.08 + 0.1 * hot})`} strokeWidth={width * 6} strokeLinecap="round" />
+ <path d={d} fill="none" stroke={`rgba(255,214,140,${0.55 + 0.4 * hot})`} strokeWidth={width} strokeLinecap="round" strokeDasharray="2 12" strokeDashoffset={-(f * 14) / (1.6 * FPS)} />
+ </g>
+ </g>
+ );
+}
+
+/** A photo travelling along a link (`t` 0–1), a small rounded thumbnail with a warm glow. */
+export function Packet({ c, t, src, size = 54 }: { c: Curve; t: number; src: string; size?: number }) {
+ if (t <= 0 || t >= 1) return null;
+ const [x, y] = curveAt(c, t);
+ const s = Math.min(1, t * 6, (1 - t) * 6);
+ return (
+ <div style={{ position: "absolute", left: x - size / 2, top: y - size / 2, width: size, height: size, borderRadius: size * 0.22, overflow: "hidden", transform: `scale(${0.6 + 0.4 * s})`, opacity: s, boxShadow: `0 0 0 2px rgba(255,255,255,0.9), 0 0 28px rgba(255,214,140,0.8)` }}>
+ <Img src={staticFile(src)} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
+ </div>
+ );
+}
+
+/** The site's pill over the scene: "Home Wi-Fi · or Tailscale from anywhere". */
+export function NetPill({ x, y, children, p = 1 }: { x: number; y: number; children: ReactNode; p?: number }) {
+ return (
+ <div
+ style={{
+ position: "absolute",
+ left: x,
+ top: y,
+ padding: "9px 16px",
+ borderRadius: 999,
+ background: "rgba(20,20,20,0.85)",
+ boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.14), 0 10px 30px rgba(0,0,0,0.5)",
+ fontFamily: font,
+ fontSize: 15,
+ color: "rgba(242,241,237,0.66)",
+ whiteSpace: "nowrap",
+ opacity: p,
+ transform: `translateY(${(1 - p) * 8}px)`,
+ }}
+ >
+ {children}
+ </div>
+ );
+}
+
+/** The site's links, in its 1160×650 stage: computer → laptop, computer → phone. */
+export const SCENE_LINKS: Record<"mac" | "phone", Curve> = {
+ mac: [240, 330, 290, 330, 300, 362, 352, 362],
+ phone: [130, 150, 230, 0, 760, 10, 884, 150],
+};
+
+/** The whole site scene (1160×650 stage): the computer, the MacBook (screenshot of the gallery in
+ * a browser) and the iPhone (`phone`: the app itself), the links and the pill. */
+export function HomeScene({ f, angle, glow, on = 1, links = 1, mac = 1, phone = 1, pill = 1, phoneScreen, hot = 0 }: { f: number; angle: number; glow: number; on?: number; links?: number; mac?: number; phone?: number; pill?: number; phoneScreen: ReactNode; hot?: number }) {
+ return (
+ <div style={{ position: "absolute", left: 0, top: 0, width: 1160, height: 650 }}>
+ <svg width={1160} height={650} viewBox="0 0 1160 650" style={{ position: "absolute", inset: 0, overflow: "visible" }}>
+ <Link id="mac" c={SCENE_LINKS.mac} f={f} p={links} hot={hot} />
+ <Link id="phone" c={SCENE_LINKS.phone} f={f} p={links} hot={hot} />
+ </svg>
+ <Pc angle={angle} glow={glow} on={on} style={{ left: 20, top: 150 }} />
+ <MacBook x={330} y={190} src="img/remote-laptop.webp" address="192.168.1.20:39152" on={mac} />
+ <IPhone x={868} y={40} scale={0.66} off={1 - phone}>
+ {phoneScreen}
+ </IPhone>
+ <NetPill x={400} y={22} p={pill}>
+ <b style={{ color: "#f2f1ed", fontWeight: 600 }}>Home Wi-Fi</b> · or Tailscale from anywhere
+ </NetPill>
+ </div>
+ );
+}
diff --git a/marketing/video/src/app/devices.css b/marketing/video/src/app/devices.css
new file mode 100644
index 0000000..7da3325
--- /dev/null
+++ b/marketing/video/src/app/devices.css
@@ -0,0 +1,41 @@
+/*! Device frames from Devices.css v0.2.0 | MIT License | (c) 2017 Yan Zhu | github.com/picturepan2/devices.css
+ Only the iPhone 14 Pro and the MacBook Pro (2022), silver, compiled from its SCSS.
+ The video's copy of site/assets/devices.css: the reset below stops at the frame's own parts,
+ since the screens hold the app itself (its flex layouts must keep their display). */
+.device, .device::before, .device::after, .device > *, .device > *::before, .device > *::after, .device .device-screen { box-sizing: border-box; display: block; }
+.device { position: relative; transform: scale(1); z-index: 1; }
+.device .device-frame { z-index: 1; }
+.device .device-screen { background-color: #000; background-position: center center; background-size: cover; object-fit: cover; position: relative; }
+
+/* iPhone 14 Pro, silver */
+.device-iphone-14-pro { height: 868px; width: 428px; }
+.device-iphone-14-pro .device-frame { background: #010101; border: 1px solid #c6c8ca; border-radius: 68px; box-shadow: inset 0 0 4px 2px #fff, inset 0 0 0 6px #e2e3e4; height: 868px; padding: 19px; width: 428px; }
+.device-iphone-14-pro .device-screen { border-radius: 49px; height: 830px; width: 390px; overflow: hidden; }
+.device-iphone-14-pro .device-stripe::after, .device-iphone-14-pro .device-stripe::before { border: solid rgba(1, 1, 1, 0.25); border-width: 0 7px; content: ""; height: 7px; left: 0; position: absolute; width: 100%; z-index: 9; }
+.device-iphone-14-pro .device-stripe::after { top: 85px; }
+.device-iphone-14-pro .device-stripe::before { bottom: 85px; }
+.device-iphone-14-pro .device-header { background: #010101; border-radius: 20px; height: 35px; left: 50%; margin-left: -60px; position: absolute; top: 29px; width: 120px; z-index: 3; }
+.device-iphone-14-pro .device-sensors::after, .device-iphone-14-pro .device-sensors::before { content: ""; position: absolute; z-index: 4; }
+.device-iphone-14-pro .device-sensors::after { background: #010101; border-radius: 17px; height: 33px; left: 50%; margin-left: -60px; top: 30px; width: 74px; }
+.device-iphone-14-pro .device-sensors::before { background: radial-gradient(farthest-corner at 20% 20%, #6074bf 0, transparent 40%), radial-gradient(farthest-corner at 80% 80%, #513785 0, #24555e 20%, transparent 50%); box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.05); border-radius: 50%; height: 9px; left: 50%; margin-left: 36px; top: 42px; width: 9px; }
+.device-iphone-14-pro .device-btns { background: #c6c8ca; border-radius: 2px; height: 32px; left: -2px; position: absolute; top: 115px; width: 3px; }
+.device-iphone-14-pro .device-btns::after, .device-iphone-14-pro .device-btns::before { background: #c6c8ca; border-radius: 2px; content: ""; height: 62px; left: 0; position: absolute; width: 3px; }
+.device-iphone-14-pro .device-btns::after { top: 60px; }
+.device-iphone-14-pro .device-btns::before { top: 140px; }
+.device-iphone-14-pro .device-power { background: #c6c8ca; border-radius: 2px; height: 100px; right: -2px; position: absolute; top: 200px; width: 3px; }
+.device-iphone-14-pro .device-home::after, .device-iphone-14-pro .device-home::before { border: solid rgba(1, 1, 1, 0.25); border-width: 6px 0; content: ""; height: 6px; position: absolute; width: 6px; z-index: 9; }
+.device-iphone-14-pro .device-home::after { right: 86px; top: 0; }
+.device-iphone-14-pro .device-home::before { bottom: 0; left: 86px; }
+
+/* MacBook Pro (2022), silver */
+.device-macbook-pro { height: 434px; width: 740px; }
+.device-macbook-pro .device-frame { background: #0d0d0d; border-radius: 20px; box-shadow: inset 0 0 0 2px #c6c8ca; height: 418px; margin: 0 auto; padding: 9px 9px 23px 9px; position: relative; width: 618px; }
+.device-macbook-pro .device-frame::after { background: linear-gradient(to bottom, #272727, #0d0d0d); border-radius: 0 0 20px 20px; bottom: 2px; content: ""; height: 24px; left: 2px; position: absolute; width: 614px; }
+.device-macbook-pro .device-header { background: #0d0d0d; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; height: 12px; left: 50%; margin-left: -32px; position: absolute; top: 11px; width: 64px; z-index: 2; }
+.device-macbook-pro .device-header::after, .device-macbook-pro .device-header::before { content: ""; height: 4px; position: absolute; top: 0; width: 4px; }
+.device-macbook-pro .device-header::after { background: radial-gradient(circle at bottom left, transparent 0, transparent 75%, #0d0d0d 75%, #0d0d0d 100%); left: -4px; }
+.device-macbook-pro .device-header::before { background: radial-gradient(circle at bottom right, transparent 0, transparent 75%, #0d0d0d 75%, #0d0d0d 100%); right: -4px; }
+.device-macbook-pro .device-screen { border: 2px solid #121212; border-radius: 10px 10px 0 0; height: 375px; width: 600px; overflow: hidden; }
+.device-macbook-pro .device-power { background: radial-gradient(circle at center, #e2e3e4 85%, #c6c8ca 100%); border: solid #a5a8ab; border-radius: 2px 2px 12px 12px; border-width: 1px 2px 0 2px; box-shadow: inset 0 -2px 8px 0 #6b6f73; height: 24px; margin-top: -10px; position: relative; width: 740px; z-index: 9; }
+.device-macbook-pro .device-power::after { background: #e2e3e4; border-radius: 0 0 10px 10px; box-shadow: inset 0 0 4px 2px #b8bbbe; content: ""; height: 10px; left: 50%; margin-left: -60px; position: absolute; top: 0; width: 120px; }
+.device-macbook-pro .device-power::before { background: transparent; border-radius: 0 0 3px 3px; bottom: -2px; box-shadow: -300px 0 #272727, 300px 0 #272727; content: ""; height: 2px; left: 50%; margin-left: -20px; position: absolute; width: 40px; }
diff --git a/marketing/video/src/app/fixtures.ts b/marketing/video/src/app/fixtures.ts
index 9bdc72f..d045212 100644
--- a/marketing/video/src/app/fixtures.ts
+++ b/marketing/video/src/app/fixtures.ts
@@ -21,6 +21,9 @@ export const SIZES: Record<string, [number, number]> = {
sneaker: [1536, 1536],
"sneaker-ad": [1536, 1536],
hero: [2752, 1536],
+ // The 0.11 video: a beach photo and the edit that puts him on a flamingo (use-case set, 2K).
+ beach: [1760, 2368],
+ "beach-flamingo": [1760, 2368],
};
export const PROMPTS = {
diff --git a/marketing/video/src/app/sound.tsx b/marketing/video/src/app/sound.tsx
index 8dd71ba..7b5a99a 100644
--- a/marketing/video/src/app/sound.tsx
+++ b/marketing/video/src/app/sound.tsx
@@ -17,7 +17,18 @@ const LEVEL = {
brush: 0.16,
hit: 0.55,
riser: 0.22,
+ // the "use cases" video
+ pop: 0.2,
+ swipe: 0.2,
+ deep: 0.3,
+ // the "Kokon 0.11" video (variants in public/sfx/011, the picked one in PICK)
+ lock: 0.32,
+ spinup: 0.2,
+ power: 0.3,
+ travel: 0.24,
} as const;
+/** Effects made in several variants (make_sfx.py 011), and the one each video plays. */
+const PICK: Partial<Record<string, string>> = { lock: "011/lock-1", spinup: "011/spinup-1", power: "011/power-1", travel: "011/travel-1" };
/** Music level under the voice (about -8 dB), and how fast it dips and comes back. */
const DUCK = { level: 0.4, attack: 8, release: 16 };
@@ -32,7 +43,7 @@ const REVEALS = ["reveal-a", "reveal-b", "reveal-c"] as const;
export function Sfx({ name, at, dur, gain = 1, variant }: { name: SfxName; at: number; dur?: number; gain?: number; variant?: number }) {
if (dur !== undefined && dur <= 0) return null;
const level = LEVEL[name] * gain;
- const file = name === "reveal" ? REVEALS[(variant ?? 0) % REVEALS.length] : name;
+ const file = name === "reveal" ? REVEALS[(variant ?? 0) % REVEALS.length] : (PICK[name] ?? name);
return (
<Sequence from={Math.round(at)} durationInFrames={dur} layout="none" name={`sfx:${file}`}>
<Html5Audio src={staticFile(`sfx/${file}.wav`)} volume={(f) => (dur === undefined ? level : level * Math.min(1, (dur - f) / 6))} />
@@ -84,7 +95,8 @@ function duck(f: number, cues: Cue[]): number {
}
/** Music for the whole film, under the voice (`cues`), fading out over the last `fadeOut` frames.
- * `src` and `from` (seconds into the file) pick the track and where it starts. */
-export function Music({ frames, fadeOut = 45, cues = CUES, src = "music.m4a", from = 0 }: { frames: number; fadeOut?: number; cues?: Cue[]; src?: string; from?: number }) {
- return <Html5Audio src={staticFile(src)} trimBefore={Math.round(from * FPS)} volume={(f) => LEVEL.music * duck(f, cues) * Math.min(1, Math.max(0, (frames - f) / fadeOut))} />;
+ * `src` and `from` (seconds into the file) pick the track and where it starts; `gain` shapes its level
+ * over the video. */
+export function Music({ frames, fadeOut = 45, cues = CUES, src = "music.m4a", from = 0, gain }: { frames: number; fadeOut?: number; cues?: Cue[]; src?: string; from?: number; gain?: (f: number) => number }) {
+ return <Html5Audio src={staticFile(src)} trimBefore={Math.round(from * FPS)} volume={(f) => LEVEL.music * (gain ? gain(f) : 1) * duck(f, cues) * Math.min(1, Math.max(0, (frames - f) / fadeOut))} />;
}
diff --git a/marketing/video/src/app/timeline011.ts b/marketing/video/src/app/timeline011.ts
new file mode 100644
index 0000000..b99161c
--- /dev/null
+++ b/marketing/video/src/app/timeline011.ts
@@ -0,0 +1,91 @@
+// The clock of the "Kokon 0.11" video (composition Update011): the music's bar grid, the shots
+// (cut on bars or beats), the voice-over cues (voiceover-0.11.md) and the frames of the actions
+// the voice names. Frames at 30 fps from the start of the video.
+import voice from "./voice-0.11.json";
+import { FPS, type Cue, type Lines, sentenceAt, type VoiceSet } from "./timeline";
+
+// Music: one track played whole under the video (no cuts, one steady background), on
+// the video's beat grid (118 BPM): each plays from its first bar line. `stop`: where it ends, its own
+// dead stop or the end of a fade; `end`: the video's last frame; `fade`: frames of fade-out before `end`.
+const BEAT = 60 / 118;
+/** Frame of beat `k`, and of bar `k` (4 beats). */
+export const beat = (k: number) => Math.round(k * BEAT * FPS);
+export const bar = (k: number) => beat(4 * k);
+/** The launch film's house-4 (92 s), chosen over two new ACE-Step takes: an 8-s intro,
+ * the groove, a softer part from bar 24 (safe by default, the server), the groove back on bar 32
+ * ("Kokon 0.11"); faded out over the end card. */
+export const MUSIC = { src: "music-0.11-house4.m4a", from: 0.288, stop: bar(38), end: bar(38), fade: 75 };
+export const STOP = MUSIC.stop;
+
+/** Shot starts (frames). */
+export const SHOT = {
+ hook: 0,
+ idea: bar(2),
+ /** Setup, step 1: Settings → Other devices on the computer. */
+ password: bar(7),
+ /** Step 2: the phone's camera on the code, then the sign-in. */
+ scan: bar(10),
+ login: bar(12),
+ /** Step 3: Add to Home Screen, the icon. */
+ home: bar(14),
+ use: bar(16),
+ safe: bar(22),
+ away: beat(4 * 23 + 3),
+ server: bar(26),
+ scene: bar(32),
+ end: bar(34),
+};
+export const UPDATE011_FRAMES = MUSIC.end;
+
+const json = voice as unknown as Lines;
+export const VOICE_011: VoiceSet = { dir: "voice-0.11", lines: json };
+const span = (line: number, i: number) => VOICE_011.lines[String(line)].sentences[i];
+const cue = (line: number, at: number, from = 0, to = from): Cue => ({ line, from, to, at, set: VOICE_011 });
+const all = (line: number, at: number): Cue => cue(line, at, 0, VOICE_011.lines[String(line)].sentences.length - 1);
+
+/** Line 3's second sentence comes in three parts (gen_voice.py V011_CUTS): sentences 1, 2, 3; line
+ * 4's first in two ("Pick a photo," / "describe the change."), so "Your PC…" is its sentence 2. */
+export const CUES_011: Cue[] = [
+ all(1, 12),
+ all(2, SHOT.idea + 12),
+ cue(3, SHOT.password + 12, 0),
+ cue(3, SHOT.scan + 16, 1),
+ cue(3, SHOT.login + 30, 2),
+ cue(3, SHOT.home + 10, 3),
+ cue(4, SHOT.use + 14, 0, 1),
+ // "Your PC does the work…" as the photo leaves the phone (set below, from the composer's clock).
+ cue(4, 0, 2),
+ cue(5, SHOT.safe + 12, 0),
+ cue(5, SHOT.away + 8, 1),
+ all(6, SHOT.server + 10),
+ cue(7, SHOT.scene + 10, 0, 1),
+];
+const cueOf = (n: number, i: number) => CUES_011.find((c) => c.line === n && c.from <= i && i <= c.to)!;
+/** Frame where sentence `i` of line `n` starts and ends. */
+export const said = (n: number, i: number) => sentenceAt(cueOf(n, i), i);
+export const saidEnd = (n: number, i: number) => said(n, i) + Math.round((span(n, i)[1] - span(n, i)[0]) * FPS);
+
+/** The phone in use (shot `use`): + tapped on "Pick a photo", the prompt typed from "describe", Send; the photo
+ * travels to the computer, the job runs there, the result travels back, Download. */
+export const PROMPT_011 = "Put him on a pink flamingo, surfing a wave";
+const U = SHOT.use;
+export const USE = {
+ plus: U + 20,
+ photo: U + 30,
+ type: said(4, 1),
+ cps: 26,
+ send: 0,
+ /** The photo on its way to the computer, the job, the result on its way back. */
+ out: 0,
+ job: 0,
+ back: 0,
+ result: 0,
+ download: 0,
+};
+USE.send = USE.type + Math.ceil((PROMPT_011.length * FPS) / USE.cps) + 10;
+USE.out = USE.send + 2;
+USE.job = USE.out + 22;
+USE.back = USE.job + 110;
+USE.result = USE.back + 22;
+USE.download = Math.min(USE.result + 40, SHOT.safe - 16);
+CUES_011[7].at = USE.out + 4;
diff --git a/marketing/video/src/app/video011.css b/marketing/video/src/app/video011.css
new file mode 100644
index 0000000..a45ac3f
--- /dev/null
+++ b/marketing/video/src/app/video011.css
@@ -0,0 +1,4 @@
+/* The "Kokon 0.11" video: the app inside a phone's screen fills it edge to edge. */
+.kokon-window.in-phone { border-radius: 0; box-shadow: none; }
+/* The sign-in page, as kokon-service serves it before the app (Login.tsx): centred on the page. */
+.kokon-window.login-page { align-items: center; justify-content: center; padding-bottom: 120px; }
diff --git a/marketing/video/src/app/voice-0.11-words.json b/marketing/video/src/app/voice-0.11-words.json
new file mode 100644
index 0000000..510e93e
--- /dev/null
+++ b/marketing/video/src/app/voice-0.11-words.json
@@ -0,0 +1,581 @@
+{
+ "1": [
+ [
+ "Kokon",
+ 0.0,
+ 0.46
+ ],
+ [
+ "now",
+ 0.46,
+ 0.68
+ ],
+ [
+ "works",
+ 0.68,
+ 0.9
+ ],
+ [
+ "on",
+ 0.9,
+ 1.1
+ ],
+ [
+ "your",
+ 1.1,
+ 1.2
+ ],
+ [
+ "phone.",
+ 1.2,
+ 1.62
+ ]
+ ],
+ "2": [
+ [
+ "Your",
+ 0.0,
+ 0.3
+ ],
+ [
+ "computer",
+ 0.3,
+ 0.6
+ ],
+ [
+ "with",
+ 0.6,
+ 0.82
+ ],
+ [
+ "the",
+ 0.82,
+ 0.94
+ ],
+ [
+ "graphics",
+ 0.94,
+ 1.18
+ ],
+ [
+ "card",
+ 1.18,
+ 1.52
+ ],
+ [
+ "makes",
+ 1.52,
+ 1.74
+ ],
+ [
+ "the",
+ 1.74,
+ 1.94
+ ],
+ [
+ "images.",
+ 1.94,
+ 3.12
+ ],
+ [
+ "Your",
+ 3.12,
+ 3.38
+ ],
+ [
+ "phone,",
+ 3.38,
+ 3.86
+ ],
+ [
+ "tablet,",
+ 3.86,
+ 4.1
+ ],
+ [
+ "or",
+ 4.1,
+ 4.22
+ ],
+ [
+ "laptop",
+ 4.22,
+ 4.56
+ ],
+ [
+ "just",
+ 4.56,
+ 4.84
+ ],
+ [
+ "opens",
+ 4.84,
+ 5.2
+ ],
+ [
+ "Cocon",
+ 5.2,
+ 5.54
+ ],
+ [
+ "in",
+ 5.54,
+ 5.7
+ ],
+ [
+ "a",
+ 5.7,
+ 5.78
+ ],
+ [
+ "browser.",
+ 5.78,
+ 6.62
+ ],
+ [
+ "No",
+ 6.62,
+ 6.92
+ ],
+ [
+ "cloud,",
+ 6.92,
+ 7.46
+ ],
+ [
+ "no",
+ 7.46,
+ 7.62
+ ],
+ [
+ "account.",
+ 7.62,
+ 8.14
+ ]
+ ],
+ "3": [
+ [
+ "Open",
+ 0.0,
+ 0.36
+ ],
+ [
+ "Settings,",
+ 0.36,
+ 0.98
+ ],
+ [
+ "Other",
+ 0.98,
+ 1.22
+ ],
+ [
+ "Devices,",
+ 1.22,
+ 1.98
+ ],
+ [
+ "and",
+ 1.98,
+ 2.02
+ ],
+ [
+ "choose",
+ 2.02,
+ 2.22
+ ],
+ [
+ "a",
+ 2.22,
+ 2.38
+ ],
+ [
+ "password.",
+ 2.38,
+ 3.48
+ ],
+ [
+ "Scan",
+ 3.48,
+ 3.74
+ ],
+ [
+ "the",
+ 3.74,
+ 3.88
+ ],
+ [
+ "code,",
+ 3.88,
+ 4.74
+ ],
+ [
+ "sign",
+ 4.74,
+ 5.0
+ ],
+ [
+ "in",
+ 5.0,
+ 5.18
+ ],
+ [
+ "once,",
+ 5.18,
+ 5.86
+ ],
+ [
+ "and",
+ 5.86,
+ 6.06
+ ],
+ [
+ "add",
+ 6.06,
+ 6.34
+ ],
+ [
+ "Cocon",
+ 6.34,
+ 6.64
+ ],
+ [
+ "to",
+ 6.64,
+ 6.82
+ ],
+ [
+ "your",
+ 6.82,
+ 6.96
+ ],
+ [
+ "home",
+ 6.96,
+ 7.1
+ ],
+ [
+ "screen.",
+ 7.1,
+ 7.58
+ ]
+ ],
+ "4": [
+ [
+ "Pick",
+ 0.0,
+ 0.24
+ ],
+ [
+ "a",
+ 0.24,
+ 0.36
+ ],
+ [
+ "photo,",
+ 0.36,
+ 1.44
+ ],
+ [
+ "describe",
+ 1.44,
+ 1.78
+ ],
+ [
+ "the",
+ 1.78,
+ 2.04
+ ],
+ [
+ "change,",
+ 2.04,
+ 3.16
+ ],
+ [
+ "your",
+ 3.16,
+ 3.3
+ ],
+ [
+ "PC",
+ 3.3,
+ 3.58
+ ],
+ [
+ "does",
+ 3.58,
+ 3.88
+ ],
+ [
+ "the",
+ 3.88,
+ 4.06
+ ],
+ [
+ "work",
+ 4.06,
+ 4.22
+ ],
+ [
+ "and",
+ 4.22,
+ 4.44
+ ],
+ [
+ "sends",
+ 4.44,
+ 4.62
+ ],
+ [
+ "it",
+ 4.62,
+ 4.78
+ ],
+ [
+ "back.",
+ 4.78,
+ 5.22
+ ]
+ ],
+ "5": [
+ [
+ "It",
+ 0.0,
+ 0.2
+ ],
+ [
+ "stays",
+ 0.2,
+ 0.44
+ ],
+ [
+ "off",
+ 0.44,
+ 0.68
+ ],
+ [
+ "until",
+ 0.68,
+ 0.92
+ ],
+ [
+ "you",
+ 0.92,
+ 1.04
+ ],
+ [
+ "set",
+ 1.04,
+ 1.22
+ ],
+ [
+ "a",
+ 1.22,
+ 1.66
+ ],
+ [
+ "password.",
+ 1.66,
+ 2.32
+ ],
+ [
+ "Away",
+ 2.32,
+ 2.62
+ ],
+ [
+ "from",
+ 2.62,
+ 2.82
+ ],
+ [
+ "home,",
+ 2.82,
+ 3.32
+ ],
+ [
+ "use",
+ 3.32,
+ 3.48
+ ],
+ [
+ "Tailscale",
+ 3.48,
+ 3.98
+ ],
+ [
+ "or",
+ 3.98,
+ 4.28
+ ],
+ [
+ "another",
+ 4.28,
+ 4.52
+ ],
+ [
+ "VPN,",
+ 4.52,
+ 5.34
+ ],
+ [
+ "never",
+ 5.34,
+ 5.46
+ ],
+ [
+ "an",
+ 5.46,
+ 5.68
+ ],
+ [
+ "open",
+ 5.68,
+ 5.88
+ ],
+ [
+ "port.",
+ 5.88,
+ 6.34
+ ]
+ ],
+ "6": [
+ [
+ "Have",
+ 0.0,
+ 0.26
+ ],
+ [
+ "a",
+ 0.26,
+ 0.4
+ ],
+ [
+ "home",
+ 0.4,
+ 0.52
+ ],
+ [
+ "server?",
+ 0.52,
+ 1.48
+ ],
+ [
+ "Run",
+ 1.48,
+ 1.74
+ ],
+ [
+ "CoCon",
+ 1.74,
+ 2.14
+ ],
+ [
+ "on",
+ 2.14,
+ 2.4
+ ],
+ [
+ "Linux",
+ 2.4,
+ 2.62
+ ],
+ [
+ "or",
+ 2.62,
+ 2.9
+ ],
+ [
+ "in",
+ 2.9,
+ 3.12
+ ],
+ [
+ "Docker",
+ 3.12,
+ 3.28
+ ],
+ [
+ "with",
+ 3.28,
+ 3.56
+ ],
+ [
+ "an",
+ 3.56,
+ 3.7
+ ],
+ [
+ "NVIDIA",
+ 3.7,
+ 3.94
+ ],
+ [
+ "card.",
+ 3.94,
+ 4.96
+ ],
+ [
+ "One",
+ 4.96,
+ 5.18
+ ],
+ [
+ "file,",
+ 5.18,
+ 5.86
+ ],
+ [
+ "one",
+ 5.86,
+ 5.94
+ ],
+ [
+ "command.",
+ 5.94,
+ 6.42
+ ]
+ ],
+ "7": [
+ [
+ "Kokon",
+ 0.0,
+ 0.5
+ ],
+ [
+ "0",
+ 0.5,
+ 0.84
+ ],
+ [
+ ".11.",
+ 0.84,
+ 2.0
+ ],
+ [
+ "Your",
+ 2.0,
+ 2.2
+ ],
+ [
+ "GPU",
+ 2.2,
+ 2.54
+ ],
+ [
+ "on",
+ 2.54,
+ 2.98
+ ],
+ [
+ "every",
+ 2.98,
+ 3.32
+ ],
+ [
+ "screen.",
+ 3.32,
+ 3.82
+ ]
+ ]
+}
\ No newline at end of file
diff --git a/marketing/video/src/app/voice-0.11.json b/marketing/video/src/app/voice-0.11.json
new file mode 100644
index 0000000..083d45a
--- /dev/null
+++ b/marketing/video/src/app/voice-0.11.json
@@ -0,0 +1,109 @@
+{
+ "1": {
+ "dur": 1.64,
+ "sentences": [
+ [
+ 0.0,
+ 1.64
+ ]
+ ]
+ },
+ "2": {
+ "dur": 8.16,
+ "sentences": [
+ [
+ 0.0,
+ 2.72
+ ],
+ [
+ 3.12,
+ 6.28
+ ],
+ [
+ 6.68,
+ 8.16
+ ]
+ ]
+ },
+ "3": {
+ "dur": 7.6,
+ "sentences": [
+ [
+ 0.0,
+ 3.0
+ ],
+ [
+ 3.4,
+ 4.32
+ ],
+ [
+ 4.72,
+ 5.54
+ ],
+ [
+ 5.94,
+ 7.6
+ ]
+ ]
+ },
+ "4": {
+ "dur": 5.24,
+ "sentences": [
+ [
+ 0.0,
+ 0.995
+ ],
+ [
+ 1.395,
+ 2.68
+ ],
+ [
+ 3.08,
+ 5.24
+ ]
+ ]
+ },
+ "5": {
+ "dur": 6.36,
+ "sentences": [
+ [
+ 0.0,
+ 1.84
+ ],
+ [
+ 2.24,
+ 6.36
+ ]
+ ]
+ },
+ "6": {
+ "dur": 6.44,
+ "sentences": [
+ [
+ 0.0,
+ 1.08
+ ],
+ [
+ 1.48,
+ 4.56
+ ],
+ [
+ 4.96,
+ 6.44
+ ]
+ ]
+ },
+ "7": {
+ "dur": 3.84,
+ "sentences": [
+ [
+ 0.0,
+ 1.52
+ ],
+ [
+ 1.92,
+ 3.84
+ ]
+ ]
+ }
+}
diff --git a/marketing/video/src/mocks/api.ts b/marketing/video/src/mocks/api.ts
index 33fc959..b7446dc 100644
--- a/marketing/video/src/mocks/api.ts
+++ b/marketing/video/src/mocks/api.ts
@@ -15,6 +15,8 @@ export const isConfigured = () => true;
const never = () => new Promise<never>(() => {});
const ANSWERS: Record<string, unknown> = { config: { outputDir: "C:/Users/you/Pictures/Kokon", upscalerModel: "superscale-sp", gpuBackend: "cuda", activeProfile: "official", profiles: [{ id: "official" }], ui: {} } };
export const api: Record<string, (...a: unknown[]) => Promise<never>> = new Proxy({}, { get: (_t, name: string) => (name in ANSWERS ? () => Promise.resolve(ANSWERS[name]) : never) });
+/** What a request answers from now on (Settings → Other devices reads `remote` when it opens). */
+export const answer = (name: string, value: unknown) => void (ANSWERS[name] = value);
export const urls = {
input: (id: string) => staticFile(`img/${id}.jpg`),
inputThumb: (id: string) => staticFile(`thumb/${id}.jpg`),
diff --git a/marketing/video/src/mocks/platform.ts b/marketing/video/src/mocks/platform.ts
new file mode 100644
index 0000000..aa619dc
--- /dev/null
+++ b/marketing/video/src/mocks/platform.ts
@@ -0,0 +1,12 @@
+// The app's platform checks, switched per window: the desktop app (Settings → Other devices) or
+// Kokon in a phone's browser (the drawer sidebar, bottom sheets). <AppWindow> sets them before
+// its components render; the app reads `inBrowser` at use, so the live binding follows.
+export * from "../../../../src/lib/platform";
+
+export let inBrowser = false;
+let narrow = false;
+export const isNarrow = () => narrow;
+export function setPlatform(browser: boolean, phone: boolean) {
+ inBrowser = browser;
+ narrow = phone;
+}
diff --git a/marketing/video/src/scenes/Probe011.tsx b/marketing/video/src/scenes/Probe011.tsx
new file mode 100644
index 0000000..b06466c
--- /dev/null
+++ b/marketing/video/src/scenes/Probe011.tsx
@@ -0,0 +1,57 @@
+// Measuring composition (not in the film): the positions of the buttons the scenes tap or click,
+// printed to the render log.
+import { useEffect } from "react";
+import { AbsoluteFill } from "remotion";
+import { AppWindow } from "../app/AppWindow";
+import { appState, gen, genItem, ref, settingsState } from "../app/fixtures";
+import { answer } from "../mocks/api";
+
+const BEACH = gen("beach", "generate", "A man on the beach");
+const FLAMINGO = gen("beach-flamingo", "edit", "Put him on a pink flamingo, surfing a wave", "beach");
+const P = { projects: [{ id: "current", title: "Beach day", updatedAt: Date.now(), cover: "gen:beach-flamingo", count: 2 }], projectId: "current", sidebar: false };
+answer("remote", { enabled: true, forced: false, port: 39152, password_set: true, listening: true, url: "http://192.168.1.20:39152", error: null, min_password_chars: 8 });
+
+function Log() {
+ useEffect(() => {
+ const out: string[] = [];
+ document.querySelectorAll<HTMLElement>("[data-probe]").forEach((w) => {
+ const o = w.getBoundingClientRect();
+ // The settings window is drawn at half size: back to window px.
+ const k = w.dataset.probe === "settings" ? 2 : 1;
+ const q = (name: string, sel: string) => {
+ const e = w.querySelector(sel);
+ if (!e) return out.push(`${w.dataset.probe} ${name}: none`);
+ const r = e.getBoundingClientRect();
+ out.push(`${w.dataset.probe} ${name}: x ${Math.round((r.x - o.x + r.width / 2) * k)} y ${Math.round((r.y - o.y + r.height / 2) * k)} w ${Math.round(r.width * k)} h ${Math.round(r.height * k)}`);
+ };
+ q("add", ".composer .controls > *:first-child");
+ q("send", ".composer .send");
+ q("download", '[title*="Download"], [aria-label*="Download"]');
+ q("pw input", '.modal input[type="password"]');
+ q("pw button", ".modal form .btn.primary");
+ q("qr", ".modal .qr");
+ });
+ console.log(["PROBE", ...out].join("\n"));
+ }, []);
+ return null;
+}
+
+export function Probe011() {
+ return (
+ <AbsoluteFill style={{ background: "#111" }}>
+ <div data-probe="empty" style={{ position: "absolute", left: 0, top: 0 }}>
+ <AppWindow state={appState({ ...P })} width={390} height={776} phone light />
+ </div>
+ <div data-probe="photo" style={{ position: "absolute", left: 400, top: 0 }}>
+ <AppWindow state={appState({ ...P, composer: { ...appState().composer, refs: [ref("beach")], prompt: "Put him on a pink flamingo, surfing a wave" } })} width={390} height={776} phone light />
+ </div>
+ <div data-probe="result" style={{ position: "absolute", left: 800, top: 0 }}>
+ <AppWindow state={appState({ ...P, session: [genItem(BEACH), genItem(FLAMINGO)], selected: "beach-flamingo" })} width={390} height={776} phone light />
+ </div>
+ <div data-probe="settings" key="s" style={{ position: "absolute", left: 1200, top: 0, transform: "scale(0.5)", transformOrigin: "top left" }}>
+ <AppWindow state={settingsState({ settingsTab: "devices" })} width={1440} height={900} light waitFor=".modal .qr" />
+ </div>
+ <Log />
+ </AbsoluteFill>
+ );
+}
diff --git a/marketing/video/src/scenes/Update011.tsx b/marketing/video/src/scenes/Update011.tsx
new file mode 100644
index 0000000..ca864e9
--- /dev/null
+++ b/marketing/video/src/scenes/Update011.tsx
@@ -0,0 +1,897 @@
+// "Kokon 0.11": the update video for Kokon on other devices (Reddit, then YouTube). Built on the
+// kokon.app "Other devices" scene (app/Devices011.tsx): the computer with the graphics card makes
+// the images, a phone or a laptop opens Kokon in a browser. The app on screen is the app itself:
+// the desktop window's Settings → Other devices, and the browser UI in the phone layout
+// (loaders/phone-container.cjs). Every shot is still and changes by a hard cut on the beat
+// (app/timeline011.ts): no camera moves. The on-screen words carry every message, since Reddit
+// plays muted.
+import { Check, CloudOff, Compass, Lock, PlusSquare, Share, UserX, X } from "lucide-react";
+import { useLayoutEffect, useMemo, type CSSProperties, type ReactNode } from "react";
+import { AbsoluteFill, Img, spring, staticFile, useCurrentFrame, useVideoConfig } from "remotion";
+import { siDocker, siLinux, siNvidia } from "simple-icons";
+import { encode } from "uqr";
+import { KokonMark } from "../../../../src/components/Welcome";
+import { AppWindow } from "../app/AppWindow";
+import { type Curve, fanAngle, HomeScene, IPhone, Link, NetPill, Packet, Pc, PHONE_SCREEN } from "../app/Devices011";
+import { appState, gen, genItem, jobItem, ref, settingsState } from "../app/fixtures";
+import { Mark } from "../app/Mark";
+import { Backdrop, Caption, inOut, prog, Pointer, typed, typingDone } from "../app/motion";
+import { Music, Send, Sfx, Voice } from "../app/sound";
+import { FPS } from "../app/timeline";
+import { CUES_011, MUSIC, PROMPT_011, said, SHOT, UPDATE011_FRAMES, USE } from "../app/timeline011";
+import { answer } from "../mocks/api";
+import type { CardMotion } from "../mocks/card";
+import type { State } from "../mocks/store";
+import "../app/video011.css";
+
+export { UPDATE011_FRAMES };
+const font = '"Inter Variable", Inter, sans-serif';
+const mono = '"JetBrains Mono", "Cascadia Code", Consolas, monospace';
+const PAPER = "#F7F6F2";
+const WARM = "#ffd68c";
+/** The setup guide's home-network section: what the QR codes in the video open. */
+const GUIDE = "https://kokon.app/self-hosted/#on-your-home-network";
+const LAN = "http://192.168.1.20:39152";
+
+/** Shows `children` from frame `from` (inclusive) to `to` (exclusive): one shot. */
+const Shot = ({ from, to, children }: { from: number; to: number; children: ReactNode }) => {
+ const f = useCurrentFrame();
+ return f >= from && f < to ? <>{children}</> : null;
+};
+
+// ---------------------------------------------------------------------------------------------
+// The project on the phone: a beach photo, and the edit that puts him on a flamingo.
+// ---------------------------------------------------------------------------------------------
+const BEACH = gen("beach", "generate", "A man on the beach, arms open");
+const FLAMINGO = gen("beach-flamingo", "edit", PROMPT_011, "beach");
+const BEACH_DAY = { projects: [{ id: "current", title: "Beach day", updatedAt: Date.now() - 60_000, cover: "gen:beach-flamingo", count: 2 }], projectId: "current", sidebar: false };
+/** A photo picked on the phone: an upload, so an input, not a result. */
+const PICKED = { key: "ref-photo", source: "input:beach", width: 1760, height: 2368, name: "IMG_2048.jpg" };
+const resultState = (patch: Partial<State> = {}) =>
+ appState({ ...BEACH_DAY, session: [genItem(BEACH), genItem(FLAMINGO)], selected: "beach-flamingo", composer: { ...appState().composer, refs: [ref("beach-flamingo")] }, ...patch });
+
+/** Kokon in the phone's browser (390×776 under the status bar), light as on the site. */
+const PhoneApp = ({ state, card, split, height = PHONE_SCREEN.h }: { state: State; card?: CardMotion; split?: number; height?: number }) => (
+ <AppWindow state={state} width={PHONE_SCREEN.w} height={height} phone light className="in-phone" card={card} split={split} />
+);
+
+/** The computer's settings: Other devices, before and after the password (mocks/api.ts answers
+ * `remote` with this frame's status; the window is mounted again when it changes). */
+const REMOTE_OFF = { enabled: false, forced: false, port: 39152, password_set: false, listening: false, url: null, error: null, min_password_chars: 8 };
+const REMOTE_ON = { ...REMOTE_OFF, enabled: true, password_set: true, listening: true, url: LAN };
+function DevicesSettings({ on, width = 1440, height = 900 }: { on: boolean; width?: number; height?: number }) {
+ answer("remote", on ? REMOTE_ON : REMOTE_OFF);
+ return <AppWindow key={on ? "on" : "off"} state={settingsState({ settingsTab: "devices" })} width={width} height={height} light waitFor={on ? ".modal .qr" : ".modal form input"} />;
+}
+
+/** Types `chars` characters into the password field of Settings (its state is the component's own,
+ * which a video can't type into): set on the element after each render, the button enabled. */
+function TypePassword({ chars }: { chars: number }) {
+ useLayoutEffect(() => {
+ const input = document.querySelector<HTMLInputElement>('.modal form input[type="password"]');
+ const btn = document.querySelector<HTMLButtonElement>(".modal form .btn.primary");
+ if (input) input.value = "x".repeat(chars);
+ if (btn) btn.disabled = chars < 8;
+ });
+ return null;
+}
+
+/** A QR code, black on white with a quiet border (as RemoteAccess.tsx draws it). */
+function Qr({ text, size }: { text: string; size: number }) {
+ const { d, n } = useMemo(() => {
+ const qr = encode(text, { border: 2 });
+ let p = "";
+ qr.data.forEach((row, y) => row.forEach((on, x) => on && (p += `M${x} ${y}h1v1h-1z`)));
+ return { d: p, n: qr.size };
+ }, [text]);
+ return (
+ <svg width={size} height={size} viewBox={`0 0 ${n} ${n}`} shapeRendering="crispEdges" style={{ display: "block" }}>
+ <rect width={n} height={n} fill="#fff" />
+ <path d={d} fill="#000" />
+ </svg>
+ );
+}
+
+/** A finger on the phone's screen: a soft dot from `from`, pressed at `at`, a ring after. */
+function Touch({ x, y, at, from = at - 10 }: { x: number; y: number; at: number; from?: number }) {
+ const f = useCurrentFrame();
+ if (f < from || f > at + 16) return null;
+ const inn = prog(f, from, 6);
+ const out = 1 - prog(f, at + 8, 8);
+ const press = 1 - Math.min(1, Math.abs(f - at) / 4) * 1;
+ const ring = f - at;
+ return (
+ <div style={{ position: "absolute", left: x, top: y, zIndex: 50, pointerEvents: "none", opacity: Math.min(inn, out) }}>
+ <div style={{ position: "absolute", left: -22, top: -22, width: 44, height: 44, borderRadius: "50%", background: "rgba(40,40,40,0.28)", boxShadow: "0 0 0 2px rgba(255,255,255,0.85)", transform: `scale(${1 - 0.18 * press})` }} />
+ {ring >= 0 && <div style={{ position: "absolute", left: -22, top: -22, width: 44, height: 44, borderRadius: "50%", border: "2px solid rgba(40,40,40,0.5)", transform: `scale(${1 + ring / 8})`, opacity: 1 - ring / 16 }} />}
+ </div>
+ );
+}
+
+/** Step number and what it is, top left: "1 On the computer · Settings → Other devices". */
+function Step({ n, title, sub, at }: { n: number; title: string; sub?: string; at: number }) {
+ const f = useCurrentFrame();
+ const p = prog(f, at, 16);
+ return (
+ <div style={{ position: "absolute", left: 120, top: 64, display: "flex", alignItems: "center", gap: 22, fontFamily: font, color: "#f4f4f2", opacity: p, transform: `translateY(${(1 - p) * 14}px)` }}>
+ <span style={{ width: 64, height: 64, borderRadius: "50%", background: PAPER, color: "#0d0d0d", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 36, fontWeight: 700 }}>{n}</span>
+ <div>
+ <div style={{ fontSize: 46, fontWeight: 650, letterSpacing: "-0.035em", lineHeight: 1.05 }}>{title}</div>
+ {sub && <div style={{ fontSize: 22, color: "rgba(244,244,242,0.62)", marginTop: 6 }}>{sub}</div>}
+ </div>
+ </div>
+ );
+}
+
+const rise = (p: number): CSSProperties => ({ opacity: p, transform: `translateY(${(1 - p) * 22}px)`, filter: `blur(${(1 - p) * 8}px)` });
+
+// ---------------------------------------------------------------------------------------------
+// 1. Hook: Kokon on an iPhone, the beach photo turns into the flamingo; "Kokon 0.11".
+// ---------------------------------------------------------------------------------------------
+function Hook() {
+ const f = useCurrentFrame();
+ const { fps } = useVideoConfig();
+ const wipeAt = 30;
+ const split = 1 - prog(f, wipeAt, 26, inOut);
+ const state = resultState({ compare: f < wipeAt + 34 ? "slider" : "off" });
+ const sp = (d: number) => spring({ frame: f - d, fps, config: { damping: 14, mass: 0.8, stiffness: 110 } });
+ const mark = sp(4);
+ const word = prog(f, 12, 18);
+ const badge = spring({ frame: f - 22, fps, config: { damping: 12, mass: 0.6, stiffness: 160 } });
+ const sub = prog(f, 34, 18);
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.8} />
+ <IPhone x={330} y={52} scale={1.12}>
+ <PhoneApp state={state} split={split} />
+ </IPhone>
+ <div style={{ position: "absolute", left: 960, top: 360, fontFamily: font, color: PAPER }}>
+ <div style={{ display: "flex", alignItems: "center", gap: 28 }}>
+ <div style={{ opacity: Math.min(1, mark * 1.5), transform: `scale(${0.7 + 0.3 * mark})` }}>
+ <Mark size={110} color={PAPER} />
+ </div>
+ <span style={{ fontSize: 128, fontWeight: 620, letterSpacing: "-0.045em", lineHeight: 1, ...rise(word) }}>Kokon</span>
+ <span style={{ padding: "8px 22px 12px", borderRadius: 999, border: `3px solid ${PAPER}`, fontSize: 64, fontWeight: 600, letterSpacing: "-0.03em", lineHeight: 1, opacity: Math.min(1, badge * 1.5), transform: `scale(${0.6 + 0.4 * badge})` }}>0.11</span>
+ </div>
+ <div style={{ marginTop: 34, fontSize: 52, fontWeight: 600, letterSpacing: "-0.03em", color: "#f4f4f2", ...rise(sub) }}>Now on your phone.</div>
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 2. The idea: the site's scene. The computer powers on, the links run to the laptop and the
+// phone, the pill; then "No cloud · No account".
+// ---------------------------------------------------------------------------------------------
+const SCENE_AT = { x: 148, y: 30, s: 1.4 };
+/** Seconds into line 2's second sentence where words start (Whisper, voice-0.11-words.json). */
+const IDEA_WORDS = { phone: 0.26, laptop: 1.1, browser: 2.66 };
+
+function Idea() {
+ const f = useCurrentFrame();
+ const { fps } = useVideoConfig();
+ const s0 = said(2, 0);
+ const s1 = said(2, 1);
+ const s2 = said(2, 2);
+ const w = (k: keyof typeof IDEA_WORDS) => s1 + Math.round(IDEA_WORDS[k] * FPS);
+ const angle = fanAngle(f, (i) => (i < s0 ? 0 : 0.42 * prog(i, s0, 40, inOut)));
+ const chip = (d: number) => spring({ frame: f - d, fps, config: { damping: 13, mass: 0.6, stiffness: 150 } });
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.6} />
+ <div style={{ position: "absolute", left: SCENE_AT.x, top: SCENE_AT.y, transform: `scale(${SCENE_AT.s})`, transformOrigin: "top left" }}>
+ <HomeScene
+ f={f}
+ angle={angle}
+ on={prog(f, s0 + 2, 6)}
+ glow={0.6 * prog(f, s0 + 4, 30)}
+ links={prog(f, w("phone"), 26, inOut)}
+ phone={prog(f, w("phone") + 6, 10)}
+ mac={prog(f, w("laptop"), 10)}
+ pill={prog(f, w("browser"), 14)}
+ phoneScreen={<PhoneApp state={resultState()} />}
+ />
+ </div>
+ <Caption title="Your computer with the graphics card makes the images." start={s0 + 2} end={s1 - 2} align="center" y={960} size={46} />
+ <Caption title="Your phone, tablet or laptop opens Kokon in a browser." start={s1 + 2} end={s2 - 2} align="center" y={960} size={46} />
+ <div style={{ position: "absolute", left: 0, right: 0, top: 952, display: "flex", justifyContent: "center", gap: 28, fontFamily: font }}>
+ {[
+ { icon: <CloudOff size={34} />, text: "No cloud", at: s2 },
+ { icon: <UserX size={34} />, text: "No account", at: s2 + 14 },
+ ].map(({ icon, text, at }) => {
+ const p = chip(at);
+ return (
+ <div key={text} style={{ display: "flex", alignItems: "center", gap: 14, padding: "14px 30px 14px 24px", borderRadius: 999, background: PAPER, color: "#0d0d0d", fontSize: 38, fontWeight: 650, letterSpacing: "-0.02em", opacity: f < at ? 0 : Math.min(1, p * 1.5), transform: `scale(${0.7 + 0.3 * p})` }}>
+ {icon}
+ {text}
+ </div>
+ );
+ })}
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 3. Setup in three steps. Step 1: Settings → Other devices on the computer, a password, the QR.
+// ---------------------------------------------------------------------------------------------
+/** The settings window on screen, and where its password field and button are (window px,
+ * measured with the Probe011 composition). */
+const WIN_AT = { x: 132, y: 190, s: 1.15 };
+const PW_INPUT: [number, number] = [750, 308];
+const PW_BUTTON: [number, number] = [1014, 308];
+const PW = (() => {
+ const P = SHOT.password;
+ return { enter: P + 30, field: P + 60, type: P + 64, typed: P + 88, button: P + 104, on: P + 106 };
+})();
+
+function Password() {
+ const f = useCurrentFrame();
+ const on = f >= PW.on;
+ const chars = Math.max(0, Math.min(10, Math.floor((f - PW.type) / 2.4)));
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.7} />
+ <div style={{ position: "absolute", left: WIN_AT.x, top: WIN_AT.y, transform: `scale(${WIN_AT.s})`, transformOrigin: "top left" }}>
+ <DevicesSettings on={on} />
+ {!on && <TypePassword chars={f >= PW.type ? chars : 0} />}
+ <Pointer
+ path={[
+ [PW.enter, 1180, 640],
+ [PW.field - 2, PW_INPUT[0], PW_INPUT[1]],
+ [PW.typed + 4, PW_INPUT[0] + 40, PW_INPUT[1] + 30],
+ [PW.button - 2, PW_BUTTON[0], PW_BUTTON[1]],
+ [PW.button + 30, PW_BUTTON[0] + 60, PW_BUTTON[1] + 160],
+ ]}
+ clicks={[PW.field, PW.button]}
+ hideBefore={PW.enter}
+ hideAfter={PW.button + 30}
+ />
+ </div>
+ <Step n={1} title="On the computer: Settings → Other devices" sub="Choose a password. Then the QR code appears." at={SHOT.password + 4} />
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// Step 2: the phone's camera on the code (the QR you can scan in the video opens the setup
+// guide), Safari's pill, the sign-in, Kokon in the browser.
+// ---------------------------------------------------------------------------------------------
+const PHONE_AT = { x: 746, y: 176, s: 1 };
+/** Where the QR sits in the settings window (window px, Probe011), and how the camera sees it. */
+const QR_IN_WIN = { x: 646, y: 415, size: 146 };
+const CAM = { s: 1.7, cx: 195, cy: 360 };
+
+/** The camera on the code: the phone shows only Safari's pill with the address, as it does. */
+function Camera({ f, s }: { f: number; s: number }) {
+ const pill = prog(f, s + 30, 10);
+ const qr = QR_IN_WIN.size * CAM.s;
+ return (
+ <div style={{ position: "absolute", inset: 0, background: "#000", overflow: "hidden" }}>
+ {/* the computer's screen, through the camera: soft and a little dark */}
+ <div style={{ position: "absolute", left: CAM.cx - QR_IN_WIN.x * CAM.s, top: CAM.cy - QR_IN_WIN.y * CAM.s, transform: `scale(${CAM.s})`, transformOrigin: "top left", filter: "blur(2.5px) brightness(0.82)" }}>
+ <DevicesSettings on />
+ </div>
+ <div style={{ position: "absolute", left: CAM.cx - qr / 2, top: CAM.cy - qr / 2, boxShadow: "0 0 0 6px rgba(255,255,255,0.5)" }}>
+ <Qr text={GUIDE} size={qr} />
+ </div>
+ {/* Safari's suggestion for the code it read */}
+ <div style={{ position: "absolute", left: 0, right: 0, top: 590, display: "flex", justifyContent: "center", opacity: pill, transform: `scale(${0.85 + 0.15 * pill})` }}>
+ <div style={{ display: "flex", alignItems: "center", gap: 10, padding: "11px 20px", borderRadius: 999, background: "#ffd60a", color: "#000", font: `600 17px/1 -apple-system, ${font}` }}>
+ <Compass size={18} strokeWidth={2.4} />
+ Safari · 192.168.1.20
+ </div>
+ </div>
+ {/* the camera's own controls */}
+ <div style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: 170, background: "rgba(0,0,0,0.92)", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 16 }}>
+ <span style={{ font: `600 14px/1 -apple-system, ${font}`, letterSpacing: "0.12em", color: "#ffd60a" }}>PHOTO</span>
+ <span style={{ width: 72, height: 72, borderRadius: "50%", background: "#fff", boxShadow: "0 0 0 4px #000, 0 0 0 7px #fff" }} />
+ </div>
+ </div>
+ );
+}
+
+/** Safari's toolbar at the foot of the page (before Kokon is on the home screen). */
+const SAFARI_BAR = 80;
+function SafariBar() {
+ return (
+ <div style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: SAFARI_BAR, background: "rgba(246,246,246,0.96)", borderTop: "1px solid #ddd", display: "flex", justifyContent: "center", paddingTop: 10 }}>
+ <div style={{ width: 340, height: 40, borderRadius: 12, background: "#e3e3e6", display: "flex", alignItems: "center", justifyContent: "center", font: `500 16px/1 -apple-system, ${font}`, color: "#111" }}>192.168.1.20</div>
+ </div>
+ );
+}
+
+/** The sign-in page kokon-service serves before the app: the markup of Login.tsx, typed by the frame. */
+function LoginPage({ chars }: { chars: number }) {
+ return (
+ <div className="kokon-window kokon-light in-phone login-page" style={{ width: PHONE_SCREEN.w, height: PHONE_SCREEN.h - SAFARI_BAR }}>
+ <form className="login" onSubmit={(e) => e.preventDefault()}>
+ <KokonMark size={48} />
+ <strong>Sign in to Kokon</strong>
+ <span className="muted">Enter the password set on the computer running Kokon. This browser stays signed in.</span>
+ <input className="input" type="password" placeholder="Password" readOnly value={"x".repeat(chars)} />
+ <button className="btn primary" type="submit" disabled={chars === 0}>
+ Sign in
+ </button>
+ </form>
+ </div>
+ );
+}
+const LOGIN_BUTTON: [number, number] = [195, 394];
+
+function Scan() {
+ const f = useCurrentFrame();
+ const S = SHOT.scan;
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.7} />
+ <IPhone x={PHONE_AT.x} y={PHONE_AT.y} scale={PHONE_AT.s} dark full={<Camera f={f} s={S} />}>
+ <Touch x={195} y={556} at={S + 84} from={S + 70} />
+ </IPhone>
+ <Step n={2} title="On the phone: scan the code" sub="With the camera, like any QR code" at={S + 4} />
+ </AbsoluteFill>
+ );
+}
+
+const LOGIN = (() => {
+ const L = SHOT.login;
+ return { type: L + 14, tap: L + 52, open: L + 56 };
+})();
+function SignIn() {
+ const f = useCurrentFrame();
+ const chars = Math.max(0, Math.min(10, Math.floor((f - LOGIN.type) / 2.4)));
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.7} />
+ <IPhone x={PHONE_AT.x} y={PHONE_AT.y} scale={PHONE_AT.s}>
+ {f < LOGIN.open ? <LoginPage chars={chars} /> : <PhoneApp state={appState({ ...BEACH_DAY, projects: [] })} height={PHONE_SCREEN.h - SAFARI_BAR} />}
+ <SafariBar />
+ <Touch x={LOGIN_BUTTON[0]} y={LOGIN_BUTTON[1]} at={LOGIN.tap} />
+ </IPhone>
+ <Step n={2} title="Sign in once" sub="This browser stays signed in" at={SHOT.login + 2} />
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// Step 3: Share → Add to Home Screen, the Kokon icon on the home screen.
+// ---------------------------------------------------------------------------------------------
+const HOME = (() => {
+ const H = SHOT.home;
+ return { sheet: H + 4, tap: H + 26, screen: H + 40, icon: H + 46, open: H + 98 };
+})();
+/** The share sheet's rows: the one tapped, and plain ones around it. */
+function ShareSheet({ p }: { p: number }) {
+ const row = (icon: ReactNode, text: string, on = false) => (
+ <div key={text} style={{ display: "flex", alignItems: "center", justifyContent: "space-between", padding: "15px 18px", background: on ? "#e6e6ea" : "transparent", borderTop: "1px solid #e2e2e6", font: `400 17px/1 -apple-system, ${font}`, color: "#111" }}>
+ {text}
+ {icon}
+ </div>
+ );
+ return (
+ // Above the app: the composer's send button is sticky with its own z-index.
+ <div style={{ position: "absolute", inset: 0, zIndex: 20, background: `rgba(0,0,0,${0.35 * p})` }}>
+ <div style={{ position: "absolute", left: 8, right: 8, bottom: 8, borderRadius: 18, background: "#f7f7f8", overflow: "hidden", transform: `translateY(${(1 - p) * 420}px)` }}>
+ <div style={{ display: "flex", alignItems: "center", gap: 12, padding: "16px 18px" }}>
+ <Img src={staticFile("img/kokon-icon.png")} style={{ width: 44, height: 44, borderRadius: 10 }} />
+ <div style={{ font: `600 16px/1.3 -apple-system, ${font}`, color: "#111" }}>
+ Kokon
+ <div style={{ fontWeight: 400, fontSize: 14, color: "#777" }}>192.168.1.20</div>
+ </div>
+ </div>
+ {row(<Share size={20} />, "Copy")}
+ {row(<Share size={20} />, "Add to Reading List")}
+ {row(<PlusSquare size={20} />, "Add to Home Screen", true)}
+ {row(<Share size={20} />, "Find on Page")}
+ </div>
+ </div>
+ );
+}
+/** Plain icons around Kokon's: no real apps, only shapes. */
+const TINTS = ["#5b8def", "#f2a94e", "#58c48a", "#e46f6f", "#9b7be8", "#4fc1d6", "#d9d4c7", "#7f8794"];
+function HomeScreen({ f }: { f: number }) {
+ const icon = spring({ frame: f - HOME.icon, fps: FPS, config: { damping: 11, mass: 0.6, stiffness: 170 } });
+ const cell = (i: number, kokon = false) => (
+ <div key={i} style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: 7 }}>
+ {kokon ? (
+ <Img src={staticFile("img/kokon-icon.png")} style={{ width: 62, height: 62, borderRadius: 14, opacity: Math.min(1, icon * 1.6), transform: `scale(${icon})`, boxShadow: "0 6px 16px rgba(0,0,0,0.35)" }} />
+ ) : (
+ <span style={{ width: 62, height: 62, borderRadius: 14, background: `linear-gradient(160deg, ${TINTS[i % TINTS.length]}, ${TINTS[(i + 3) % TINTS.length]})`, opacity: 0.55 }} />
+ )}
+ {kokon ? <span style={{ font: `500 12px/1 -apple-system, ${font}`, color: "#fff", opacity: icon }}>Kokon</span> : <span style={{ width: 40, height: 6, marginTop: 3, borderRadius: 3, background: "rgba(255,255,255,0.35)" }} />}
+ </div>
+ );
+ return (
+ <div style={{ position: "absolute", inset: 0, background: "radial-gradient(ellipse at 30% 20%, #4b3a2a 0%, #1c1a22 55%, #0d0d12 100%)" }}>
+ <div style={{ position: "absolute", left: 26, right: 26, top: 84, display: "grid", gridTemplateColumns: "repeat(4, 1fr)", rowGap: 26 }}>
+ {Array.from({ length: 15 }, (_, i) => cell(i, i === 13))}
+ </div>
+ <div style={{ position: "absolute", left: 14, right: 14, bottom: 22, height: 96, borderRadius: 30, background: "rgba(255,255,255,0.16)", display: "flex", alignItems: "center", justifyContent: "space-around" }}>
+ {[0, 1, 2, 3].map((i) => (
+ <span key={i} style={{ width: 62, height: 62, borderRadius: 14, background: `linear-gradient(160deg, ${TINTS[(i + 4) % 8]}, ${TINTS[(i + 6) % 8]})`, opacity: 0.55 }} />
+ ))}
+ </div>
+ </div>
+ );
+}
+/** Kokon's icon on the home screen (cell 13 of the grid: row 4, column 2), in screen px. */
+const KOKON_ICON: [number, number] = [26 + (338 / 4) * 1.5, 84 + 3 * (62 + 7 + 9 + 26) + 31];
+
+function AddHome() {
+ const f = useCurrentFrame();
+ const onHome = f >= HOME.screen;
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.7} />
+ <IPhone x={PHONE_AT.x} y={PHONE_AT.y} scale={PHONE_AT.s} dark={onHome} full={onHome ? <HomeScreen f={f} /> : undefined}>
+ {!onHome && (
+ <>
+ <PhoneApp state={appState({ ...BEACH_DAY, projects: [] })} height={PHONE_SCREEN.h - SAFARI_BAR} />
+ <SafariBar />
+ <ShareSheet p={prog(f, HOME.sheet, 10)} />
+ {/* the sheet's second row from the bottom: Add to Home Screen (rows 48 px, the sheet 8 px up) */}
+ <Touch x={195} y={PHONE_SCREEN.h - 8 - 48 - 24} at={HOME.tap} />
+ </>
+ )}
+ </IPhone>
+ {onHome && (
+ <div style={{ position: "absolute", left: PHONE_AT.x + 19, top: PHONE_AT.y + 19 }}>
+ <Touch x={KOKON_ICON[0]} y={KOKON_ICON[1]} at={HOME.open} from={HOME.open - 12} />
+ </div>
+ )}
+ <Step n={3} title="Add it to your home screen" sub="Share → Add to Home Screen, on iPhone or Android" at={SHOT.home + 2} />
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 4. Using it: + a photo, the prompt, Send. The photo runs along the link to the computer (its
+// fans speed up, the GPU glows), the result runs back, Download.
+// ---------------------------------------------------------------------------------------------
+const USE_PHONE = { x: 200, y: 96, s: 1.02 };
+const USE_PC = { x: 1440, y: 250, s: 1.5 };
+/** The link from the phone's side to the computer's (frame px). */
+const USE_LINK: Curve = [660, 470, 900, 300, 1180, 330, 1428, 560];
+/** The composer's + and Send, and Download under the result (phone px, Probe011). */
+const ADD: [number, number] = [39, 742];
+const SEND: [number, number] = [354, 742];
+const DOWNLOAD: [number, number] = [256, 462];
+/** What the phone shows once Download is tapped: a banner with the photo, as for any download. */
+function Downloaded({ f }: { f: number }) {
+ const p = prog(f, USE.download + 4, 10);
+ if (p <= 0) return null;
+ return (
+ <div style={{ position: "absolute", left: 10, right: 10, top: 6, zIndex: 40, display: "flex", alignItems: "center", gap: 12, padding: "10px 12px", borderRadius: 18, background: "rgba(250,250,250,0.97)", boxShadow: "0 10px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06)", font: `400 15px/1.3 -apple-system, ${font}`, color: "#111", opacity: p, transform: `translateY(${(1 - p) * -40}px)` }}>
+ <Img src={staticFile("thumb/beach-flamingo.jpg")} style={{ width: 40, height: 40, borderRadius: 9, objectFit: "cover" }} />
+ <div style={{ flex: 1 }}>
+ <div style={{ fontWeight: 600 }}>Downloaded</div>
+ <div style={{ color: "#666", fontSize: 13.5 }}>beach-flamingo.png</div>
+ </div>
+ <span style={{ width: 26, height: 26, borderRadius: "50%", background: "#1a7f37", color: "#fff", display: "flex", alignItems: "center", justifyContent: "center" }}>
+ <Check size={17} strokeWidth={3} />
+ </span>
+ </div>
+ );
+}
+
+/** The computer's work: 0 idle, 1 busy (fans fast, warm glow). */
+const busy = (i: number) => prog(i, USE.job - 8, 20, inOut) * (1 - prog(i, USE.back, 30, inOut));
+
+function UsePhone() {
+ const f = useCurrentFrame();
+ const base = appState({ ...BEACH_DAY, projects: [{ ...BEACH_DAY.projects[0], title: "Beach day" }] });
+ let state: State;
+ let card: CardMotion | undefined;
+ if (f < USE.photo) state = base;
+ else if (f < USE.send) state = appState({ ...BEACH_DAY, composer: { ...base.composer, refs: [PICKED], prompt: f < USE.type ? "" : typed(PROMPT_011, f, USE.type, USE.cps) } });
+ else if (f < USE.result) {
+ const j = jobItem("j-phone", "edit", PROMPT_011, "beach-flamingo", undefined, Math.min(8, Math.floor((f - USE.job) / 12)));
+ state = appState({ ...BEACH_DAY, session: [j.item], selected: "j-phone", jobs: { "j-phone": j.job } });
+ card = { t: Math.max(0, (f - USE.send) / FPS), pctAt: (t) => Math.min(99, Math.max(0, (t - 0.7) / 3.2) * 100) };
+ } else state = appState({ ...BEACH_DAY, session: [genItem(FLAMINGO)], selected: "beach-flamingo", composer: { ...base.composer, refs: [ref("beach-flamingo")] } });
+ return (
+ <>
+ <PhoneApp state={state} card={card} />
+ <Touch x={ADD[0]} y={ADD[1]} at={USE.plus} />
+ <Touch x={SEND[0]} y={SEND[1]} at={USE.send} />
+ <Touch x={DOWNLOAD[0]} y={DOWNLOAD[1]} at={USE.download} />
+ <Downloaded f={f} />
+ </>
+ );
+}
+
+function Use() {
+ const f = useCurrentFrame();
+ const angle = fanAngle(f, (i) => 0.42 + 1.5 * busy(i));
+ const b = busy(f);
+ const out = (f - USE.out) / 22;
+ const back = (f - USE.back) / 22;
+ const hot = Math.max(out > 0 && out < 1 ? 1 : 0, back > 0 && back < 1 ? 1 : 0, b * 0.5);
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.6} />
+ <svg width={1920} height={1080} style={{ position: "absolute", inset: 0, overflow: "visible" }}>
+ <Link id="use" c={USE_LINK} f={f} hot={hot} width={3} />
+ </svg>
+ <Pc angle={angle} glow={0.6 + 0.4 * b} style={{ left: 0, top: 0, transform: `translate(${USE_PC.x}px, ${USE_PC.y}px) scale(${USE_PC.s})`, transformOrigin: "top left" }} />
+ <IPhone x={USE_PHONE.x} y={USE_PHONE.y} scale={USE_PHONE.s}>
+ <UsePhone />
+ </IPhone>
+ <Packet c={USE_LINK} t={out} src="thumb/beach.jpg" size={70} />
+ <Packet c={USE_LINK} t={1 - back} src="thumb/beach-flamingo.jpg" size={70} />
+ <NetPill x={880} y={292}>
+ <b style={{ color: "#f2f1ed", fontWeight: 600 }}>Home Wi-Fi</b>
+ </NetPill>
+ <Caption title="Pick a photo, describe the change." start={SHOT.use + 12} end={USE.out} x={760} y={92} size={52} maxWidth={1100} />
+ <Caption title="Your PC does the work and sends it back." sub="It's saved in the computer's gallery. Download it on the phone." start={USE.out + 4} end={SHOT.safe} x={760} y={92} size={52} maxWidth={1100} />
+ <div style={{ position: "absolute", left: USE_PC.x - 30, top: USE_PC.y + 430 * USE_PC.s + 26, width: 220 * USE_PC.s + 60, textAlign: "center", fontFamily: font, fontSize: 24, color: "rgba(244,244,242,0.7)", opacity: prog(f, USE.job - 8, 12) * (1 - prog(f, USE.back, 12)) }}>
+ Making the image…
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 5. Safe by default: the padlock and what it means; away from home, a VPN, never an open port.
+// ---------------------------------------------------------------------------------------------
+function Padlock({ closed, size = 260 }: { closed: number; size?: number }) {
+ const lift = (1 - closed) * 46;
+ return (
+ <svg width={size} height={size * 1.2} viewBox="0 0 200 240" style={{ overflow: "visible", filter: `drop-shadow(0 0 ${40 * closed}px rgba(255,214,140,${0.35 * closed}))` }}>
+ <path d={`M 50 ${110 - lift} V ${70 - lift} a 50 50 0 0 1 100 0 V ${110 - lift}`} fill="none" stroke={PAPER} strokeWidth={22} strokeLinecap="round" transform={closed < 1 ? `rotate(${-(1 - closed) * 0} 150 110)` : undefined} />
+ <rect x={20} y={104} width={160} height={124} rx={26} fill={PAPER} />
+ <circle cx={100} cy={156} r={14} fill="#0d0d0d" />
+ <rect x={93} y={160} width={14} height={34} rx={7} fill="#0d0d0d" />
+ </svg>
+ );
+}
+
+function Safe() {
+ const f = useCurrentFrame();
+ const S = SHOT.safe;
+ const lockAt = S + 26;
+ const closed = prog(f, lockAt - 6, 8, inOut);
+ const lines = [
+ { t: "Off until you set a password", s: "Nothing listens on the network before that.", at: S + 8 },
+ { t: "5 wrong tries, and that device waits", s: "Each browser signs in once.", at: S + 38 },
+ { t: "Plain HTTP on your home network", s: "Not encrypted: use a network you trust.", at: S + 62 },
+ ];
+ return (
+ <AbsoluteFill style={{ fontFamily: font }}>
+ <Backdrop glow={0.6} />
+ <div style={{ position: "absolute", left: 300, top: 360 }}>
+ <Padlock closed={closed} />
+ </div>
+ <div style={{ position: "absolute", left: 720, top: 300, display: "flex", flexDirection: "column", gap: 44, color: "#f4f4f2" }}>
+ {lines.map((l) => {
+ const p = prog(f, l.at, 18);
+ return (
+ <div key={l.t} style={rise(p)}>
+ <div style={{ fontSize: 58, fontWeight: 650, letterSpacing: "-0.035em", lineHeight: 1.05 }}>{l.t}</div>
+ <div style={{ fontSize: 26, color: "rgba(244,244,242,0.62)", marginTop: 10 }}>{l.s}</div>
+ </div>
+ );
+ })}
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+/** A house outline round the computer at home. */
+function House({ x, y, w, h }: { x: number; y: number; w: number; h: number }) {
+ return (
+ <svg width={w + 40} height={h + 40} viewBox={`-20 -20 ${w + 40} ${h + 40}`} style={{ position: "absolute", left: x - 20, top: y - 20, overflow: "visible" }}>
+ <path d={`M 0 ${h * 0.34} L ${w / 2} 0 L ${w} ${h * 0.34} V ${h} H 0 Z`} fill="rgba(255,255,255,0.03)" stroke="rgba(244,244,242,0.4)" strokeWidth={3} strokeLinejoin="round" />
+ </svg>
+ );
+}
+
+/** Seconds into line 5's second sentence where words start (Whisper). */
+const AWAY_WORDS = { tailscale: 1.16, never: 3.02 };
+function Away() {
+ const f = useCurrentFrame();
+ const A = SHOT.away;
+ const s1 = said(5, 1);
+ const tunnel = prog(f, s1 + Math.round(AWAY_WORDS.tailscale * FPS) - 10, 22, inOut);
+ const never = s1 + Math.round(AWAY_WORDS.never * FPS);
+ const cross = prog(f, never, 10, inOut);
+ const router = prog(f, never - 22, 14);
+ const angle = fanAngle(f, () => 0.42);
+ const y = 470;
+ const x0 = 420;
+ const x1 = 1360;
+ const tx = x0 + (x1 - x0) * tunnel;
+ return (
+ <AbsoluteFill style={{ fontFamily: font, color: "#f4f4f2" }}>
+ <Backdrop glow={0.6} />
+ <div style={{ position: "absolute", left: 0, right: 0, top: 70, textAlign: "center", fontSize: 64, fontWeight: 660, letterSpacing: "-0.04em", ...rise(prog(f, A + 2, 16)) }}>Away from home</div>
+ {/* the phone, out */}
+ <IPhone x={250} y={262} scale={0.42}>
+ <PhoneApp state={resultState()} />
+ </IPhone>
+ <div style={{ position: "absolute", left: 200, width: 280, top: 640, textAlign: "center", fontSize: 26, color: "rgba(244,244,242,0.7)" }}>Your phone, out</div>
+ {/* the encrypted tunnel */}
+ <div style={{ position: "absolute", left: x0, top: y - 26, width: tx - x0, height: 52, borderRadius: 26, background: "rgba(255,214,140,0.1)", boxShadow: `inset 0 0 0 2px rgba(255,214,140,0.7), 0 0 40px rgba(255,214,140,${0.25 * tunnel})` }} />
+ <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}>
+ <Link id="tunnel" c={[x0 + 20, y, x0 + 300, y, x1 - 300, y, x1 - 20, y]} f={f} p={tunnel} hot={0.6} />
+ </svg>
+ <div style={{ position: "absolute", left: (x0 + x1) / 2 - 320, width: 640, top: y + 46, textAlign: "center", ...rise(prog(f, s1 + Math.round(AWAY_WORDS.tailscale * FPS), 16)) }}>
+ <div style={{ display: "inline-flex", alignItems: "center", gap: 12, fontSize: 36, fontWeight: 650, letterSpacing: "-0.02em" }}>
+ <Lock size={30} />
+ Tailscale or another VPN
+ </div>
+ <div style={{ fontSize: 24, color: "rgba(244,244,242,0.62)", marginTop: 6 }}>An encrypted link to your home</div>
+ </div>
+ {/* home */}
+ <House x={1380} y={250} w={330} h={430} />
+ <Pc angle={angle} glow={0.6} style={{ left: 0, top: 0, transform: "translate(1462px, 360px) scale(0.72)", transformOrigin: "top left" }} />
+ <div style={{ position: "absolute", left: 1380, width: 330, top: 700, textAlign: "center", fontSize: 26, color: "rgba(244,244,242,0.7)" }}>Kokon at home</div>
+ {/* never an open port on the router */}
+ <div style={{ position: "absolute", left: 0, right: 0, top: 790, display: "flex", justifyContent: "center", ...rise(router) }}>
+ <div style={{ position: "relative", display: "flex", alignItems: "center", gap: 18, padding: "16px 30px", borderRadius: 18, background: "rgba(255,255,255,0.05)", boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.12)" }}>
+ <svg width={58} height={40} viewBox="0 0 58 40">
+ <rect x={2} y={16} width={54} height={22} rx={6} fill="none" stroke="#f4f4f2" strokeWidth={3} />
+ <path d="M14 16 L10 2 M44 16 L48 2" stroke="#f4f4f2" strokeWidth={3} strokeLinecap="round" />
+ <circle cx={14} cy={27} r={3} fill="#f4f4f2" />
+ <circle cx={24} cy={27} r={3} fill="#f4f4f2" />
+ </svg>
+ <span style={{ fontSize: 36, fontWeight: 600, letterSpacing: "-0.02em" }}>An open port on the router</span>
+ <span style={{ position: "absolute", left: 92, right: 24, top: "50%", height: 4, marginTop: -2, borderRadius: 2, background: "#ff6b6b", transform: `scaleX(${cross})`, transformOrigin: "left" }} />
+ <span style={{ display: "flex", alignItems: "center", justifyContent: "center", width: 44, height: 44, borderRadius: "50%", background: "#ff6b6b", color: "#1a0d0d", opacity: cross, transform: `scale(${0.6 + 0.4 * cross})` }}>
+ <X size={28} strokeWidth={3} />
+ </span>
+ </div>
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 6. A home server: the box, a terminal with the Docker commands (docs/docker.md), the service's own
+// messages (crates/qls-service), the GPU lighting up when the container starts.
+// ---------------------------------------------------------------------------------------------
+type Line = { text: string; at: number; cmd?: boolean; cps?: number; dim?: boolean };
+const SERVER = (() => {
+ const V = SHOT.server;
+ const oneFile = said(6, 2);
+ const lines: Line[] = [
+ { text: "curl -fsSLO https://raw.githubusercontent.com/GabrieleLozupone/kokon/master/docker/compose.yaml", at: V + 44, cmd: true, cps: 110 },
+ { text: "docker compose up -d", at: oneFile + 18, cmd: true, cps: 40 },
+ { text: " ✔ Container kokon Started", at: 0, dim: true },
+ { text: "docker exec -it kokon kokon-service --set-password", at: 0, cmd: true, cps: 60 },
+ { text: "Password for other devices: ", at: 0 },
+ { text: "Again: ", at: 0 },
+ { text: "Password saved. Browsers sign in again; a running kokon-service uses it within a few seconds.", at: 0, dim: true },
+ { text: "docker logs kokon", at: 0, cmd: true, cps: 40 },
+ { text: "Kokon 0.11.0 is running.", at: 0 },
+ { text: " Open in a browser: http://localhost:39152 on the computer running Docker, or http://<its address>:39152 from other devices (password required)", at: 0 },
+ ];
+ const done = (l: Line) => (l.cmd ? typingDone(l.text, l.at, l.cps) : l.at);
+ lines[2].at = done(lines[1]) + 10;
+ lines[3].at = lines[2].at + 14;
+ lines[4].at = done(lines[3]) + 8;
+ lines[5].at = lines[4].at + 14;
+ lines[6].at = lines[5].at + 12;
+ lines[7].at = lines[6].at + 16;
+ lines[8].at = done(lines[7]) + 8;
+ lines[9].at = lines[8].at + 4;
+ return { lines, started: lines[2].at, done };
+})();
+
+function Terminal({ f }: { f: number }) {
+ const shown = SERVER.lines.filter((l) => f >= l.at);
+ const typing = shown.find((l) => l.cmd && f < SERVER.done(l));
+ const badge = (path: string, color: string, text: string) => (
+ <span style={{ display: "inline-flex", alignItems: "center", gap: 9, padding: "6px 14px 6px 10px", borderRadius: 999, background: "rgba(255,255,255,0.07)", boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.1)", fontFamily: font, fontSize: 18, fontWeight: 600, color: "#e9e9e7" }}>
+ <svg width={22} height={22} viewBox="0 0 24 24">
+ <path d={path} fill={color} />
+ </svg>
+ {text}
+ </span>
+ );
+ return (
+ <div style={{ position: "absolute", left: 640, top: 250, width: 1140, height: 600, borderRadius: 18, background: "#0c0c0e", boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.12), 0 50px 120px rgba(0,0,0,0.6)", overflow: "hidden" }}>
+ <div style={{ height: 56, display: "flex", alignItems: "center", gap: 9, padding: "0 18px", background: "#18181b", borderBottom: "1px solid rgba(255,255,255,0.08)" }}>
+ {["#ff5f57", "#febc2e", "#28c840"].map((c) => (
+ <i key={c} style={{ display: "block", width: 13, height: 13, borderRadius: "50%", background: c }} />
+ ))}
+ <span style={{ marginLeft: 16, fontFamily: font, fontSize: 18, color: "rgba(233,233,231,0.6)", flex: 1 }}>you@home-server: ~/kokon</span>
+ {badge(siDocker.path, `#${siDocker.hex}`, "Docker")}
+ {badge(siNvidia.path, `#${siNvidia.hex}`, "NVIDIA · CUDA")}
+ </div>
+ <div style={{ padding: "22px 28px", fontFamily: mono, fontSize: 18.5, lineHeight: 1.6, color: "#e9e9e7", whiteSpace: "pre-wrap", overflowWrap: "anywhere" }}>
+ {shown.map((l, i) => (
+ <div key={i} style={{ color: l.dim ? "rgba(233,233,231,0.58)" : undefined }}>
+ {l.cmd && <span style={{ color: WARM }}>$ </span>}
+ {l.cmd ? typed(l.text, f, l.at, l.cps) : l.text}
+ {l === typing && <span style={{ display: "inline-block", width: 10, height: 21, marginLeft: 2, verticalAlign: "-4px", background: "#e9e9e7" }} />}
+ </div>
+ ))}
+ {!typing && Math.floor(f / 16) % 2 === 0 && (
+ <div>
+ <span style={{ color: WARM }}>$ </span>
+ <span style={{ display: "inline-block", width: 10, height: 21, verticalAlign: "-4px", background: "#e9e9e7" }} />
+ </div>
+ )}
+ </div>
+ </div>
+ );
+}
+
+function Server() {
+ const f = useCurrentFrame();
+ const V = SHOT.server;
+ const up = (i: number) => prog(i, SERVER.started, 30, inOut);
+ const angle = fanAngle(f, (i) => 0.12 + 0.5 * up(i));
+ return (
+ <AbsoluteFill style={{ fontFamily: font, color: "#f4f4f2" }}>
+ <Backdrop glow={0.5} />
+ <div style={{ position: "absolute", left: 140, top: 66, ...rise(prog(f, V + 4, 16)) }}>
+ <div style={{ fontSize: 64, fontWeight: 660, letterSpacing: "-0.04em" }}>Have a home server? Run Kokon on it.</div>
+ <div style={{ display: "flex", gap: 14, marginTop: 18, fontSize: 24, color: "rgba(244,244,242,0.72)" }}>
+ {[
+ [siLinux.path, "Linux: kokon-service"],
+ [siDocker.path, "Docker: NVIDIA cards (CUDA)"],
+ ].map(([p, t]) => (
+ <span key={t} style={{ display: "inline-flex", alignItems: "center", gap: 10, padding: "8px 18px 8px 12px", borderRadius: 999, background: "rgba(255,255,255,0.06)", boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.1)" }}>
+ <svg width={22} height={22} viewBox="0 0 24 24">
+ <path d={p} fill="rgba(244,244,242,0.85)" />
+ </svg>
+ {t}
+ </span>
+ ))}
+ </div>
+ </div>
+ <Pc angle={angle} glow={0.12 + 0.88 * up(f)} on={1} style={{ left: 0, top: 0, transform: "translate(200px, 300px) scale(1.2)", transformOrigin: "top left" }} />
+ <div style={{ position: "absolute", left: 160, width: 344, top: 840, textAlign: "center", fontSize: 24, color: "rgba(244,244,242,0.62)" }}>Your home server</div>
+ <Terminal f={f} />
+ </AbsoluteFill>
+ );
+}
+
+// ---------------------------------------------------------------------------------------------
+// 7. Close: the whole scene, "Your GPU, on every screen."; the end card with the guide's QR.
+// ---------------------------------------------------------------------------------------------
+function Close() {
+ const f = useCurrentFrame();
+ const angle = fanAngle(f, () => 0.42);
+ return (
+ <AbsoluteFill>
+ <Backdrop glow={0.6} />
+ <div style={{ position: "absolute", left: 206, top: 40, transform: "scale(1.3)", transformOrigin: "top left" }}>
+ <HomeScene f={f} angle={angle} glow={0.7} phoneScreen={<PhoneApp state={resultState()} />} />
+ </div>
+ <Caption title="Kokon 0.11" start={said(7, 0) - 2} end={said(7, 1) - 2} align="center" y={930} size={60} />
+ <Caption title="Your GPU, on every screen." start={said(7, 1)} end={SHOT.end} align="center" y={930} size={60} />
+ </AbsoluteFill>
+ );
+}
+
+function End() {
+ const f = useCurrentFrame();
+ const E = SHOT.end;
+ const a = prog(f, E, 26);
+ const b = prog(f, E + 12, 22);
+ const qr = prog(f, E + 18, 24);
+ const free = prog(f, E + 30, 22);
+ const fade = prog(f, UPDATE011_FRAMES - 20, 20, inOut);
+ return (
+ <AbsoluteFill style={{ fontFamily: font, background: "#050505", opacity: 1 - fade }}>
+ <div style={{ position: "absolute", inset: 0, background: "radial-gradient(circle at 34% 44%, rgba(247,246,242,0.06) 0%, transparent 45%)" }} />
+ <div style={{ position: "absolute", left: 180, top: 290, color: PAPER }}>
+ <div style={{ display: "flex", alignItems: "center", gap: 30, ...rise(a) }}>
+ <Mark size={104} color={PAPER} />
+ <span style={{ fontSize: 116, fontWeight: 620, letterSpacing: "-0.045em", lineHeight: 1 }}>Kokon</span>
+ <span style={{ padding: "8px 20px 11px", borderRadius: 999, border: `3px solid ${PAPER}`, fontSize: 56, fontWeight: 600, letterSpacing: "-0.03em", lineHeight: 1 }}>0.11</span>
+ </div>
+ <div style={{ marginTop: 40, fontSize: 40, color: "rgba(247,246,242,0.85)", letterSpacing: "-0.02em", ...rise(b) }}>Your GPU, on every screen.</div>
+ <div style={{ marginTop: 14, fontSize: 28, color: "rgba(247,246,242,0.6)", ...rise(b) }}>On a computer with a 12 GB GPU or Apple Silicon</div>
+ <div style={{ marginTop: 40, display: "inline-flex", alignItems: "center", padding: "16px 34px", borderRadius: 999, background: PAPER, color: "#0d0d0d", fontSize: 34, fontWeight: 650, letterSpacing: "-0.02em", ...rise(free) }}>Free and open source · kokon.app</div>
+ </div>
+ <div style={{ position: "absolute", left: 1240, top: 230, width: 500, padding: 34, borderRadius: 30, background: "#fff", color: "#0d0d0d", display: "flex", flexDirection: "column", alignItems: "center", gap: 18, boxShadow: "0 40px 100px rgba(0,0,0,0.5)", ...rise(qr) }}>
+ <Qr text={GUIDE} size={360} />
+ <div style={{ fontSize: 32, fontWeight: 650, letterSpacing: "-0.02em" }}>Scan for the setup guide</div>
+ <div style={{ fontSize: 24, color: "#555", marginTop: -8 }}>kokon.app/self-hosted</div>
+ </div>
+ </AbsoluteFill>
+ );
+}
+
+/** Every effect, on the main timeline (the shots unmount when they end, a sound must not). */
+function Sounds() {
+ const s0 = said(2, 0);
+ const typeEnd = typingDone(PROMPT_011, USE.type, USE.cps);
+ return (
+ <>
+ <Sfx name="slider" at={30} gain={0.8} />
+ <Sfx name="hit" at={22} gain={0.45} />
+ <Sfx name="power" at={s0 + 2} />
+ <Sfx name="pop" at={said(2, 2)} />
+ <Sfx name="pop" at={said(2, 2) + 14} gain={0.8} />
+ {/* step 1 */}
+ <Sfx name="click" at={PW.field} />
+ <Sfx name="typing" at={PW.type} dur={24} />
+ <Sfx name="click" at={PW.button} />
+ <Sfx name="reveal" at={PW.on + 2} variant={0} gain={0.7} />
+ {/* step 2 */}
+ <Sfx name="click" at={SHOT.scan + 84} gain={0.7} />
+ <Sfx name="typing" at={LOGIN.type} dur={24} gain={0.7} />
+ <Sfx name="click" at={LOGIN.tap} gain={0.7} />
+ {/* step 3 */}
+ <Sfx name="click" at={HOME.tap} gain={0.7} />
+ <Sfx name="pop" at={HOME.icon} />
+ <Sfx name="click" at={HOME.open} gain={0.7} />
+ {/* using it */}
+ <Sfx name="click" at={USE.plus} gain={0.7} />
+ <Sfx name="pop" at={USE.photo} gain={0.7} />
+ <Sfx name="typing" at={USE.type} dur={typeEnd - USE.type} gain={0.8} />
+ <Send at={USE.send} />
+ <Sfx name="travel" at={USE.out} />
+ <Sfx name="spinup" at={USE.job - 10} />
+ <Sfx name="travel" at={USE.back} />
+ <Sfx name="reveal" at={USE.result} variant={1} />
+ <Sfx name="click" at={USE.download} gain={0.7} />
+ <Sfx name="pop" at={USE.download + 4} gain={0.7} />
+ {/* safe by default */}
+ <Sfx name="lock" at={SHOT.safe + 24} />
+ <Sfx name="whoosh" at={SHOT.away} gain={0.5} />
+ {/* server */}
+ {SERVER.lines.filter((l) => l.cmd).map((l) => (
+ <Sfx key={l.text} name="typing" at={l.at} dur={SERVER.done(l) - l.at} gain={0.7} />
+ ))}
+ <Sfx name="spinup" at={SERVER.started - 4} gain={0.8} />
+ {/* close */}
+ <Sfx name="hit" at={SHOT.end} gain={0.4} />
+ </>
+ );
+}
+
+/** The music stays at one level all through (a background that never changes), low enough
+ * under the voice without ducking: about the level the ducked music had under the 0.10 voice. */
+const MUSIC_GAIN = 0.45;
+
+export function Update011() {
+ return (
+ <AbsoluteFill style={{ background: "#050505" }}>
+ <Shot from={SHOT.hook} to={SHOT.idea}>
+ <Hook />
+ </Shot>
+ <Shot from={SHOT.idea} to={SHOT.password}>
+ <Idea />
+ </Shot>
+ <Shot from={SHOT.password} to={SHOT.scan}>
+ <Password />
+ </Shot>
+ <Shot from={SHOT.scan} to={SHOT.login}>
+ <Scan />
+ </Shot>
+ <Shot from={SHOT.login} to={SHOT.home}>
+ <SignIn />
+ </Shot>
+ <Shot from={SHOT.home} to={SHOT.use}>
+ <AddHome />
+ </Shot>
+ <Shot from={SHOT.use} to={SHOT.safe}>
+ <Use />
+ </Shot>
+ <Shot from={SHOT.safe} to={SHOT.away}>
+ <Safe />
+ </Shot>
+ <Shot from={SHOT.away} to={SHOT.server}>
+ <Away />
+ </Shot>
+ <Shot from={SHOT.server} to={SHOT.scene}>
+ <Server />
+ </Shot>
+ <Shot from={SHOT.scene} to={SHOT.end}>
+ <Close />
+ </Shot>
+ <Shot from={SHOT.end} to={UPDATE011_FRAMES}>
+ <End />
+ </Shot>
+ <Sounds />
+ <Voice cues={CUES_011} />
+ <Music frames={UPDATE011_FRAMES} cues={[]} gain={() => MUSIC_GAIN} src={MUSIC.src} from={MUSIC.from} fadeOut={MUSIC.fade} />
+ </AbsoluteFill>
+ );
+}