E1 · Install
10 minClone the course and run the "instalar o kit" block.
Done when: The output shows npm ci: 0, chromium: 0 and Version 1.64.0.
Lesson 1 · 15 min
A cinematic site looks like a film that moves with the scroll. Underneath, there's no 3D and no video playing: there are frames from a clip drawn on a canvas, one per scroll position. That's heavy. In this lesson you run the kit's example page, measure how much it weighs for each visitor, and decide, with a number, whether your product calls for one.
Start the lesson
Goal: run the kit's example site, measure its weight, and decide, with a budget in MB, whether your product calls for one.
Click each step. The loop back is the question that decides everything: how much does this weigh?
The "3D" effect comes from the clip, not from a 3D engine. Depth drawn in code is lesson 4.
The film costs the visitor bandwidth and costs you time. It pays off in only a few cases.
A product with a shape, material, or mechanism that is easier to understand in motion: a lens, a watch, a machine part, a dish.
A launch page, which the visitor opens once and looks at calmly.
A page people read in a hurry: service, pricing, article, dashboard. The film delays what they came for.
When the product doesn't change at all as it rotates or comes closer: well-written text sells better.
The two INEMA skills (lessons 3 and 6) have a code-only path: shapes, light, and text animated by scrolling, with no video generation. Zero credits.
This entire course runs that way: the rehearsal clips are made from a photo with ffmpeg.
Clips from your generator become frames. How much it costs depends on the generator: the site-movimento pilot spent 300 Kling 3.0 credits (kling-video-v3_0) at 720p (project README, 10/18/2026).
Which generator and which version: course 1 of the program.
The kit lives inside this course's repository. Clone it once and install; it uses Node 20.10+, ffmpeg, and Playwright's Chromium.
cd ~/projetos && git clone https://github.com/inematds/formacao-cinema-ia-sites-v72
cd ~/projetos/formacao-cinema-ia-sites-v72/kit
npm ci --no-audit --no-fund > ${TMPDIR:-/tmp}/npm-sites.log 2>&1; echo "npm ci: $?"
npx playwright install chromium > ${TMPDIR:-/tmp}/pw-sites.log 2>&1; echo "chromium: $?"
npx playwright --version
npm ls --depth=0 | tail -2
ffmpeg -version | head -1 | cut -d' ' -f1-3npm ci: 0 chromium: 0 Version 1.64.0 └── three@0.186.1 ffmpeg version 6.1.1-3ubuntu5
Playwright is pinned to 1.64.0 and three to 0.186.1 in the kit's package.json: what you install is what was tested.
The kit's server picks a free port and writes the URL to a file; the loop waits for the URL to respond before testing.
K=~/projetos/formacao-cinema-ia-sites-v72/kit
E=${TMPDIR:-/tmp}/ensaio-sites/a1; rm -rf "$E"; mkdir -p "$E"
node "$K/scripts/servir.mjs" "$K/site" > "$E/url.txt" & S=$!
until U=$(cat "$E/url.txt") && [ -n "$U" ] && curl -s -o /dev/null "$U"; do sleep 0.3; done
node "$K/scripts/verificar.mjs" "$U"; echo "saída: $?"
kill $SChromium 156.0.8078.4 (Playwright 1.64.0) · 1366×768 quadros: 144 (frames/) rolagem 0% → quadro 0 · tela pintada rolagem 50% → quadro 72 · tela pintada rolagem 100% → quadro 143 · tela pintada transbordo horizontal: não OK: 3 de 3 posições saída: 0
The checker opens the page at three scroll points and verifies the frame and the screen. To look with your own eyes, run only the 1st line of the server and open the URL in your browser.
Each visitor downloads just one film: the horizontal one on a computer or the vertical one on a phone held upright.
K=~/projetos/formacao-cinema-ia-sites-v72/kit python3 "$K/scripts/peso.py" "$K/site" --orcamento 6 --inicial 0.5; echo "saída: $?"
K=~/projetos/formacao-cinema-ia-sites-v72/kit
python3 "$K/scripts/peso.py" "$K/site" --orcamento 2 | tail -1; echo "saída: ${PIPESTATUS[0]}"PESO: quadros-v 3,49 · quadros 1,50 · js 0,02 · html/css 0,01 (MB) computador: tudo 1,54 MB · primeira pintura 0,05 MB · rascunho (1 em 8) 0,22 MB celular: tudo 3,52 MB · primeira pintura 0,06 MB · rascunho (1 em 8) 0,47 MB primeira pintura 0,06 MB · teto 0,5 MB: DENTRO visitante mais pesado 3,52 MB · orçamento 6,0 MB: DENTRO do orçamento saída: 0
First paint is a ceiling on what arrives before the first frame: it counts every file in the folder that is not a frame. The phone weighs more than the desktop here: lesson 7 fixes that.
visitante mais pesado 3,52 MB · orçamento 2,0 MB: ACIMA do orçamento saída: 1
With a 2 MB budget, the phone goes over the ceiling and the script exits with 1. This is the code an automatic gate reads.
From the installed kit to your written decision.
Clone the course and run the "instalar o kit" block.
Done when: The output shows npm ci: 0, chromium: 0 and Version 1.64.0.
Run the "servir e verificar a página do kit" block. Then open the URL in your browser and scroll the page.
Done when: OK: 3 de 3 posições and saída: 0.
Pick one of your products. In a file called decisao.txt, write three lines: Produto: …, Visitante mais pesado: … MB (the kit's number, or your own if you already have frames) and Decisão: … (movie, code only, or a regular page, with the reason).
Done when: grep -c -E "^(Produto|Visitante mais pesado|Decisão):" decisao.txt returns 3.
The explanation appears after you answer.
Question 1 of 4
Why is the scroll film drawn frame by frame on a canvas, instead of using a video and currentTime?
Question 2 of 4
peso.py says "computador 1,54 MB · celular 3,52 MB". Which number goes into the budget?
Question 3 of 4
For which of these pages is the scroll film least likely to be worth the weight?
Question 4 of 4
What is the "first paint" in peso.py?
Choose an option. The explanation appears after your attempt.