sera-code 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/bin/sera.mjs +31 -0
- package/dist/bundle/chunks/{chunk-LOMPDCMP.js → chunk-DFRGGJWV.js} +1 -1
- package/dist/bundle/chunks/{chunk-AZC5WTED.js → chunk-EMXTNOOJ.js} +5 -5
- package/dist/bundle/chunks/{chunk-KXU77PUU.js → chunk-ET2ARYK4.js} +1 -1
- package/dist/bundle/chunks/{chunk-ZNCN2NGY.js → chunk-G5BGS7HZ.js} +2 -2
- package/dist/bundle/chunks/{chunk-HODJBMOY.js → chunk-GSGPISRE.js} +3 -4
- package/dist/bundle/chunks/{chunk-46WGNYIE.js → chunk-NMUS7OCP.js} +1 -1
- package/dist/bundle/chunks/{chunk-HQBQWHLD.js → chunk-RCQXVPCE.js} +1 -1
- package/dist/bundle/chunks/{cli-MML2DU4A.js → cli-NOCFT7AL.js} +1 -1
- package/dist/bundle/chunks/{execute-HXDNZ26B.js → execute-S2O3RL6V.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{runtime-JAH75CB5.js → runtime-BRT7AUXY.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-Z2V3PTLI.js → virtual-modules-QR2XYBMY.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/lib/postinstall.js +16 -0
- package/lib/update.js +85 -0
- package/lib/win-setup.js +96 -0
- package/package.json +4 -1
- package/sera-core/skills/ambalaj-tasarim/NOTICE +1 -0
- package/sera-core/skills/ambalaj-tasarim/SKILL.md +34 -0
- package/sera-core/skills/ambalaj-tasarim/dieline.mjs +17 -0
- package/sera-core/skills/ambalaj-tasarim/sera-pack.js +535 -0
- package/sera-core/skills/animasyonlu-site/NOTICE +1 -0
- package/sera-core/skills/animasyonlu-site/SKILL.md +26 -0
- package/sera-core/skills/animasyonlu-site/sera-motion.js +310 -0
- package/sera-core/skills/animate/LICENSE +21 -0
- package/sera-core/skills/animate/NOTICE +2 -0
- package/sera-core/skills/animate/RECIPES.md +324 -0
- package/sera-core/skills/animate/SKILL.md +209 -0
- package/sera-core/skills/astryx-ui/SKILL.md +37 -0
- package/sera-core/skills/awwwards/LICENSE +21 -0
- package/sera-core/skills/awwwards/NOTICE +5 -0
- package/sera-core/skills/awwwards/SKILL.md +357 -0
- package/sera-core/skills/awwwards/references/anatomy.md +103 -0
- package/sera-core/skills/awwwards/references/art-direction.md +114 -0
- package/sera-core/skills/awwwards/references/astro.md +235 -0
- package/sera-core/skills/awwwards/references/concepts.md +110 -0
- package/sera-core/skills/awwwards/references/content.md +88 -0
- package/sera-core/skills/awwwards/references/engine.md +751 -0
- package/sera-core/skills/awwwards/references/layout.md +81 -0
- package/sera-core/skills/awwwards/references/motion.md +463 -0
- package/sera-core/skills/awwwards/references/nextjs.md +386 -0
- package/sera-core/skills/awwwards/references/patterns.md +123 -0
- package/sera-core/skills/awwwards/references/quality-bar.md +151 -0
- package/sera-core/skills/awwwards/references/quality.md +91 -0
- package/sera-core/skills/awwwards/references/ship.md +36 -0
- package/sera-core/skills/awwwards/references/typography.md +135 -0
- package/sera-core/skills/awwwards/references/webgl.md +430 -0
- package/sera-core/skills/awwwards/scripts/audit.mjs +243 -0
- package/sera-core/skills/awwwards/scripts/browser.mjs +54 -0
- package/sera-core/skills/awwwards/scripts/font.mjs +87 -0
- package/sera-core/skills/awwwards/scripts/og.mjs +20 -0
- package/sera-core/skills/awwwards/scripts/photos.mjs +65 -0
- package/sera-core/skills/awwwards/scripts/serve.mjs +48 -0
- package/sera-core/skills/awwwards/scripts/shoot.mjs +675 -0
- package/sera-core/skills/beceri-yaz/SKILL.md +39 -0
- package/sera-core/skills/brag-slim/LICENSE +21 -0
- package/sera-core/skills/brag-slim/NOTICE +2 -0
- package/sera-core/skills/brag-slim/SKILL.md +108 -0
- package/sera-core/skills/brainstorming/LICENSE +21 -0
- package/sera-core/skills/brainstorming/NOTICE +5 -0
- package/sera-core/skills/brainstorming/SKILL.md +298 -0
- package/sera-core/skills/brainstorming/builder-check-prompt.md +23 -0
- package/sera-core/skills/copywriting/LICENSE +21 -0
- package/sera-core/skills/copywriting/NOTICE +5 -0
- package/sera-core/skills/copywriting/SKILL.md +343 -0
- package/sera-core/skills/copywriting/references/ai-tells.md +309 -0
- package/sera-core/skills/copywriting/references/copy-frameworks.md +432 -0
- package/sera-core/skills/copywriting/references/natural-transitions.md +256 -0
- package/sera-core/skills/cro/LICENSE +21 -0
- package/sera-core/skills/cro/NOTICE +5 -0
- package/sera-core/skills/cro/SKILL.md +198 -0
- package/sera-core/skills/cro/references/experiments.md +248 -0
- package/sera-core/skills/cro/references/form.md +422 -0
- package/sera-core/skills/derin-arastirma/referanslar/arastirma-yontem.md +11 -0
- package/sera-core/skills/emil-design-eng/LICENSE +21 -0
- package/sera-core/skills/emil-design-eng/NOTICE +2 -0
- package/sera-core/skills/emil-design-eng/SKILL.md +684 -0
- package/sera-core/skills/frontend-design/LICENSE.txt +177 -0
- package/sera-core/skills/frontend-design/NOTICE +2 -0
- package/sera-core/skills/frontend-design/SKILL.md +71 -0
- package/sera-core/skills/gorsel-denetim/SKILL.md +30 -0
- package/sera-core/skills/hallmark/LICENSE +21 -0
- package/sera-core/skills/hallmark/NOTICE +5 -0
- package/sera-core/skills/hallmark/SKILL.md +154 -0
- package/sera-core/skills/hallmark/references/anatomy.md +71 -0
- package/sera-core/skills/hallmark/references/brand-truth.md +40 -0
- package/sera-core/skills/hallmark/references/comp.md +104 -0
- package/sera-core/skills/hallmark/references/craft.md +116 -0
- package/sera-core/skills/hallmark/references/dark-mode.md +49 -0
- package/sera-core/skills/hallmark/references/data-viz.md +48 -0
- package/sera-core/skills/hallmark/references/design-md.md +53 -0
- package/sera-core/skills/hallmark/references/direction.md +52 -0
- package/sera-core/skills/hallmark/references/export-formats.md +80 -0
- package/sera-core/skills/hallmark/references/flow.md +131 -0
- package/sera-core/skills/hallmark/references/fonts.md +58 -0
- package/sera-core/skills/hallmark/references/gates.md +243 -0
- package/sera-core/skills/hallmark/references/genres/atmospheric.md +24 -0
- package/sera-core/skills/hallmark/references/genres/editorial.md +24 -0
- package/sera-core/skills/hallmark/references/genres/modern-minimal.md +24 -0
- package/sera-core/skills/hallmark/references/genres/playful.md +24 -0
- package/sera-core/skills/hallmark/references/imagery.md +99 -0
- package/sera-core/skills/hallmark/references/interaction-and-states.md +89 -0
- package/sera-core/skills/hallmark/references/layout.md +104 -0
- package/sera-core/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
- package/sera-core/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
- package/sera-core/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
- package/sera-core/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/12-letter.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/sera-core/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
- package/sera-core/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
- package/sera-core/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures.md +119 -0
- package/sera-core/skills/hallmark/references/microinteractions.md +80 -0
- package/sera-core/skills/hallmark/references/patterns.md +202 -0
- package/sera-core/skills/hallmark/references/redesign.md +88 -0
- package/sera-core/skills/hallmark/references/responsive.md +46 -0
- package/sera-core/skills/hallmark/references/review-finish.md +19 -0
- package/sera-core/skills/hallmark/references/review-hero.md +20 -0
- package/sera-core/skills/hallmark/references/scroll-choreography.md +110 -0
- package/sera-core/skills/hallmark/references/texture.md +90 -0
- package/sera-core/skills/hallmark/references/themes/README.md +58 -0
- package/sera-core/skills/hallmark/references/themes/almanac.md +103 -0
- package/sera-core/skills/hallmark/references/themes/arcade.md +102 -0
- package/sera-core/skills/hallmark/references/themes/atelier.md +98 -0
- package/sera-core/skills/hallmark/references/themes/bloom.md +102 -0
- package/sera-core/skills/hallmark/references/themes/blueprint.md +103 -0
- package/sera-core/skills/hallmark/references/themes/broadside.md +108 -0
- package/sera-core/skills/hallmark/references/themes/brutal.md +95 -0
- package/sera-core/skills/hallmark/references/themes/carnival.md +104 -0
- package/sera-core/skills/hallmark/references/themes/cobalt.md +101 -0
- package/sera-core/skills/hallmark/references/themes/console.md +99 -0
- package/sera-core/skills/hallmark/references/themes/coral.md +102 -0
- package/sera-core/skills/hallmark/references/themes/darkroom.md +99 -0
- package/sera-core/skills/hallmark/references/themes/dose.md +98 -0
- package/sera-core/skills/hallmark/references/themes/dusk.md +105 -0
- package/sera-core/skills/hallmark/references/themes/editorial.md +97 -0
- package/sera-core/skills/hallmark/references/themes/formwork.md +107 -0
- package/sera-core/skills/hallmark/references/themes/furrow.md +98 -0
- package/sera-core/skills/hallmark/references/themes/garden.md +97 -0
- package/sera-core/skills/hallmark/references/themes/grid.md +101 -0
- package/sera-core/skills/hallmark/references/themes/halftone.md +106 -0
- package/sera-core/skills/hallmark/references/themes/hedgerow.md +104 -0
- package/sera-core/skills/hallmark/references/themes/hum.md +99 -0
- package/sera-core/skills/hallmark/references/themes/ink.md +106 -0
- package/sera-core/skills/hallmark/references/themes/kiln.md +108 -0
- package/sera-core/skills/hallmark/references/themes/loom.md +106 -0
- package/sera-core/skills/hallmark/references/themes/lumen.md +103 -0
- package/sera-core/skills/hallmark/references/themes/manifesto.md +101 -0
- package/sera-core/skills/hallmark/references/themes/midnight.md +97 -0
- package/sera-core/skills/hallmark/references/themes/newsprint.md +102 -0
- package/sera-core/skills/hallmark/references/themes/overprint.md +101 -0
- package/sera-core/skills/hallmark/references/themes/pasteup.md +100 -0
- package/sera-core/skills/hallmark/references/themes/piste.md +99 -0
- package/sera-core/skills/hallmark/references/themes/refract.md +101 -0
- package/sera-core/skills/hallmark/references/themes/ribbon.md +106 -0
- package/sera-core/skills/hallmark/references/themes/rim.md +96 -0
- package/sera-core/skills/hallmark/references/themes/riso.md +98 -0
- package/sera-core/skills/hallmark/references/themes/solstice.md +104 -0
- package/sera-core/skills/hallmark/references/themes/specimen.md +100 -0
- package/sera-core/skills/hallmark/references/themes/spore.md +104 -0
- package/sera-core/skills/hallmark/references/themes/sport.md +101 -0
- package/sera-core/skills/hallmark/references/themes/squeeze.md +99 -0
- package/sera-core/skills/hallmark/references/themes/sticker.md +106 -0
- package/sera-core/skills/hallmark/references/themes/studio.md +99 -0
- package/sera-core/skills/hallmark/references/themes/terminal.md +96 -0
- package/sera-core/skills/hallmark/references/themes/terrazzo.md +106 -0
- package/sera-core/skills/hallmark/references/themes/ultraviolet.md +106 -0
- package/sera-core/skills/hallmark/references/themes/vantage.md +99 -0
- package/sera-core/skills/hallmark/references/themes/vellum.md +105 -0
- package/sera-core/skills/hallmark/references/themes/wayfind.md +105 -0
- package/sera-core/skills/hallmark/references/themes/werkstatt.md +105 -0
- package/sera-core/skills/hallmark/scripts/capture.mjs +132 -0
- package/sera-core/skills/hallmark/scripts/refcheck.mjs +405 -0
- package/sera-core/skills/hallmark/scripts/sloplint-render.mjs +1283 -0
- package/sera-core/skills/hallmark/scripts/sloplint.mjs +4426 -0
- package/sera-core/skills/hallmark/scripts/theme.mjs +660 -0
- package/sera-core/skills/kurum-ici-iletisim/SKILL.md +40 -0
- package/sera-core/skills/launch/LICENSE +21 -0
- package/sera-core/skills/launch/NOTICE +5 -0
- package/sera-core/skills/launch/SKILL.md +385 -0
- package/sera-core/skills/launch/references/shipped-changes.md +84 -0
- package/sera-core/skills/launch/references/site-launch-qa.md +57 -0
- package/sera-core/skills/marka-kimligi/SKILL.md +30 -0
- package/sera-core/skills/mcp-yaz/SKILL.md +41 -0
- package/sera-core/skills/mobil-arayuz/SKILL.md +12 -0
- package/sera-core/skills/mvp-scoping/LICENSE +21 -0
- package/sera-core/skills/mvp-scoping/NOTICE +5 -0
- package/sera-core/skills/mvp-scoping/SKILL.md +95 -0
- package/sera-core/skills/ortak-yazarlik/SKILL.md +32 -0
- package/sera-core/skills/oyun-turleri/SKILL.md +176 -0
- package/sera-core/skills/paralel-sadelestirme/SKILL.md +33 -0
- package/sera-core/skills/phaser-core/LICENSE +201 -0
- package/sera-core/skills/phaser-core/NOTICE +5 -0
- package/sera-core/skills/phaser-core/NOTICE-UPSTREAM +15 -0
- package/sera-core/skills/phaser-core/SKILL.md +245 -0
- package/sera-core/skills/phaser-core/references/scene-flow.md +177 -0
- package/sera-core/skills/pitch-deck/LICENSE +21 -0
- package/sera-core/skills/pitch-deck/NOTICE +5 -0
- package/sera-core/skills/pitch-deck/SKILL.md +103 -0
- package/sera-core/skills/sera-3d-oyun/NOTICE +1 -0
- package/sera-core/skills/sera-3d-oyun/SKILL.md +12 -0
- package/sera-core/skills/sera-3d-oyun/sera-3d.js +3697 -0
- package/sera-core/skills/sera-diyagram/SKILL.md +43 -0
- package/sera-core/skills/sera-ofis-dosya/SKILL.md +3 -0
- package/sera-core/skills/sera-ofis-dosya/referanslar/ofis-ileri.md +46 -0
- package/sera-core/skills/sera-ui-site/NOTICE +1 -0
- package/sera-core/skills/sera-ui-site/SKILL.md +10 -0
- package/sera-core/skills/sera-ui-site/sera-ui.js +83 -0
- package/sera-core/skills/sera-veri-gorsel/SKILL.md +3 -0
- package/sera-core/skills/sera-veri-gorsel/referanslar/palet-dogrula.mjs +80 -0
- package/sera-core/skills/sistem-tarama/SKILL.md +49 -0
- package/sera-core/skills/sistem-tarama/referanslar/komutlar.md +78 -0
- package/sera-core/skills/tasarim-stilleri/SKILL.md +113 -0
- package/sera-core/skills/teardown/LICENSE +22 -0
- package/sera-core/skills/teardown/NOTICE +3 -0
- package/sera-core/skills/teardown/SKILL.md +144 -0
- package/sera-core/skills/teardown/package-lock.json +545 -0
- package/sera-core/skills/teardown/package.json +18 -0
- package/sera-core/skills/teardown/paths.mjs +30 -0
- package/sera-core/skills/teardown/run_sfx.py +10 -0
- package/sera-core/skills/teardown/sfx/__init__.py +10 -0
- package/sera-core/skills/teardown/sfx/__main__.py +64 -0
- package/sera-core/skills/teardown/sfx/dsp.py +453 -0
- package/sera-core/skills/teardown/sfx/loudness.py +72 -0
- package/sera-core/skills/teardown/sfx/mix.py +111 -0
- package/sera-core/skills/teardown/sfx/samples/SOURCES.md +23 -0
- package/sera-core/skills/teardown/sfx/samples/fs-258269-mouth-pop.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-323432-typing.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-329533-room-tone-in-an-apartment-livi.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-329569-roomtone-bedroom-yew.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-339521-vhs-rewind-forward-and-eject.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-349504-triangle-open-04.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-416777-digital-typing-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-426767-apartment-room-tone-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-447909-keyboard-typing.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-447910-plop.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-79388-keyboard-typing-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-824189-pop-in-sfx.ogg +0 -0
- package/sera-core/skills/teardown/sfx/score_kit.py +206 -0
- package/sera-core/skills/teardown/sfx/synth.py +294 -0
- package/sera-core/skills/teardown/sheet.mjs +127 -0
- package/sera-core/skills/teardown/sims/beats.py +212 -0
- package/sera-core/skills/teardown/sims/build.mjs +141 -0
- package/sera-core/skills/teardown/sims/capture.mjs +211 -0
- package/sera-core/skills/teardown/sims/cessna-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/cessna-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/cessna-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/cessna-shared/console.js +288 -0
- package/sera-core/skills/teardown/sims/cessna-shared/film.js +254 -0
- package/sera-core/skills/teardown/sims/cessna-shared/flight.js +53 -0
- package/sera-core/skills/teardown/sims/cessna-shared/gear.js +364 -0
- package/sera-core/skills/teardown/sims/cessna-shared/live.js +351 -0
- package/sera-core/skills/teardown/sims/cessna-shared/score.py +41 -0
- package/sera-core/skills/teardown/sims/cessna-shared/stage.js +248 -0
- package/sera-core/skills/teardown/sims/kit/director.js +300 -0
- package/sera-core/skills/teardown/sims/kit/hud.js +194 -0
- package/sera-core/skills/teardown/sims/kit/runtime.js +168 -0
- package/sera-core/skills/teardown/sims/kit/stage3d.js +114 -0
- package/sera-core/skills/teardown/sims/kit/style.css +137 -0
- package/sera-core/skills/teardown/sims/kit/util.js +79 -0
- package/sera-core/skills/teardown/sims/kit/warm.js +66 -0
- package/sera-core/skills/teardown/sims/strandbeest-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/strandbeest-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/strandbeest-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/beast.js +419 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/console.js +375 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/film.js +352 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/jansen.js +67 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/live.js +420 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/score.py +85 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/stage.js +463 -0
- package/sera-core/skills/teardown/sims/v8-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/v8-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/v8-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/v8-shared/console.js +339 -0
- package/sera-core/skills/teardown/sims/v8-shared/engine.js +624 -0
- package/sera-core/skills/teardown/sims/v8-shared/film.js +239 -0
- package/sera-core/skills/teardown/sims/v8-shared/kin.js +86 -0
- package/sera-core/skills/teardown/sims/v8-shared/live.js +374 -0
- package/sera-core/skills/teardown/sims/v8-shared/score.py +60 -0
- package/sera-core/skills/teardown/sims/v8-shared/stage.js +173 -0
- package/sera-core/skills/teardown/wave.mjs +67 -0
- package/sera-core/skills/toplu-degisiklik/SKILL.md +39 -0
- package/sera-core/skills/ui-ux-pro-max/LICENSE +21 -0
- package/sera-core/skills/ui-ux-pro-max/NOTICE +5 -0
- package/sera-core/skills/ui-ux-pro-max/SKILL.md +13 -0
- package/sera-core/skills/ui-ux-pro-max/references/pro-rules.md +117 -0
- package/sera-core/skills/ui-ux-pro-max/references/quick-reference.md +266 -0
- package/sera-core/skills/unslop/LICENSE.md +410 -0
- package/sera-core/skills/unslop/SKILL.md +217 -0
- package/sera-core/skills/unslop/references/effects.md +113 -0
- package/sera-core/skills/unslop/references/refs/unslop-dashboard-after.webp +0 -0
- package/sera-core/skills/unslop/references/refs/unslop-hero-after.webp +0 -0
- package/sera-core/skills/unslop/references/refs.md +16 -0
- package/sera-core/skills/unslop/references/rtl.md +72 -0
- package/sera-core/skills/unslop/references/signs.md +125 -0
- package/sera-core/skills/unslop/references/tokens.md +137 -0
- package/sera-core/skills/unslop/references/visuals.md +84 -0
- package/sera-core/skills/unslop/scripts/snapshot.mjs +197 -0
- package/sera-core/skills/uretken-sanat/SKILL.md +42 -0
- package/sera-core/skills/verification-before-completion/LICENSE +21 -0
- package/sera-core/skills/verification-before-completion/NOTICE +5 -0
- package/sera-core/skills/verification-before-completion/SKILL.md +120 -0
- package/sera-core/skills/web-yayin-listesi/SKILL.md +3 -0
- package/sera-core/src/app-master.ts +2 -2
- package/sera-core/src/app-verify.ts +33 -0
- package/sera-core/src/auto-memory.ts +249 -0
- package/sera-core/src/extension.ts +69 -3
- package/sera-core/src/generated/build-rules.ts +81 -17
- package/sera-core/src/generated/quality-probe.ts +2 -0
- package/sera-core/src/generated/zero-knowledge.ts +36 -9
- package/sera-core/src/image-tool.ts +124 -7
- package/sera-core/src/link-data-tools.ts +411 -0
- package/sera-core/src/skills.ts +54 -18
- package/sera-core/src/video-tool.ts +51 -0
- package/sera-core/src/zk.ts +7 -3
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
// The V8 as a page you drive: the film's engine and overlay, run in real time. Camera views, the cutaway (glass,
|
|
2
|
+
// section through the tracked cylinder, solid), the overlays (callouts, charge, arrows, isolate, refraction, charts),
|
|
3
|
+
// the firing order to pick the tracked cylinder, PAUSE and ±15°, the engine speed and playback sliders, an orbit you
|
|
4
|
+
// drag, a zoom on the wheel, H to hide the overlay. Left alone it plays the film's script as an auto tour with the
|
|
5
|
+
// operator's cursor, looped; a click, drag, wheel or key hands control to the visitor, 25 s of quiet hands it back.
|
|
6
|
+
import {warmComposer} from '../kit/warm.js';
|
|
7
|
+
import {CAMS, createConsole, CUTS, OVERLAYS, RPM_MAX} from './console.js';
|
|
8
|
+
import {makeConsoleFrame, makeCursor, rpmAt, trackAt, camAt, camName, DURATION, SCRIPT, VIEW_FN} from './film.js';
|
|
9
|
+
import {CYL, ORDER} from './kin.js';
|
|
10
|
+
import {createV8Stage} from './stage.js';
|
|
11
|
+
|
|
12
|
+
const W = 1600;
|
|
13
|
+
const H = 900;
|
|
14
|
+
const IDLE = 25;
|
|
15
|
+
const D2R = Math.PI / 180;
|
|
16
|
+
const clamp = (x, a, b) => Math.min(b, Math.max(a, x));
|
|
17
|
+
const smoother = (x) => {
|
|
18
|
+
const u = clamp(x, 0, 1);
|
|
19
|
+
return u * u * u * (u * (u * 6 - 15) + 10);
|
|
20
|
+
};
|
|
21
|
+
const ss = (a, b, t) => smoother((t - a) / (b - a));
|
|
22
|
+
const wrap = (d) => ((((d + 180) % 360) + 360) % 360) - 180;
|
|
23
|
+
// playback steps: the film runs at 1/20
|
|
24
|
+
const PLAYS = [1 / 60, 1 / 40, 1 / 20, 1 / 10, 1 / 5, 1 / 2, 1];
|
|
25
|
+
const playText = (p) => (p >= 1 ? '1× SPEED' : `1 / ${Math.round(1 / p)} SPEED`);
|
|
26
|
+
|
|
27
|
+
const CSS = (top) => `
|
|
28
|
+
html,body{background:#ecedef;overflow:hidden}
|
|
29
|
+
#app{position:absolute!important;inset:auto!important;left:0;top:0;width:${W}px;height:${H}px;transform-origin:0 0}
|
|
30
|
+
#gl{touch-action:none;cursor:grab}
|
|
31
|
+
#gl.drag{cursor:grabbing}
|
|
32
|
+
.tb{pointer-events:auto;cursor:pointer}
|
|
33
|
+
.tb:hover{filter:brightness(.95)}
|
|
34
|
+
.hit{position:absolute;pointer-events:auto;cursor:pointer}
|
|
35
|
+
.hit.ew{cursor:ew-resize}
|
|
36
|
+
.tourchip{position:absolute;left:800px;top:62px;transform:translateX(-50%);display:flex;align-items:center;gap:7px;height:21px;padding:0 11px;border:1px solid #e1e3e6;background:rgba(255,255,255,.95);color:#16181b;font:600 8.8px Inter,sans-serif;letter-spacing:1.3px;white-space:nowrap;cursor:pointer;pointer-events:auto}
|
|
37
|
+
.tourchip i{display:block;width:6px;height:6px;border-radius:50%;background:#d6182b}
|
|
38
|
+
.tourchip.on i{animation:blink 1.2s steps(2) infinite}
|
|
39
|
+
@keyframes blink{50%{opacity:.15}}
|
|
40
|
+
.turn{position:fixed;left:0;right:0;bottom:18px;text-align:center;font:600 12px/1.4 'JetBrains Mono',monospace;letter-spacing:1px;color:#8b8f95;text-transform:uppercase;display:none}
|
|
41
|
+
@media (orientation:portrait) and (max-width:820px){.turn{display:block}}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
export function runLive() {
|
|
45
|
+
const top = Number(document.body.dataset.top || 0);
|
|
46
|
+
const style = document.createElement('style');
|
|
47
|
+
style.textContent = CSS(top);
|
|
48
|
+
document.head.appendChild(style);
|
|
49
|
+
const app = document.getElementById('app');
|
|
50
|
+
const canvas = document.createElement('canvas');
|
|
51
|
+
canvas.id = 'gl';
|
|
52
|
+
app.appendChild(canvas);
|
|
53
|
+
const st = createV8Stage({canvas});
|
|
54
|
+
const ui = createConsole(app);
|
|
55
|
+
const tourCursor = makeCursor(ui);
|
|
56
|
+
const frameConsole = makeConsoleFrame(ui, st);
|
|
57
|
+
|
|
58
|
+
// ------------------------------------------------------------ quality tiers
|
|
59
|
+
const TIERS = [
|
|
60
|
+
{samples: 8, ao: true, shadow: 4096, pr: 2},
|
|
61
|
+
{samples: 4, ao: false, shadow: 2048, pr: 1.5},
|
|
62
|
+
{samples: 2, ao: false, shadow: 1024, pr: 1},
|
|
63
|
+
];
|
|
64
|
+
const light = matchMedia('(pointer: coarse)').matches || Math.min(innerWidth, innerHeight) < 700;
|
|
65
|
+
let tier = light ? 2 : 0;
|
|
66
|
+
let scale = 1;
|
|
67
|
+
const fit = () => {
|
|
68
|
+
const h = innerHeight - top;
|
|
69
|
+
scale = Math.min(innerWidth / W, h / H);
|
|
70
|
+
app.style.transform = `translate(${(innerWidth - W * scale) / 2}px, ${top + (h - H * scale) / 2}px) scale(${scale})`;
|
|
71
|
+
st.resize(W, H, clamp((devicePixelRatio || 1) * scale, 0.75, TIERS[tier].pr));
|
|
72
|
+
};
|
|
73
|
+
const applyTier = () => {
|
|
74
|
+
const {pr, ...q} = TIERS[tier];
|
|
75
|
+
st.setQuality(q);
|
|
76
|
+
fit();
|
|
77
|
+
};
|
|
78
|
+
applyTier();
|
|
79
|
+
addEventListener('resize', fit);
|
|
80
|
+
const toStage = (cx, cy) => {
|
|
81
|
+
const r = app.getBoundingClientRect();
|
|
82
|
+
return [(cx - r.left) / scale, (cy - r.top) / scale];
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const tourChip = document.createElement('div');
|
|
86
|
+
tourChip.className = 'tourchip';
|
|
87
|
+
ui.root.appendChild(tourChip);
|
|
88
|
+
const note = document.createElement('div');
|
|
89
|
+
note.className = 'turn';
|
|
90
|
+
note.textContent = 'Turn your phone sideways for the full console';
|
|
91
|
+
document.body.appendChild(note);
|
|
92
|
+
|
|
93
|
+
// ------------------------------------------------------------ state
|
|
94
|
+
let T = 0;
|
|
95
|
+
let th = 12;
|
|
96
|
+
let rpm = 700;
|
|
97
|
+
let rpmTarget = 700;
|
|
98
|
+
let playI = 2;
|
|
99
|
+
let paused = false;
|
|
100
|
+
let view = 'hero';
|
|
101
|
+
let viewAt = 0;
|
|
102
|
+
let cyl = 1;
|
|
103
|
+
let cut = 'glass';
|
|
104
|
+
const ov = {callouts: 1, charge: 1, arrows: 1, isolate: 0, refract: 1, charts: 1};
|
|
105
|
+
const off = {az: 0, el: 0, k: 1};
|
|
106
|
+
const cam = {...VIEW_FN.open(0)};
|
|
107
|
+
let ring = {t: -9, x: 0, y: 0};
|
|
108
|
+
let hidden = false;
|
|
109
|
+
const pulse = (x, y) => (ring = {t: T, x, y});
|
|
110
|
+
const pulseBtn = (k) => pulse(...ui.spots[k]);
|
|
111
|
+
|
|
112
|
+
// ------------------------------------------------------------ the tour
|
|
113
|
+
const AP = {on: true, t0: 0, loop: 0};
|
|
114
|
+
let lastInput = 0;
|
|
115
|
+
const startTour = () => {
|
|
116
|
+
AP.on = true;
|
|
117
|
+
AP.t0 = T;
|
|
118
|
+
AP.loop = 0;
|
|
119
|
+
paused = false;
|
|
120
|
+
playI = 2;
|
|
121
|
+
cut = 'glass';
|
|
122
|
+
Object.assign(ov, {callouts: 1, charge: 1, arrows: 1, isolate: 0, refract: 1, charts: 1});
|
|
123
|
+
Object.assign(off, {az: 0, el: 0, k: 1});
|
|
124
|
+
};
|
|
125
|
+
const takeOver = () => {
|
|
126
|
+
lastInput = T;
|
|
127
|
+
if (!AP.on) return;
|
|
128
|
+
AP.on = false;
|
|
129
|
+
const cyc = (T - AP.t0) % DURATION;
|
|
130
|
+
view = camName(cyc);
|
|
131
|
+
viewAt = T - (cyc - SCRIPT.filter((e) => e.cam && e.t <= cyc).pop().t);
|
|
132
|
+
if (view === 'hero' && cyc < 3.5) viewAt = T - 6;
|
|
133
|
+
ov.isolate = view === 'cyl' ? 1 : 0;
|
|
134
|
+
};
|
|
135
|
+
tourChip.addEventListener('pointerdown', (e) => {
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
lastInput = T;
|
|
138
|
+
if (AP.on) takeOver();
|
|
139
|
+
else startTour();
|
|
140
|
+
});
|
|
141
|
+
addEventListener('pointerdown', (e) => {
|
|
142
|
+
if (e.target !== tourChip) takeOver();
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// ------------------------------------------------------------ controls
|
|
146
|
+
const setView = (v) => {
|
|
147
|
+
view = v;
|
|
148
|
+
viewAt = T;
|
|
149
|
+
Object.assign(off, {az: 0, el: 0, k: 1});
|
|
150
|
+
ov.isolate = v === 'cyl' ? 1 : 0;
|
|
151
|
+
};
|
|
152
|
+
for (const k of CAMS)
|
|
153
|
+
ui.btn[k].addEventListener('click', () => {
|
|
154
|
+
takeOver();
|
|
155
|
+
pulseBtn(k);
|
|
156
|
+
setView(k);
|
|
157
|
+
});
|
|
158
|
+
for (const k of CUTS)
|
|
159
|
+
ui.btn[k].addEventListener('click', () => {
|
|
160
|
+
takeOver();
|
|
161
|
+
pulseBtn(k);
|
|
162
|
+
cut = k;
|
|
163
|
+
});
|
|
164
|
+
for (const k of OVERLAYS)
|
|
165
|
+
ui.btn[k].addEventListener('click', () => {
|
|
166
|
+
takeOver();
|
|
167
|
+
pulseBtn(k);
|
|
168
|
+
ov[k] = ov[k] ? 0 : 1;
|
|
169
|
+
});
|
|
170
|
+
ui.btn.pause.addEventListener('click', () => {
|
|
171
|
+
takeOver();
|
|
172
|
+
pulseBtn('pause');
|
|
173
|
+
paused = !paused;
|
|
174
|
+
});
|
|
175
|
+
for (const [k, d] of [['back', -15], ['fwd', 15]])
|
|
176
|
+
ui.btn[k].addEventListener('click', () => {
|
|
177
|
+
takeOver();
|
|
178
|
+
pulseBtn(k);
|
|
179
|
+
paused = true;
|
|
180
|
+
th += d;
|
|
181
|
+
});
|
|
182
|
+
// the firing order: click a cylinder to track it
|
|
183
|
+
ORDER.forEach((c, i) => {
|
|
184
|
+
const [x, y] = ui.foSpot(i);
|
|
185
|
+
const d = document.createElement('div');
|
|
186
|
+
d.className = 'hit';
|
|
187
|
+
Object.assign(d.style, {left: `${x - 14}px`, top: `${y - 14}px`, width: '28px', height: '28px', borderRadius: '50%'});
|
|
188
|
+
d.addEventListener('click', () => {
|
|
189
|
+
takeOver();
|
|
190
|
+
pulse(x, y);
|
|
191
|
+
cyl = c;
|
|
192
|
+
if (view === 'cyl') viewAt = T - 0.01;
|
|
193
|
+
});
|
|
194
|
+
ui.root.appendChild(d);
|
|
195
|
+
});
|
|
196
|
+
// the two sliders: drag along their tracks
|
|
197
|
+
const slider = (knobAt, apply) => {
|
|
198
|
+
const [x0, y] = knobAt(0);
|
|
199
|
+
const [x1] = knobAt(1);
|
|
200
|
+
const d = document.createElement('div');
|
|
201
|
+
d.className = 'hit ew';
|
|
202
|
+
Object.assign(d.style, {left: `${x0 - 8}px`, top: `${y - 11}px`, width: `${x1 - x0 + 16}px`, height: '22px'});
|
|
203
|
+
const move = (e) => {
|
|
204
|
+
const [x] = toStage(e.clientX, e.clientY);
|
|
205
|
+
apply(clamp((x - x0) / (x1 - x0), 0, 1));
|
|
206
|
+
lastInput = T;
|
|
207
|
+
};
|
|
208
|
+
d.addEventListener('pointerdown', (e) => {
|
|
209
|
+
takeOver();
|
|
210
|
+
d.setPointerCapture(e.pointerId);
|
|
211
|
+
const up = () => {
|
|
212
|
+
removeEventListener('pointermove', move);
|
|
213
|
+
removeEventListener('pointerup', up);
|
|
214
|
+
};
|
|
215
|
+
addEventListener('pointermove', move);
|
|
216
|
+
addEventListener('pointerup', up);
|
|
217
|
+
move(e);
|
|
218
|
+
});
|
|
219
|
+
ui.root.appendChild(d);
|
|
220
|
+
};
|
|
221
|
+
slider(ui.speedKnob, (k) => (rpmTarget = clamp(k * RPM_MAX, 300, RPM_MAX)));
|
|
222
|
+
slider(ui.playKnob, (k) => (playI = Math.round(k * (PLAYS.length - 1))));
|
|
223
|
+
addEventListener('keydown', (e) => {
|
|
224
|
+
if (e.altKey || e.ctrlKey || e.metaKey) return;
|
|
225
|
+
const key = e.key.toLowerCase();
|
|
226
|
+
const v = {1: 'hero', 2: 'front', 3: 'side', 4: 'valley', 5: 'cyl'}[key];
|
|
227
|
+
takeOver();
|
|
228
|
+
if (v) setView(v);
|
|
229
|
+
else if (key === ' ') paused = !paused;
|
|
230
|
+
else if (key === 'h') hidden = !hidden;
|
|
231
|
+
else if (key === 'arrowleft') {
|
|
232
|
+
paused = true;
|
|
233
|
+
th -= 15;
|
|
234
|
+
} else if (key === 'arrowright') {
|
|
235
|
+
paused = true;
|
|
236
|
+
th += 15;
|
|
237
|
+
} else if (key === 'arrowup') rpmTarget = clamp(rpmTarget + 300, 300, RPM_MAX);
|
|
238
|
+
else if (key === 'arrowdown') rpmTarget = clamp(rpmTarget - 300, 300, RPM_MAX);
|
|
239
|
+
else return;
|
|
240
|
+
e.preventDefault();
|
|
241
|
+
});
|
|
242
|
+
let drag = null;
|
|
243
|
+
canvas.addEventListener('pointerdown', (e) => {
|
|
244
|
+
drag = {x: e.clientX, y: e.clientY};
|
|
245
|
+
canvas.setPointerCapture(e.pointerId);
|
|
246
|
+
canvas.classList.add('drag');
|
|
247
|
+
});
|
|
248
|
+
canvas.addEventListener('pointermove', (e) => {
|
|
249
|
+
if (!drag) return;
|
|
250
|
+
off.az += ((e.clientX - drag.x) / scale) * 0.3;
|
|
251
|
+
off.el = clamp(off.el + ((e.clientY - drag.y) / scale) * 0.2, -20, 60);
|
|
252
|
+
drag = {x: e.clientX, y: e.clientY};
|
|
253
|
+
lastInput = T;
|
|
254
|
+
});
|
|
255
|
+
const endDrag = () => {
|
|
256
|
+
drag = null;
|
|
257
|
+
canvas.classList.remove('drag');
|
|
258
|
+
};
|
|
259
|
+
canvas.addEventListener('pointerup', endDrag);
|
|
260
|
+
canvas.addEventListener('pointercancel', endDrag);
|
|
261
|
+
canvas.addEventListener(
|
|
262
|
+
'wheel',
|
|
263
|
+
(e) => {
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
takeOver();
|
|
266
|
+
off.k = clamp(off.k * Math.exp(e.deltaY * 0.0012), 0.45, 2.2);
|
|
267
|
+
},
|
|
268
|
+
{passive: false},
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
// ------------------------------------------------------------ the frame
|
|
272
|
+
startTour();
|
|
273
|
+
let last = performance.now();
|
|
274
|
+
const perf = {n: 0, sum: 0, slow: 0, age: 0};
|
|
275
|
+
const frame = (now) => {
|
|
276
|
+
const dt = Math.min(0.1, Math.max(0, (now - last) / 1000));
|
|
277
|
+
last = now;
|
|
278
|
+
T += dt;
|
|
279
|
+
if (tier < TIERS.length - 1) {
|
|
280
|
+
perf.age += dt;
|
|
281
|
+
if (perf.age > 0.6) {
|
|
282
|
+
perf.sum += dt;
|
|
283
|
+
perf.n++;
|
|
284
|
+
if (perf.sum >= 0.5 && perf.n >= 6) {
|
|
285
|
+
perf.slow = perf.sum / perf.n > 0.022 ? perf.slow + 1 : 0;
|
|
286
|
+
perf.sum = 0;
|
|
287
|
+
perf.n = 0;
|
|
288
|
+
if (perf.slow >= (perf.age < 6 ? 1 : 2)) {
|
|
289
|
+
tier++;
|
|
290
|
+
applyTier();
|
|
291
|
+
Object.assign(perf, {age: 0, slow: 0});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
let tgt;
|
|
298
|
+
let cursor;
|
|
299
|
+
let since;
|
|
300
|
+
let solo;
|
|
301
|
+
if (AP.on) {
|
|
302
|
+
const c = T - AP.t0;
|
|
303
|
+
const loop = Math.floor(c / DURATION);
|
|
304
|
+
const cyc = c - loop * DURATION;
|
|
305
|
+
if (loop > AP.loop) AP.loop = loop;
|
|
306
|
+
view = camName(cyc);
|
|
307
|
+
cyl = trackAt(cyc);
|
|
308
|
+
rpmTarget = rpmAt(cyc);
|
|
309
|
+
tgt = camAt(cyc);
|
|
310
|
+
const t0 = SCRIPT.filter((e) => e.cam && e.t <= cyc).pop().t;
|
|
311
|
+
since = cyc - t0;
|
|
312
|
+
// the film's isolation timing: on once the camera is close, off once the next move has begun
|
|
313
|
+
const views = SCRIPT.filter((e) => e.cam);
|
|
314
|
+
const vi = views.findIndex((e) => e.t === t0);
|
|
315
|
+
solo = (view === 'cyl' && since > 1.25) || (vi > 0 && views[vi - 1].cam === 'cyl' && since < 0.6);
|
|
316
|
+
ov.isolate = solo ? 1 : 0;
|
|
317
|
+
cursor = tourCursor(cyc);
|
|
318
|
+
if (AP.loop > 0 && cyc < 0.8) {
|
|
319
|
+
const end = tourCursor(DURATION - 0.01);
|
|
320
|
+
const k = ss(0, 0.8, cyc);
|
|
321
|
+
cursor = {...cursor, x: end.x + (cursor.x - end.x) * k, y: end.y + (cursor.y - end.y) * k};
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
if (T - lastInput > IDLE) startTour();
|
|
325
|
+
since = T - viewAt;
|
|
326
|
+
tgt = VIEW_FN[view](since, cyl);
|
|
327
|
+
tgt.az += off.az;
|
|
328
|
+
tgt.el = clamp(tgt.el + off.el, -10, 80);
|
|
329
|
+
tgt.d *= off.k;
|
|
330
|
+
solo = !!ov.isolate;
|
|
331
|
+
const rk = Math.max(0, 1 - (T - ring.t) / 0.55);
|
|
332
|
+
cursor = {x: -99, y: -99, press: false, ring: rk, ringX: ring.x, ringY: ring.y};
|
|
333
|
+
}
|
|
334
|
+
rpm += (rpmTarget - rpm) * (1 - Math.exp(-dt / 0.35));
|
|
335
|
+
if (!paused) th += (rpm / 60) * 360 * dt * PLAYS[playI];
|
|
336
|
+
|
|
337
|
+
// the camera eases toward its target: the tour's own moves pass through, a loop restart or a click glides
|
|
338
|
+
const k = 1 - Math.exp(-dt / (AP.on ? 0.18 : 0.45));
|
|
339
|
+
cam.az += wrap(tgt.az - cam.az) * k;
|
|
340
|
+
for (const key of ['tx', 'ty', 'tz', 'el', 'd', 'sx', 'sy']) cam[key] += (tgt[key] - cam[key]) * k;
|
|
341
|
+
st.setCut(cut, CYL[cyl - 1].z * 0.001);
|
|
342
|
+
st.eng.setRefract(!!ov.refract);
|
|
343
|
+
st.frame(th, {...cam, az: cam.az * D2R, el: cam.el * D2R}, {solo: solo ? cyl - 1 : -1, charge: ov.charge, arrows: ov.arrows});
|
|
344
|
+
|
|
345
|
+
ui.root.style.display = hidden ? 'none' : '';
|
|
346
|
+
for (const n of ui.root.querySelectorAll('[data-g="charts"]')) n.style.visibility = ov.charts ? '' : 'hidden';
|
|
347
|
+
frameConsole(T, {
|
|
348
|
+
th,
|
|
349
|
+
cam: view,
|
|
350
|
+
cyl,
|
|
351
|
+
rpm,
|
|
352
|
+
cursor,
|
|
353
|
+
since,
|
|
354
|
+
live: {solo, overlays: {...ov}, cut, paused, playText: playText(PLAYS[playI]), playK: playI / (PLAYS.length - 1)},
|
|
355
|
+
});
|
|
356
|
+
if (tourChip.classList.contains('on') !== AP.on || !tourChip.firstChild) {
|
|
357
|
+
tourChip.classList.toggle('on', AP.on);
|
|
358
|
+
tourChip.innerHTML = AP.on ? '<i></i>AUTO TOUR · CLICK TO TAKE OVER' : '▶ RESUME TOUR';
|
|
359
|
+
}
|
|
360
|
+
// the site page swaps its poster for the canvas on this
|
|
361
|
+
if (!window.SIM_SHOWN) {
|
|
362
|
+
window.SIM_SHOWN = true;
|
|
363
|
+
dispatchEvent(new Event('simframe'));
|
|
364
|
+
}
|
|
365
|
+
requestAnimationFrame(frame);
|
|
366
|
+
};
|
|
367
|
+
// every shader compiles at once off the main thread before the first frame (kit/warm.js)
|
|
368
|
+
warmComposer(st.renderer, st.composer, st.scene, st.camera).then(() => requestAnimationFrame(frame));
|
|
369
|
+
window.LIVE = {st, cam, startTour, takeOver, get tier() {
|
|
370
|
+
return tier;
|
|
371
|
+
}, get T() {
|
|
372
|
+
return T;
|
|
373
|
+
}};
|
|
374
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Score for the V8 four-stroke explorer: a cool bed (Am9 chords, 92 bpm) at one level the whole way, a soft low thump
|
|
2
|
+
on every power stroke (one every 90 degrees of crank, so the beat tightens when the operator opens the throttle), a
|
|
3
|
+
quiet click on every button press and a rising air under the throttle drag.
|
|
4
|
+
|
|
5
|
+
python run_sfx.py sims/v8-shared/score.py
|
|
6
|
+
|
|
7
|
+
Times and the crank model mirror v8-shared/film.js (SCRIPT, rpmAt, 1/20 playback).
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from sfx.score_kit import airy, bed, chords, hz, thud
|
|
13
|
+
from sfx.synth import click
|
|
14
|
+
|
|
15
|
+
TIMELINE = "../v8-film/timeline.json"
|
|
16
|
+
OUT = os.path.join(os.environ.get("TEARDOWN_OUT", "teardown-out"), "v8-score.wav")
|
|
17
|
+
TARGET_LUFS = -14.0
|
|
18
|
+
SEED = 13
|
|
19
|
+
|
|
20
|
+
CHORDS = chords("Am9:A2 E3 G3 B3 C4/A1", "Fmaj7:F2 C3 E3 A3/F1", "Cmaj7:C3 E3 G3 B3/C2", "G6:G2 D3 E3 B3/G1")
|
|
21
|
+
MOTIF = [(0.5, hz("E5")), (1.5, hz("C5")), (2.5, hz("B4"))]
|
|
22
|
+
CLICKS = (3.5, 6.9, 9.7, 12.1, 14.7, 17.3, 19.9, 22.5)
|
|
23
|
+
RPM = (12.1, 700.0, 2400.0, 1.4)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def smoother(x):
|
|
27
|
+
u = min(1.0, max(0.0, x))
|
|
28
|
+
return u * u * u * (u * (u * 6 - 15) + 10)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def rpm_at(t):
|
|
32
|
+
t0, a, b, d = RPM
|
|
33
|
+
return a + (b - a) * smoother((t - t0) / d)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def firings(dur, dt=1 / 480):
|
|
37
|
+
out, th, t, nxt = [], 12.0, 0.0, 90.0
|
|
38
|
+
while t < dur:
|
|
39
|
+
th += rpm_at(t) / 60 * 360 * dt / 20
|
|
40
|
+
if th >= nxt:
|
|
41
|
+
out.append(t)
|
|
42
|
+
nxt += 90
|
|
43
|
+
t += dt
|
|
44
|
+
return out
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def score(mix, tl):
|
|
48
|
+
dur = tl["duration"]
|
|
49
|
+
left, right, low, drums = bed(dur, 92, CHORDS, MOTIF, motif_voice="epiano", kicks=(0, 2.5), snares=(), hats=8, swing=0.0, keys_vel=0.7, keys_lp=3600)
|
|
50
|
+
mix.put_stereo(0, left, right, 0.12)
|
|
51
|
+
mix.put(0, low, 0.12)
|
|
52
|
+
mix.put(0, drums, 0.04)
|
|
53
|
+
for t in firings(dur - 0.3):
|
|
54
|
+
mix.put(t, thud(62, 0.05, 0.3), 0.045)
|
|
55
|
+
for t in CLICKS:
|
|
56
|
+
mix.put(t, click(2400, 0.025), 0.055)
|
|
57
|
+
mix.put(RPM[0], airy(RPM[3] + 0.6, 400, 1600, 0.6), 0.03)
|
|
58
|
+
# every camera move gets a soft air
|
|
59
|
+
for t in (3.5, 9.7, 14.7, 17.3, 19.9):
|
|
60
|
+
mix.put(t, airy(1.2, 700, 1500, 0.6), 0.018)
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// The V8's stage: a pale grey studio, a soft shadow on an invisible floor, bright soft boxes for the gloss-black parts
|
|
2
|
+
// to catch, GTAO kept off the floor. frame(th, cam, ops) poses the engine for crank angle th and draws one frame.
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import {EffectComposer} from 'three/addons/postprocessing/EffectComposer.js';
|
|
5
|
+
import {GTAOPass} from 'three/addons/postprocessing/GTAOPass.js';
|
|
6
|
+
import {OutputPass} from 'three/addons/postprocessing/OutputPass.js';
|
|
7
|
+
import {Pass} from 'three/addons/postprocessing/Pass.js';
|
|
8
|
+
import {RenderPass} from 'three/addons/postprocessing/RenderPass.js';
|
|
9
|
+
import {buildEngine} from './engine.js';
|
|
10
|
+
|
|
11
|
+
const V3 = THREE.Vector3;
|
|
12
|
+
export const BG = {top: '#f3f3f4', mid: '#e9eaec', low: '#e3e4e6'};
|
|
13
|
+
|
|
14
|
+
// look (every field optional, the film's stage when absent): ao, the GTAO blend (0.75); shadow, 'soft' (VSM, a wide
|
|
15
|
+
// blur) or 'hard' (PCF, a crisp edge); studio, 'full' (four soft boxes) or 'plain' (the top box alone, a flatter read
|
|
16
|
+
// on the gloss); engine, the options for buildEngine. The A/B film's version B is the one caller that sets them.
|
|
17
|
+
// lo: the teardown A/B's version B, cheaper all at once: no environment, no AO, no MSAA, basic hard-edged shadows and
|
|
18
|
+
// a brighter sky light so the flat-shaded parts still read. engine.caps asks for a stencil buffer for the section caps.
|
|
19
|
+
export function createV8Stage({canvas, look = {}}) {
|
|
20
|
+
const lo = !!look.lo;
|
|
21
|
+
const hard = look.shadow === 'hard';
|
|
22
|
+
const renderer = new THREE.WebGLRenderer({canvas, antialias: false, preserveDrawingBuffer: true, powerPreference: 'high-performance'});
|
|
23
|
+
renderer.toneMapping = THREE.NeutralToneMapping;
|
|
24
|
+
renderer.outputColorSpace = THREE.SRGBColorSpace;
|
|
25
|
+
renderer.shadowMap.enabled = true;
|
|
26
|
+
renderer.shadowMap.type = lo ? THREE.BasicShadowMap : hard ? THREE.PCFShadowMap : THREE.VSMShadowMap;
|
|
27
|
+
renderer.localClippingEnabled = true;
|
|
28
|
+
const scene = new THREE.Scene();
|
|
29
|
+
{
|
|
30
|
+
// a screen-space backdrop: pale at the top, a touch darker toward the floor
|
|
31
|
+
const c = document.createElement('canvas');
|
|
32
|
+
c.width = 4;
|
|
33
|
+
c.height = 512;
|
|
34
|
+
const g = c.getContext('2d');
|
|
35
|
+
const gr = g.createLinearGradient(0, 0, 0, 512);
|
|
36
|
+
gr.addColorStop(0, BG.top);
|
|
37
|
+
gr.addColorStop(0.55, BG.mid);
|
|
38
|
+
gr.addColorStop(1, BG.low);
|
|
39
|
+
g.fillStyle = gr;
|
|
40
|
+
g.fillRect(0, 0, 4, 512);
|
|
41
|
+
const tex = new THREE.CanvasTexture(c);
|
|
42
|
+
tex.colorSpace = THREE.SRGBColorSpace;
|
|
43
|
+
scene.background = tex;
|
|
44
|
+
}
|
|
45
|
+
const camera = new THREE.PerspectiveCamera(26, 16 / 9, 0.02, 60);
|
|
46
|
+
const composer = new EffectComposer(renderer, new THREE.WebGLRenderTarget(4, 4, {type: THREE.HalfFloatType, samples: lo ? 0 : 8, stencilBuffer: !!look.engine?.caps}));
|
|
47
|
+
composer.addPass(new RenderPass(scene, camera));
|
|
48
|
+
const gtao = new GTAOPass(scene, camera, 4, 4);
|
|
49
|
+
gtao.output = GTAOPass.OUTPUT.Default;
|
|
50
|
+
gtao.blendIntensity = look.ao ?? 0.75;
|
|
51
|
+
gtao.updateGtaoMaterial({radius: 0.05, distanceExponent: 1.4, thickness: 0.6, scale: 1.0, samples: 16, distanceFallOff: 1.0, screenSpaceRadius: false});
|
|
52
|
+
gtao.updatePdMaterial({lumaPhi: 10, depthPhi: 2, normalPhi: 3, radius: 6, rings: 2, samples: 16});
|
|
53
|
+
class Toggle extends Pass {
|
|
54
|
+
constructor(fn) {
|
|
55
|
+
super();
|
|
56
|
+
this.needsSwap = false;
|
|
57
|
+
this.fn = fn;
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
this.fn();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// the floor's shadow catcher and the section cap stay out of the AO pass
|
|
64
|
+
const aoSkip = (on) => {
|
|
65
|
+
shade.visible = on;
|
|
66
|
+
if (eng.cap) eng.cap.visible = on;
|
|
67
|
+
};
|
|
68
|
+
composer.addPass(new Toggle(() => aoSkip(false)));
|
|
69
|
+
composer.addPass(gtao);
|
|
70
|
+
composer.addPass(new Toggle(() => aoSkip(true)));
|
|
71
|
+
if (lo) gtao.enabled = false;
|
|
72
|
+
composer.addPass(new OutputPass());
|
|
73
|
+
|
|
74
|
+
// a bright studio for the gloss to read: a big top softbox, two side strips, a warm kicker
|
|
75
|
+
if (!lo) {
|
|
76
|
+
const env = new THREE.Scene();
|
|
77
|
+
env.background = new THREE.Color('#d9dadd');
|
|
78
|
+
const box = (w, h, pos, k) => {
|
|
79
|
+
const m = new THREE.Mesh(new THREE.PlaneGeometry(w, h), new THREE.MeshBasicMaterial({color: new THREE.Color(1, 1, 1).multiplyScalar(k), side: THREE.DoubleSide}));
|
|
80
|
+
m.position.copy(pos);
|
|
81
|
+
m.lookAt(0, 0, 0);
|
|
82
|
+
env.add(m);
|
|
83
|
+
};
|
|
84
|
+
box(12, 12, new V3(0, 14, 2), 2.6);
|
|
85
|
+
if (look.studio !== 'plain') {
|
|
86
|
+
box(3, 14, new V3(-12, 4, 6), 3.4);
|
|
87
|
+
box(3, 14, new V3(12, 4, -4), 2.2);
|
|
88
|
+
box(18, 2, new V3(0, 2, 14), 1.6);
|
|
89
|
+
}
|
|
90
|
+
const g = new THREE.Mesh(new THREE.CircleGeometry(40, 32), new THREE.MeshBasicMaterial({color: '#c9cacd', side: THREE.DoubleSide}));
|
|
91
|
+
g.rotation.x = -Math.PI / 2;
|
|
92
|
+
g.position.y = -2;
|
|
93
|
+
env.add(g);
|
|
94
|
+
const pm = new THREE.PMREMGenerator(renderer);
|
|
95
|
+
scene.environment = pm.fromScene(env, 0.02).texture;
|
|
96
|
+
scene.environmentIntensity = 1.0;
|
|
97
|
+
pm.dispose();
|
|
98
|
+
}
|
|
99
|
+
const sun = new THREE.DirectionalLight('#ffffff', 2.2);
|
|
100
|
+
sun.position.set(-1.2, 3.2, 1.6);
|
|
101
|
+
sun.castShadow = true;
|
|
102
|
+
Object.assign(sun.shadow.camera, {left: -0.8, right: 0.8, top: 0.8, bottom: -0.8, near: 0.5, far: 8});
|
|
103
|
+
sun.shadow.mapSize.set(hard || lo ? 2048 : 4096, hard || lo ? 2048 : 4096);
|
|
104
|
+
sun.shadow.radius = hard ? 1 : 14;
|
|
105
|
+
sun.shadow.blurSamples = 24;
|
|
106
|
+
sun.shadow.bias = -0.0004;
|
|
107
|
+
sun.shadow.normalBias = 0.002;
|
|
108
|
+
scene.add(sun, sun.target);
|
|
109
|
+
scene.add(new THREE.HemisphereLight('#ffffff', '#cfd0d3', lo ? 2.2 : 0.7));
|
|
110
|
+
|
|
111
|
+
// the floor: shadow only, on a plane just under the pan
|
|
112
|
+
const FLOOR_Y = -0.14;
|
|
113
|
+
const shade = new THREE.Mesh(
|
|
114
|
+
new THREE.PlaneGeometry(20, 20),
|
|
115
|
+
new THREE.ShadowMaterial({color: '#5d636c', opacity: 0.28, polygonOffset: true, polygonOffsetFactor: -4, polygonOffsetUnits: -8}),
|
|
116
|
+
);
|
|
117
|
+
shade.rotation.x = -Math.PI / 2;
|
|
118
|
+
shade.position.y = FLOOR_Y;
|
|
119
|
+
shade.receiveShadow = true;
|
|
120
|
+
scene.add(shade);
|
|
121
|
+
|
|
122
|
+
const eng = buildEngine(look.engine);
|
|
123
|
+
scene.add(eng.root);
|
|
124
|
+
if (eng.cap) scene.add(eng.cap);
|
|
125
|
+
|
|
126
|
+
const size = {w: 1600, h: 900};
|
|
127
|
+
const resize = (w, h, pr) => {
|
|
128
|
+
size.w = w;
|
|
129
|
+
size.h = h;
|
|
130
|
+
renderer.setPixelRatio(pr);
|
|
131
|
+
renderer.setSize(w, h, false);
|
|
132
|
+
composer.setPixelRatio(pr);
|
|
133
|
+
composer.setSize(w, h);
|
|
134
|
+
camera.aspect = w / h;
|
|
135
|
+
camera.updateProjectionMatrix();
|
|
136
|
+
};
|
|
137
|
+
// cam: target (tx, ty, tz), azimuth from +z toward +x, elevation, distance (radians, metres), sx/sy screen shift
|
|
138
|
+
const frame = (th, cam, ops = {}) => {
|
|
139
|
+
eng.update(th, ops);
|
|
140
|
+
const {tx, ty, tz, az, el, d} = cam;
|
|
141
|
+
camera.position.set(tx + d * Math.cos(el) * Math.sin(az), ty + d * Math.sin(el), tz + d * Math.cos(el) * Math.cos(az));
|
|
142
|
+
camera.lookAt(tx, ty, tz);
|
|
143
|
+
camera.setViewOffset(size.w, size.h, -(cam.sx ?? 0), -(cam.sy ?? 0), size.w, size.h);
|
|
144
|
+
camera.updateMatrixWorld();
|
|
145
|
+
composer.render();
|
|
146
|
+
};
|
|
147
|
+
const pv = new V3();
|
|
148
|
+
const project = (x, y, z) => {
|
|
149
|
+
pv.set(x, y, z).project(camera);
|
|
150
|
+
if (pv.z > 1) return null;
|
|
151
|
+
return [(pv.x * 0.5 + 0.5) * size.w, (-pv.y * 0.5 + 0.5) * size.h];
|
|
152
|
+
};
|
|
153
|
+
const setQuality = ({samples, ao, shadow}) => {
|
|
154
|
+
if (samples !== undefined) {
|
|
155
|
+
for (const t of [composer.renderTarget1, composer.renderTarget2]) {
|
|
156
|
+
t.samples = samples;
|
|
157
|
+
t.dispose();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (ao !== undefined) gtao.enabled = ao;
|
|
161
|
+
if (shadow !== undefined) {
|
|
162
|
+
sun.shadow.mapSize.set(shadow, shadow);
|
|
163
|
+
sun.shadow.map?.dispose();
|
|
164
|
+
sun.shadow.map = null;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const setCut = (mode, zWorld, normal) => {
|
|
168
|
+
eng.setCut(mode, zWorld, normal);
|
|
169
|
+
gtao.normalMaterial.clippingPlanes = mode === 'section' ? [eng.CLIP] : null;
|
|
170
|
+
gtao.normalMaterial.needsUpdate = true;
|
|
171
|
+
};
|
|
172
|
+
return {renderer, scene, camera, eng, composer, gtao, sun, resize, frame, project, size, FLOOR_Y, setQuality, setCut};
|
|
173
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Sound check: waveform with every timeline beat drawn on top, plus loudness.
|
|
3
|
+
//
|
|
4
|
+
// node wave.mjs teardown-out/effort.wav --timeline sfx/cues/effort_timeline.json
|
|
5
|
+
// node wave.mjs final.mp4 --timeline timeline.json measure what you will actually post
|
|
6
|
+
// without --timeline: waveform and loudness only, no beat lines
|
|
7
|
+
// → <input>_wave.png next to the input
|
|
8
|
+
//
|
|
9
|
+
// Every hit in the waveform should sit on (or a hair after) a beat line.
|
|
10
|
+
import {execFileSync, spawnSync} from 'node:child_process';
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import path from 'node:path';
|
|
13
|
+
import {FFMPEG, FFPROBE} from './paths.mjs';
|
|
14
|
+
|
|
15
|
+
const argv = process.argv.slice(2);
|
|
16
|
+
const ti = argv.indexOf('--timeline');
|
|
17
|
+
const timelinePath = ti === -1 ? null : path.resolve(argv.splice(ti, 2)[1]);
|
|
18
|
+
if (!argv[0] || !fs.existsSync(argv[0])) {
|
|
19
|
+
console.error('usage: node wave.mjs <file.wav|file.mp4> [--timeline timeline.json]');
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
const input = path.resolve(argv[0]);
|
|
23
|
+
|
|
24
|
+
const TARGET_LUFS = -14;
|
|
25
|
+
const MAX_TRUE_PEAK = -1;
|
|
26
|
+
const W = 1800;
|
|
27
|
+
const H = 280;
|
|
28
|
+
|
|
29
|
+
const probed = Number(execFileSync(FFPROBE, ['-v', 'error', '-show_entries', 'format=duration', '-of', 'csv=p=0', input]).toString());
|
|
30
|
+
const tl = timelinePath ? JSON.parse(fs.readFileSync(timelinePath, 'utf8')) : {duration: probed};
|
|
31
|
+
tl.duration ??= probed;
|
|
32
|
+
const beats = [];
|
|
33
|
+
const walk = (v, key) => {
|
|
34
|
+
if (key === 'fps' || key === 'duration') return;
|
|
35
|
+
if (typeof v === 'number') beats.push(v);
|
|
36
|
+
else if (Array.isArray(v)) v.forEach((x) => walk(x));
|
|
37
|
+
else if (v && typeof v === 'object') Object.entries(v).forEach(([k, x]) => walk(x, k));
|
|
38
|
+
};
|
|
39
|
+
walk(tl);
|
|
40
|
+
|
|
41
|
+
const marks = [...new Set(beats)]
|
|
42
|
+
.map((t) => `drawbox=x=${Math.round((t / tl.duration) * W)}:y=0:w=2:h=ih:color=0xD97757@0.9:t=fill`)
|
|
43
|
+
.join(',');
|
|
44
|
+
const seconds = `drawgrid=w=${W / tl.duration}:h=${H}:color=white@0.12`;
|
|
45
|
+
|
|
46
|
+
const png = input.replace(/\.[^.]+$/, '') + '_wave.png';
|
|
47
|
+
execFileSync(FFMPEG, [
|
|
48
|
+
'-loglevel', 'error', '-y', '-i', input,
|
|
49
|
+
'-filter_complex',
|
|
50
|
+
`color=c=0x141413:s=${W}x${H}:d=1[bg];` +
|
|
51
|
+
`[0:a]aformat=channel_layouts=mono,showwavespic=s=${W}x${H}:scale=sqrt:colors=0x8A877F[w];` +
|
|
52
|
+
`[bg][w]overlay=format=auto,${seconds}${marks ? ',' + marks : ''}`,
|
|
53
|
+
'-frames:v', '1', png,
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
const r = spawnSync(FFMPEG, ['-hide_banner', '-nostats', '-i', input, '-af', 'ebur128=peak=true', '-f', 'null', '-'], {
|
|
57
|
+
encoding: 'utf8',
|
|
58
|
+
});
|
|
59
|
+
const summary = r.stderr.slice(r.stderr.lastIndexOf('Summary'));
|
|
60
|
+
const lufs = Number(summary.match(/I:\s+(-?[\d.]+) LUFS/)?.[1]);
|
|
61
|
+
const peak = Number(summary.match(/Peak:\s+(-?[\d.]+) dBFS/)?.[1]);
|
|
62
|
+
|
|
63
|
+
console.log(`waveform: ${png} (${beats.length} beats in coral, grid = 1s)`);
|
|
64
|
+
console.log(`loudness: ${lufs} LUFS integrated (target ${TARGET_LUFS} ±1)`);
|
|
65
|
+
console.log(`true peak: ${peak} dBFS (keep ≤ ${MAX_TRUE_PEAK})`);
|
|
66
|
+
if (Math.abs(lufs - TARGET_LUFS) > 1) console.warn('WARN loudness off target: re-run the cue sheet, check TARGET_LUFS');
|
|
67
|
+
if (peak > MAX_TRUE_PEAK) console.warn('WARN true peak too hot: AAC encoding may clip, lower the master ceiling');
|