feat: video films for social media, with the skill to make more
Adds apps/video, a standalone Remotion package (not part of the pnpm workspace, so it never reaches the web build or the Docker image). It renders six looping films, one per service, in German and English, as 4:5 for LinkedIn and 16:9 for YouTube and ads, together with the text to post and an overview page. Each film is one continuous shot: close on something abstract, the camera pulls back to show what it really is, the form changes, and the picture folds back into its opening. The slide deck code from the earlier attempts is still in the package and no longer used. Also adds the Google Ads concept, brings the relaunch concept in line with the site as built, and a project skill that describes how to make further films. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Pure, frame-driven binary effects. Remotion renders frame by frame, so nothing here
|
||||
* uses timers or randomness: the same inputs always give the same output.
|
||||
*/
|
||||
|
||||
const HASH_MULTIPLIER = 2654435761;
|
||||
const TICK_MULTIPLIER = 40503;
|
||||
const LETTER_OR_DIGIT = /[A-Za-z0-9]/;
|
||||
|
||||
const clamp01 = (n: number): number => Math.min(1, Math.max(0, n));
|
||||
|
||||
/** A stable pseudo-random bit for a position at a given tick. */
|
||||
const bitAt = (index: number, tick: number): "0" | "1" => {
|
||||
const hash = Math.imul(index + 1, HASH_MULTIPLIER) ^ Math.imul(tick + 1, TICK_MULTIPLIER);
|
||||
return ((hash >>> 7) & 1) === 0 ? "0" : "1";
|
||||
};
|
||||
|
||||
/**
|
||||
* Text resolving from digits, left to right. Letters and numbers not yet reached show
|
||||
* as 0 or 1; spaces and punctuation stay put so the shape of the text is readable.
|
||||
*/
|
||||
export const decodeText = (text: string, progress: number, tick: number): string => {
|
||||
const chars = Array.from(text);
|
||||
const revealed = Math.floor(clamp01(progress) * chars.length);
|
||||
return chars
|
||||
.map((char, index) =>
|
||||
index < revealed || !LETTER_OR_DIGIT.test(char) ? char : bitAt(index, tick),
|
||||
)
|
||||
.join("");
|
||||
};
|
||||
|
||||
/** A string of `length` binary digits for a given tick. */
|
||||
export const bitString = (length: number, tick: number): string =>
|
||||
Array.from({ length }, (_, index) => bitAt(index, tick)).join("");
|
||||
Reference in New Issue
Block a user