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,339 @@
|
|
|
1
|
+
// The four-stroke explorer's overlay: title and the rev counter top left, the slider-crank and cross-plane panels,
|
|
2
|
+
// the transport bottom left, the charge legend top centre, the cylinder state, valve timing and indicator diagram on
|
|
3
|
+
// the right, camera / cutaway / overlay toggles bottom right, the firing order bottom centre, and callouts with thin
|
|
4
|
+
// leaders into the engine. Fixed 1600 x 900 CSS layout; update(s) redraws every live part from the frame's state.
|
|
5
|
+
import {E, ORDER, PIN_PHASE, pressure, STROKES, volume, liftEx, liftIn, pistonFrac} from './kin.js';
|
|
6
|
+
|
|
7
|
+
export const C = {ink: '#16181b', mute: '#8b8f95', faint: '#c9ccd0', line: '#e1e3e6', panel: 'rgba(248,248,249,.94)', red: '#d6182b', blue: '#3d8fe0', grey: '#5d6670', orange: '#f05a23', exh: '#8b8f95'};
|
|
8
|
+
export const CAMS = ['hero', 'front', 'side', 'valley', 'cyl'];
|
|
9
|
+
export const CUTS = ['glass', 'section', 'solid'];
|
|
10
|
+
export const OVERLAYS = ['callouts', 'charge', 'arrows', 'isolate', 'refract', 'charts'];
|
|
11
|
+
const CSS = `
|
|
12
|
+
#app{font-family:Inter,system-ui,sans-serif;color:${C.ink};-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
|
|
13
|
+
.ui{position:absolute;inset:0;pointer-events:none}
|
|
14
|
+
.pn{position:absolute;background:${C.panel};border:1px solid ${C.line};box-shadow:0 1px 2px rgba(20,22,26,.04)}
|
|
15
|
+
.cp{font-size:9.6px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;white-space:nowrap}
|
|
16
|
+
.mu{color:${C.mute}}
|
|
17
|
+
.tb{position:absolute;height:19px;padding:0 7px;display:flex;align-items:center;justify-content:center;font-size:8.8px;font-weight:600;letter-spacing:.9px;text-transform:uppercase;border:1px solid ${C.line};background:#fff;color:${C.ink};white-space:nowrap}
|
|
18
|
+
.call{position:absolute;white-space:nowrap}
|
|
19
|
+
.call b{display:block;font-size:11.5px;font-weight:600;letter-spacing:.1px}
|
|
20
|
+
.call span{display:block;font-size:8.6px;font-weight:500;letter-spacing:1.4px;color:${C.mute};text-transform:uppercase;margin-top:2px}
|
|
21
|
+
.cur{position:absolute;left:0;top:0;z-index:50;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3))}
|
|
22
|
+
.ring{position:absolute;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;border:1.5px solid ${C.red};opacity:0;z-index:49}
|
|
23
|
+
`;
|
|
24
|
+
const el = (h) => {
|
|
25
|
+
const d = document.createElement('div');
|
|
26
|
+
d.innerHTML = h.trim();
|
|
27
|
+
return d.firstElementChild;
|
|
28
|
+
};
|
|
29
|
+
export const RPM_MAX = 8000;
|
|
30
|
+
|
|
31
|
+
export function createConsole(app) {
|
|
32
|
+
const style = document.createElement('style');
|
|
33
|
+
style.textContent = CSS;
|
|
34
|
+
document.head.appendChild(style);
|
|
35
|
+
const ui = el(`<div class="ui"></div>`);
|
|
36
|
+
app.appendChild(ui);
|
|
37
|
+
const add = (h) => {
|
|
38
|
+
const n = el(h);
|
|
39
|
+
ui.appendChild(n);
|
|
40
|
+
return n;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// ------------------------------------------------------------ title and rev counter
|
|
44
|
+
add(`<div style="position:absolute;left:35px;top:33px;width:43px;height:3px;background:${C.red}"></div>`);
|
|
45
|
+
add(`<div style="position:absolute;left:35px;top:47px;font-size:24px;font-weight:700;letter-spacing:-.2px">V8 <span style="color:${C.red}">·</span> Four-Stroke</div>`);
|
|
46
|
+
add(`<div class="cp" style="position:absolute;left:35px;top:81px;font-weight:500;letter-spacing:1.7px;font-size:9.4px">90° CROSS-PLANE • FIRING ORDER 1-8-4-3-6-5-7-2 • 5.8 L</div>`);
|
|
47
|
+
const rpmBig = add(`<div style="position:absolute;left:33px;top:103px;font-size:56px;font-weight:800;letter-spacing:-3.2px;color:${C.red};line-height:1"></div>`);
|
|
48
|
+
add(`<div style="position:absolute;left:255px;top:141px;font-size:11px;font-weight:500">8000</div>`);
|
|
49
|
+
add(`<div style="position:absolute;left:35px;top:166px;width:247px;height:6px;border:1px solid ${C.faint};border-top:none"></div>`);
|
|
50
|
+
add(`<div style="position:absolute;left:35px;top:174px;width:247px;height:9px;background:#e6e7e9"></div>`);
|
|
51
|
+
const rpmFill = add(`<div style="position:absolute;left:35px;top:174px;height:9px;background:${C.red}"></div>`);
|
|
52
|
+
add(`<div class="cp mu" style="position:absolute;left:35px;top:188px;font-size:9px;font-weight:500">0</div>`);
|
|
53
|
+
add(`<div class="cp" style="position:absolute;left:212px;top:188px;font-size:9px;font-weight:500;color:${C.ink}">REV / MIN</div>`);
|
|
54
|
+
add(`<div style="position:absolute;left:35px;top:206px;width:247px;height:1px;background:${C.faint}"></div>`);
|
|
55
|
+
add(`<div style="position:absolute;left:35px;top:213px;font-size:12.5px;font-weight:500">Crankshaft</div>`);
|
|
56
|
+
|
|
57
|
+
// ------------------------------------------------------------ slider-crank
|
|
58
|
+
add(`<div class="pn" style="left:35px;top:274px;width:247px;height:208px"></div>`);
|
|
59
|
+
add(`<div class="cp" style="position:absolute;left:46px;top:286px;font-weight:700">SLIDER-CRANK</div>`);
|
|
60
|
+
const scAng = add(`<div class="cp mu" style="position:absolute;right:${1600 - 271}px;top:286px;font-weight:500"></div>`);
|
|
61
|
+
const sc = add(`<svg style="position:absolute;left:46px;top:303px" width="226" height="130"></svg>`);
|
|
62
|
+
add(`<div style="position:absolute;left:46px;top:440px;width:226px;height:1px;background:${C.line}"></div>`);
|
|
63
|
+
add(`<div style="position:absolute;left:46px;top:447px;font-size:9.5px;color:${C.mute};font-family:'JetBrains Mono',monospace">s = r·cos φ + √(L² − r² sin²φ)</div>`);
|
|
64
|
+
add(`<div style="position:absolute;left:46px;top:461px;font-size:9.5px;color:${C.mute}">r <b style="color:${C.ink}">4.4</b> cm · L <b style="color:${C.ink}">14.5</b> cm</div>`);
|
|
65
|
+
|
|
66
|
+
// ------------------------------------------------------------ cross-plane crank
|
|
67
|
+
add(`<div class="pn" style="left:35px;top:490px;width:247px;height:192px"></div>`);
|
|
68
|
+
add(`<div class="cp" style="position:absolute;left:46px;top:502px;font-weight:700">CROSS-PLANE CRANK</div>`);
|
|
69
|
+
add(`<div class="cp mu" style="position:absolute;right:${1600 - 271}px;top:502px;font-weight:500">FRONT VIEW</div>`);
|
|
70
|
+
add(`<div class="cp mu" style="position:absolute;left:46px;top:516px;font-size:8.6px;font-weight:500">R BANK</div>`);
|
|
71
|
+
add(`<div class="cp mu" style="position:absolute;right:${1600 - 271}px;top:516px;font-size:8.6px;font-weight:500">L BANK</div>`);
|
|
72
|
+
const cp = add(`<svg style="position:absolute;left:46px;top:526px" width="226" height="130"></svg>`);
|
|
73
|
+
add(`<div style="position:absolute;left:46px;top:654px;width:226px;height:1px;background:${C.line}"></div>`);
|
|
74
|
+
add(`<div style="position:absolute;left:46px;top:661px;font-size:9.5px;color:${C.mute}">Journals 90° apart · banks at ±45°</div>`);
|
|
75
|
+
|
|
76
|
+
// ------------------------------------------------------------ transport
|
|
77
|
+
add(`<div class="pn" style="left:35px;top:774px;width:259px;height:111px"></div>`);
|
|
78
|
+
const btn = {};
|
|
79
|
+
btn.pause = add(`<div class="tb" style="left:45px;top:782px;width:99px;height:26px;background:${C.red};color:#fff;border-color:${C.red};font-size:9.6px">❚❚ PAUSE</div>`);
|
|
80
|
+
btn.back = add(`<div class="tb" style="left:149px;top:782px;width:66px;height:26px;font-size:9.6px">−15°</div>`);
|
|
81
|
+
btn.fwd = add(`<div class="tb" style="left:219px;top:782px;width:66px;height:26px;font-size:9.6px">+15°</div>`);
|
|
82
|
+
add(`<div class="cp" style="position:absolute;left:45px;top:818px;font-weight:500">ENGINE SPEED</div>`);
|
|
83
|
+
const speedVal = add(`<div class="cp" style="position:absolute;right:${1600 - 284}px;top:818px;font-weight:700"></div>`);
|
|
84
|
+
const SL = {x: 46, w: 238};
|
|
85
|
+
add(`<div style="position:absolute;left:${SL.x}px;top:836px;width:${SL.w}px;height:2px;background:#e1e3e6"></div>`);
|
|
86
|
+
const speedKnob = add(`<div style="position:absolute;top:831px;width:9px;height:11px;margin-left:-4.5px;background:${C.red}"></div>`);
|
|
87
|
+
add(`<div class="cp" style="position:absolute;left:45px;top:851px;font-weight:500">PLAYBACK</div>`);
|
|
88
|
+
const playVal = add(`<div class="cp" style="position:absolute;right:${1600 - 284}px;top:851px;font-weight:700"></div>`);
|
|
89
|
+
add(`<div style="position:absolute;left:${SL.x}px;top:869px;width:${SL.w}px;height:2px;background:#e1e3e6"></div>`);
|
|
90
|
+
const playKnob = add(`<div style="position:absolute;top:864px;width:9px;height:11px;margin-left:-4.5px;background:${C.red}"></div>`);
|
|
91
|
+
|
|
92
|
+
// ------------------------------------------------------------ legend
|
|
93
|
+
add(`<div class="cp" style="position:absolute;left:598px;top:36px;display:flex;gap:16px;font-weight:500;font-size:9.6px">
|
|
94
|
+
${[['AIR & FUEL', C.blue], ['COMPRESSED', C.grey], ['COMBUSTION', C.orange], ['EXHAUST', C.exh]].map(([n, c]) => `<span><i style="display:inline-block;width:15px;height:2.4px;background:${c};vertical-align:middle;margin-right:6px"></i>${n}</span>`).join('')}</div>`);
|
|
95
|
+
|
|
96
|
+
// ------------------------------------------------------------ cylinder state
|
|
97
|
+
add(`<div class="pn" style="left:1318px;top:36px;width:245px;height:209px"></div>`);
|
|
98
|
+
const cylName = add(`<div class="cp" style="position:absolute;left:1329px;top:47px;font-weight:500"></div>`);
|
|
99
|
+
const cylCrank = add(`<div class="cp mu" style="position:absolute;right:${1600 - 1552}px;top:47px;font-weight:500"></div>`);
|
|
100
|
+
const strokeBig = add(`<div style="position:absolute;left:1329px;top:61px;font-size:24px;font-weight:700"></div>`);
|
|
101
|
+
const strokeList = add(`<div style="position:absolute;left:1329px;top:97px"></div>`);
|
|
102
|
+
add(`<div style="position:absolute;left:1329px;top:165px;width:224px;height:1px;background:${C.line}"></div>`);
|
|
103
|
+
const barBig = add(`<div style="position:absolute;left:1328px;top:173px;font-size:36px;font-weight:800;letter-spacing:-1.6px;color:${C.red};line-height:1"></div>`);
|
|
104
|
+
const barUnit = add(`<div style="position:absolute;top:197px;font-size:10.5px;font-weight:500;letter-spacing:1px;line-height:1.35">BAR<br><span style="color:${C.mute};letter-spacing:1.5px">CHAMBER PRESSURE</span></div>`);
|
|
105
|
+
add(`<div style="position:absolute;left:1329px;top:228px;width:224px;height:5px;background:#e6e7e9"></div>`);
|
|
106
|
+
const barFill = add(`<div style="position:absolute;left:1329px;top:228px;height:5px;background:${C.red}"></div>`);
|
|
107
|
+
|
|
108
|
+
// ------------------------------------------------------------ valve timing
|
|
109
|
+
add(`<div class="pn" data-g="charts" style="left:1318px;top:252px;width:245px;height:184px"></div>`);
|
|
110
|
+
add(`<div class="cp" data-g="charts" style="position:absolute;left:1329px;top:263px;font-weight:700">VALVE TIMING</div>`);
|
|
111
|
+
add(`<div class="cp mu" data-g="charts" style="position:absolute;right:${1600 - 1552}px;top:263px;font-weight:500">DRAG TO SCRUB</div>`);
|
|
112
|
+
const vtLeg = add(`<div class="cp" data-g="charts" style="position:absolute;left:1329px;top:280px;font-weight:500;font-size:9px"></div>`);
|
|
113
|
+
const vt = add(`<svg data-g="charts" style="position:absolute;left:1326px;top:296px" width="232" height="135"></svg>`);
|
|
114
|
+
|
|
115
|
+
// ------------------------------------------------------------ indicator diagram
|
|
116
|
+
add(`<div class="pn" data-g="charts" style="left:1318px;top:443px;width:245px;height:150px"></div>`);
|
|
117
|
+
add(`<div class="cp" data-g="charts" style="position:absolute;left:1329px;top:455px;font-weight:700">INDICATOR DIAGRAM</div>`);
|
|
118
|
+
const idCyl = add(`<div class="cp mu" data-g="charts" style="position:absolute;right:${1600 - 1552}px;top:455px;font-weight:500"></div>`);
|
|
119
|
+
const id = add(`<svg data-g="charts" style="position:absolute;left:1326px;top:470px" width="232" height="120"></svg>`);
|
|
120
|
+
|
|
121
|
+
// ------------------------------------------------------------ camera, cutaway, overlays
|
|
122
|
+
add(`<div class="pn" style="left:1296px;top:720px;width:268px;height:165px"></div>`);
|
|
123
|
+
const group = (title, keys, y, labels) => {
|
|
124
|
+
add(`<div class="cp mu" style="position:absolute;left:1305px;top:${y}px;font-weight:500">${title}</div>`);
|
|
125
|
+
let x = 1305;
|
|
126
|
+
let yy = y + 15;
|
|
127
|
+
keys.forEach((k) => {
|
|
128
|
+
const w = Math.round(labels[k].length * 6.2 + 14);
|
|
129
|
+
if (x + w > 1556) {
|
|
130
|
+
x = 1305;
|
|
131
|
+
yy += 23;
|
|
132
|
+
}
|
|
133
|
+
btn[k] = add(`<div class="tb" style="left:${x}px;top:${yy}px;width:${w}px">${labels[k]}</div>`);
|
|
134
|
+
x += w + 4;
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
const L = Object.fromEntries([...CAMS, ...CUTS, ...OVERLAYS].map((k) => [k, k.toUpperCase()]));
|
|
138
|
+
group('CAMERA', CAMS, 727, L);
|
|
139
|
+
group('CUTAWAY', CUTS, 771, L);
|
|
140
|
+
group('OVERLAYS', OVERLAYS, 815, L);
|
|
141
|
+
|
|
142
|
+
// ------------------------------------------------------------ firing order
|
|
143
|
+
add(`<div class="cp mu" style="position:absolute;left:0;right:0;top:795px;text-align:center;font-weight:500"><span style="color:${C.ink}">FIRING ORDER</span> — CLICK TO TRACK</div>`);
|
|
144
|
+
const fo = add(`<svg style="position:absolute;left:640px;top:815px" width="320" height="34"></svg>`);
|
|
145
|
+
add(`<div class="cp mu" style="position:absolute;left:0;right:0;top:852px;text-align:center;font-weight:500">ONE POWER STROKE EVERY 90° OF CRANK ROTATION</div>`);
|
|
146
|
+
add(`<div class="cp" style="position:absolute;left:0;right:0;top:874px;text-align:center;font-weight:500;color:${C.faint}">DRAG TO ORBIT · SCROLL TO ZOOM · H HIDES THE OVERLAY</div>`);
|
|
147
|
+
|
|
148
|
+
// ------------------------------------------------------------ callouts, the pointer
|
|
149
|
+
const callSvg = add(`<svg data-callouts style="position:absolute;inset:0;overflow:visible" width="1600" height="900"></svg>`);
|
|
150
|
+
const callG = add(`<div data-callouts style="position:absolute;inset:0"></div>`);
|
|
151
|
+
const ring = add(`<div class="ring"></div>`);
|
|
152
|
+
const cur = add(`<div class="cur"><svg width="22" height="22" viewBox="0 0 34 34"><path d="M4 3 L30 13.5 L17.5 17.5 L13.5 30 Z" fill="#111" stroke="#fff" stroke-width="2.2" stroke-linejoin="round"/></svg></div>`);
|
|
153
|
+
const centre = (n) => {
|
|
154
|
+
const r = n.getBoundingClientRect();
|
|
155
|
+
return [r.left + r.width / 2, r.top + r.height / 2];
|
|
156
|
+
};
|
|
157
|
+
const foSpot = (i) => [640 + 20 + i * 40, 815 + 17];
|
|
158
|
+
const spots = Object.fromEntries(Object.entries(btn).map(([k, n]) => [k, centre(n)]));
|
|
159
|
+
const knobX = (v) => SL.x + v * SL.w;
|
|
160
|
+
|
|
161
|
+
const pointer = (c) => {
|
|
162
|
+
cur.style.display = c.x < 0 ? 'none' : 'block';
|
|
163
|
+
cur.style.transform = `translate(${(c.x - 3).toFixed(2)}px, ${(c.y - 2).toFixed(2)}px) scale(${c.press ? 0.88 : 1})`;
|
|
164
|
+
ring.style.left = `${c.ringX}px`;
|
|
165
|
+
ring.style.top = `${c.ringY}px`;
|
|
166
|
+
ring.style.opacity = String(c.ring * 0.85);
|
|
167
|
+
ring.style.transform = `scale(${(0.35 + 0.9 * (1 - c.ring)).toFixed(3)})`;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
spots,
|
|
172
|
+
foSpot,
|
|
173
|
+
speedKnob: (v) => [knobX(v), 836],
|
|
174
|
+
playKnob: (v) => [knobX(v), 869],
|
|
175
|
+
btn,
|
|
176
|
+
root: ui,
|
|
177
|
+
update(s) {
|
|
178
|
+
rpmBig.textContent = Math.round(s.rpm);
|
|
179
|
+
rpmFill.style.width = `${((s.rpm / RPM_MAX) * 247).toFixed(1)}px`;
|
|
180
|
+
speedVal.textContent = `${Math.round(s.rpm)} RPM`;
|
|
181
|
+
speedKnob.style.left = `${knobX(s.rpmK).toFixed(1)}px`;
|
|
182
|
+
playVal.textContent = s.playText;
|
|
183
|
+
playKnob.style.left = `${knobX(s.playK).toFixed(1)}px`;
|
|
184
|
+
btn.pause.innerHTML = s.paused ? '▶ PLAY' : '❚❚ PAUSE';
|
|
185
|
+
|
|
186
|
+
// slider-crank: the tracked cylinder's crank and piston
|
|
187
|
+
const ph = s.psi;
|
|
188
|
+
const ca = ((ph % 360) + 360) % 360;
|
|
189
|
+
scAng.innerHTML = `<b style="color:${C.ink}">${Math.round(ca)}°</b> AFTER TDC`;
|
|
190
|
+
{
|
|
191
|
+
const cx = 40;
|
|
192
|
+
const cy = 62;
|
|
193
|
+
const r = 18;
|
|
194
|
+
const Lr = 60;
|
|
195
|
+
const a = (ca * Math.PI) / 180;
|
|
196
|
+
const px = cx + r * Math.cos(a);
|
|
197
|
+
const py = cy - r * Math.sin(a);
|
|
198
|
+
const sx = cx + r * Math.cos(a) + Math.sqrt(Lr * Lr - (r * Math.sin(a)) ** 2);
|
|
199
|
+
sc.innerHTML = `<circle cx="${cx}" cy="${cy}" r="${r + 18}" fill="none" stroke="${C.line}"/><circle cx="${cx}" cy="${cy}" r="${r}" fill="none" stroke="${C.faint}" stroke-dasharray="2 2"/>
|
|
200
|
+
<line x1="${cx}" y1="${cy}" x2="${px.toFixed(1)}" y2="${py.toFixed(1)}" stroke="${C.red}" stroke-width="2"/>
|
|
201
|
+
<line x1="${px.toFixed(1)}" y1="${py.toFixed(1)}" x2="${sx.toFixed(1)}" y2="${cy}" stroke="${C.ink}" stroke-width="1.2"/>
|
|
202
|
+
<rect x="${(sx - 10).toFixed(1)}" y="${cy - 30}" width="20" height="60" fill="#fff" stroke="${C.ink}" stroke-width="1.6"/>
|
|
203
|
+
<line x1="${cx + Lr - r + 10}" x2="226" y1="${cy - 32}" y2="${cy - 32}" stroke="${C.ink}" stroke-width="1"/><line x1="${cx + Lr - r + 10}" x2="226" y1="${cy + 32}" y2="${cy + 32}" stroke="${C.ink}" stroke-width="1"/>
|
|
204
|
+
<circle cx="${cx}" cy="${cy}" r="3.5" fill="#fff" stroke="${C.ink}" stroke-width="1.6"/><circle cx="${px.toFixed(1)}" cy="${py.toFixed(1)}" r="3.5" fill="#fff" stroke="${C.ink}" stroke-width="1.6"/><circle cx="${sx.toFixed(1)}" cy="${cy}" r="3" fill="#fff" stroke="${C.ink}" stroke-width="1.4"/>
|
|
205
|
+
<text x="${(cx + px) / 2 + 4}" y="${(cy + py) / 2 - 3}" font-size="9" fill="${C.ink}">r</text><text x="${(px + sx) / 2}" y="${cy - 6}" font-size="9" fill="${C.ink}">L</text>
|
|
206
|
+
<line x1="${cx + Lr - r}" x2="${cx + Lr + r}" y1="112" y2="112" stroke="${C.ink}" stroke-width=".8"/><line x1="${cx + Lr - r}" x2="${cx + Lr - r}" y1="106" y2="116" stroke="${C.ink}" stroke-width=".8"/><line x1="${cx + Lr + r}" x2="${cx + Lr + r}" y1="106" y2="116" stroke="${C.ink}" stroke-width=".8"/>
|
|
207
|
+
<text x="${cx + Lr + r + 6}" y="126" font-size="9.4" letter-spacing="1.4" fill="${C.mute}">STROKE 89 MM</text>`;
|
|
208
|
+
}
|
|
209
|
+
// cross-plane: four throws at their real angles, the tracked pin lit
|
|
210
|
+
{
|
|
211
|
+
const cx = 113;
|
|
212
|
+
const cy = 70;
|
|
213
|
+
let h = `<circle cx="${cx}" cy="${cy}" r="40" fill="none" stroke="${C.line}"/>`;
|
|
214
|
+
for (const sgn of [-1, 1]) {
|
|
215
|
+
const a = (-90 + sgn * 45) * (Math.PI / 180);
|
|
216
|
+
const bx = cx + Math.cos(a) * 70;
|
|
217
|
+
const by = cy + Math.sin(a) * 70;
|
|
218
|
+
h += `<line x1="${cx}" y1="${cy}" x2="${bx}" y2="${by}" stroke="${C.faint}" stroke-width=".8" stroke-dasharray="3 3"/><g transform="translate(${bx} ${by}) rotate(${sgn * 45})"><rect x="-10" y="-12" width="20" height="16" fill="#fff" stroke="${C.ink}" stroke-width="1.4"/><line x1="-6" x2="6" y1="-1" y2="-1" stroke="${C.ink}" stroke-width="1.2"/></g>`;
|
|
219
|
+
}
|
|
220
|
+
const names = ['1·2', '3·4', '5·6', '7·8'];
|
|
221
|
+
PIN_PHASE.forEach((ph0, p) => {
|
|
222
|
+
const a = ((s.theta + ph0) * Math.PI) / 180;
|
|
223
|
+
const x = cx + Math.sin(a) * 40;
|
|
224
|
+
const y = cy - Math.cos(a) * 40;
|
|
225
|
+
const lit = p === s.pin;
|
|
226
|
+
h += `<line x1="${cx}" y1="${cy}" x2="${x.toFixed(1)}" y2="${y.toFixed(1)}" stroke="${C.ink}" stroke-width=".9"/><circle cx="${x.toFixed(1)}" cy="${y.toFixed(1)}" r="9.5" fill="${lit ? C.red : '#fff'}" stroke="${lit ? C.red : C.ink}" stroke-width="1.3"/><text x="${x.toFixed(1)}" y="${(y + 3).toFixed(1)}" font-size="7.6" text-anchor="middle" fill="${lit ? '#fff' : C.ink}" font-weight="600">${names[p]}</text>`;
|
|
227
|
+
});
|
|
228
|
+
h += `<circle cx="${cx}" cy="${cy}" r="6" fill="#fff" stroke="${C.ink}" stroke-width="1.3"/><line x1="${cx - 4}" x2="${cx + 4}" y1="${cy - 4}" y2="${cy + 4}" stroke="${C.ink}"/><line x1="${cx - 4}" x2="${cx + 4}" y1="${cy + 4}" y2="${cy - 4}" stroke="${C.ink}"/><text x="${cx - 12}" y="${cy - 26}" font-size="8" fill="${C.ink}">90°</text>`;
|
|
229
|
+
cp.innerHTML = h;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// cylinder state
|
|
233
|
+
const stroke = STROKES[Math.floor(((ph % 720) + 720) % 720 / 180)];
|
|
234
|
+
cylName.innerHTML = `CYLINDER <b>${s.cyl}</b>`;
|
|
235
|
+
cylCrank.innerHTML = `<b style="color:${C.ink}">${Math.round(((ph % 720) + 720) % 720)}°</b> CRANK`;
|
|
236
|
+
strokeBig.textContent = stroke.charAt(0) + stroke.slice(1).toLowerCase();
|
|
237
|
+
strokeBig.style.color = stroke === 'POWER' ? C.red : C.ink;
|
|
238
|
+
strokeList.innerHTML = ['INTAKE', 'COMPRESSION', 'POWER', 'EXHAUST']
|
|
239
|
+
.map((n) => `<div class="cp" style="height:16.5px;display:flex;align-items:center;gap:10px;font-weight:500;color:${n === stroke ? C.ink : C.mute}"><i style="display:block;width:31px;height:2px;background:${n === stroke ? C.red : C.line}"></i>${n}</div>`)
|
|
240
|
+
.join('');
|
|
241
|
+
const bar = pressure(ph);
|
|
242
|
+
barBig.textContent = bar < 10 ? bar.toFixed(1) : Math.round(bar);
|
|
243
|
+
barUnit.style.left = `${1334 + barBig.getBoundingClientRect().width + 8}px`;
|
|
244
|
+
barFill.style.width = `${Math.min(224, (bar / 60) * 224).toFixed(1)}px`;
|
|
245
|
+
|
|
246
|
+
// valve timing over 720°, the cursor at the tracked cylinder's phase
|
|
247
|
+
{
|
|
248
|
+
const W = 232;
|
|
249
|
+
const X = (d) => 16 + (d / 720) * (W - 24);
|
|
250
|
+
const Y = (v) => 108 - v * 92;
|
|
251
|
+
let h = `<text x="2" y="14" font-size="6.5" fill="${C.mute}">%</text>`;
|
|
252
|
+
for (const [v, l] of [[0, '0'], [0.5, '50'], [1, '100']]) h += `<text x="12" y="${Y(v) + 2}" font-size="6.5" text-anchor="end" fill="${C.mute}">${l}</text>`;
|
|
253
|
+
['POWER', 'EXHAUST', 'INTAKE', 'COMPR'].forEach((n, i) => (h += `<text x="${X(i * 180 + 90)}" y="10" font-size="6.2" letter-spacing=".8" text-anchor="middle" fill="${C.mute}">${n}</text>`));
|
|
254
|
+
const seg = Math.floor(((ph % 720) + 720) % 720 / 180);
|
|
255
|
+
h += `<rect x="${X(seg * 180)}" y="${Y(1)}" width="${X(180) - X(0)}" height="92" fill="${seg === 0 ? 'rgba(214,24,43,.1)' : 'rgba(20,22,26,.05)'}"/>`;
|
|
256
|
+
for (const d of [180, 360, 540]) h += `<line x1="${X(d)}" x2="${X(d)}" y1="${Y(1)}" y2="${Y(0)}" stroke="${C.line}" stroke-width=".8"/>`;
|
|
257
|
+
h += `<line x1="${X(0)}" x2="${X(720)}" y1="${Y(0)}" y2="${Y(0)}" stroke="${C.ink}" stroke-width=".8"/>`;
|
|
258
|
+
const curve = (fn, col, w) => {
|
|
259
|
+
let p = '';
|
|
260
|
+
for (let d = 0; d <= 720; d += 4) p += `${d ? 'L' : 'M'}${X(d).toFixed(1)} ${Y(fn(d)).toFixed(1)}`;
|
|
261
|
+
return `<path d="${p}" fill="none" stroke="${col}" stroke-width="${w}"/>`;
|
|
262
|
+
};
|
|
263
|
+
h += curve((d) => 1 - pistonFrac(d), C.grey, 1.3) + curve(liftEx, C.orange, 1.5) + curve(liftIn, C.blue, 1.5);
|
|
264
|
+
const cxp = X(((ph % 720) + 720) % 720);
|
|
265
|
+
h += `<line x1="${cxp}" x2="${cxp}" y1="${Y(1) - 4}" y2="${Y(0)}" stroke="${C.red}" stroke-width="1.4"/>`;
|
|
266
|
+
for (const d of [0, 180, 360, 540, 720]) h += `<text x="${X(d)}" y="${Y(0) + 10}" font-size="6.5" text-anchor="middle" fill="${C.mute}">${d}</text>`;
|
|
267
|
+
h += `<text x="${X(720)}" y="${Y(0) + 20}" font-size="6.2" letter-spacing="1" text-anchor="end" fill="${C.mute}">CRANK ANGLE AFTER IGNITION</text>`;
|
|
268
|
+
vt.innerHTML = h;
|
|
269
|
+
vtLeg.innerHTML = `<span style="color:${C.grey}">—</span> PISTON <b>${Math.round((1 - pistonFrac(ph)) * 100)}</b> % <span style="color:${C.blue}">—</span> IN <b>${liftIn(ph).toFixed(2)}</b> <span style="color:${C.orange}">—</span> EX <b>${liftEx(ph).toFixed(2)}</b>`;
|
|
270
|
+
}
|
|
271
|
+
// indicator diagram: pressure against volume over the cycle, the dot at the tracked cylinder's phase
|
|
272
|
+
{
|
|
273
|
+
idCyl.innerHTML = `CYL <b style="color:${C.ink}">${s.cyl}</b>`;
|
|
274
|
+
const W = 232;
|
|
275
|
+
const X = (v) => 18 + ((v - 1) / (E.cr - 1)) * (W - 30);
|
|
276
|
+
const Y = (p) => 98 - Math.min(1, p / 55) * 82;
|
|
277
|
+
let loop = '';
|
|
278
|
+
for (let d = 0; d <= 720; d += 3) loop += `${d ? 'L' : 'M'}${X(volume(d)).toFixed(1)} ${Y(pressure(d)).toFixed(1)}`;
|
|
279
|
+
let h = `<text x="2" y="12" font-size="6.5" fill="${C.mute}">bar</text><text x="12" y="${Y(50) + 2}" font-size="6.5" text-anchor="end" fill="${C.mute}">50</text><text x="12" y="${Y(25) + 2}" font-size="6.5" text-anchor="end" fill="${C.mute}">25</text><text x="12" y="${Y(0) + 2}" font-size="6.5" text-anchor="end" fill="${C.mute}">0</text>`;
|
|
280
|
+
h += `<line x1="${X(1)}" x2="${X(E.cr)}" y1="${Y(0)}" y2="${Y(0)}" stroke="${C.ink}" stroke-width=".8"/><line x1="${X(1)}" x2="${X(1)}" y1="${Y(55)}" y2="${Y(0)}" stroke="${C.ink}" stroke-width=".8"/>`;
|
|
281
|
+
h += `<path d="${loop} Z" fill="rgba(214,24,43,.12)" stroke="${C.ink}" stroke-width="1.3"/>`;
|
|
282
|
+
h += `<text x="${X(1.3)}" y="${Y(52)}" font-size="6.2" letter-spacing=".8" fill="${C.mute}">IGNITION</text><text x="${X(4.2)}" y="${Y(14)}" font-size="6.2" letter-spacing=".8" fill="${C.mute}">EXPANSION</text><text x="${X(6)}" y="${Y(3.5)}" font-size="6.2" letter-spacing=".8" fill="${C.mute}">COMPRESSION</text>`;
|
|
283
|
+
h += `<circle cx="${X(volume(ph)).toFixed(1)}" cy="${Y(pressure(ph)).toFixed(1)}" r="3" fill="${C.red}"/>`;
|
|
284
|
+
h += `<text x="${X(1)}" y="${Y(0) + 10}" font-size="6.2" fill="${C.mute}">TDC</text><text x="${X(E.cr)}" y="${Y(0) + 10}" font-size="6.2" text-anchor="end" fill="${C.mute}">BDC</text><text x="${X(E.cr)}" y="${Y(0) + 19}" font-size="6" letter-spacing=".8" text-anchor="end" fill="${C.mute}">VOLUME ×VC · 1 → 10.2</text>`;
|
|
285
|
+
id.innerHTML = h;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// firing order: the tracked cylinder ringed, the one firing now lit
|
|
289
|
+
{
|
|
290
|
+
let h = '';
|
|
291
|
+
ORDER.forEach((c, i) => {
|
|
292
|
+
const x = 20 + i * 40;
|
|
293
|
+
if (i) h += `<line x1="${x - 28}" x2="${x - 12}" y1="17" y2="17" stroke="${C.faint}"/>`;
|
|
294
|
+
const firing = c === s.firing;
|
|
295
|
+
const tracked = c === s.cyl;
|
|
296
|
+
h += `<circle cx="${x}" cy="17" r="11.5" fill="${firing ? 'rgba(214,24,43,.55)' : '#fff'}" stroke="${tracked ? C.red : C.faint}" stroke-width="${tracked ? 1.8 : 1}"/>`;
|
|
297
|
+
if (tracked) h += `<circle cx="${x}" cy="17" r="15" fill="none" stroke="${C.red}" stroke-width=".8" opacity=".55"/>`;
|
|
298
|
+
h += `<text x="${x}" y="20.5" font-size="10" text-anchor="middle" font-weight="600" fill="${firing ? '#fff' : C.ink}">${c}</text>`;
|
|
299
|
+
});
|
|
300
|
+
fo.innerHTML = h;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// toggles
|
|
304
|
+
for (const k of CAMS) {
|
|
305
|
+
const on = s.cam === k;
|
|
306
|
+
btn[k].style.background = on ? C.ink : '#fff';
|
|
307
|
+
btn[k].style.color = on ? '#fff' : C.ink;
|
|
308
|
+
btn[k].style.borderColor = on ? C.ink : C.line;
|
|
309
|
+
}
|
|
310
|
+
for (const k of CUTS) {
|
|
311
|
+
const on = s.cut === k;
|
|
312
|
+
btn[k].style.background = on ? C.ink : '#fff';
|
|
313
|
+
btn[k].style.color = on ? '#fff' : C.ink;
|
|
314
|
+
btn[k].style.borderColor = on ? C.ink : C.line;
|
|
315
|
+
}
|
|
316
|
+
for (const k of OVERLAYS) {
|
|
317
|
+
const on = !!s.overlays[k];
|
|
318
|
+
btn[k].style.background = on ? C.red : '#fff';
|
|
319
|
+
btn[k].style.color = on ? '#fff' : C.ink;
|
|
320
|
+
btn[k].style.borderColor = on ? C.red : C.line;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// callouts: a label, a thin leader to its point in the engine
|
|
324
|
+
let lh = '';
|
|
325
|
+
let ch = '';
|
|
326
|
+
for (const c of s.callouts) {
|
|
327
|
+
if (c.o < 0.02 || !c.at) continue;
|
|
328
|
+
const [ax, ay] = c.at;
|
|
329
|
+
const [lx, ly] = c.label;
|
|
330
|
+
lh += `<polyline points="${ax.toFixed(1)},${ay.toFixed(1)} ${lx.toFixed(1)},${(ly + 16).toFixed(1)} ${(lx + c.w).toFixed(1)},${(ly + 16).toFixed(1)}" fill="none" stroke="${C.mute}" stroke-width=".8" opacity="${c.o.toFixed(2)}"/>`;
|
|
331
|
+
ch += `<div class="call" style="left:${lx.toFixed(1)}px;top:${(ly - 10).toFixed(1)}px;opacity:${c.o.toFixed(2)}"><b>${c.name}</b><span>${c.sub}</span></div>`;
|
|
332
|
+
}
|
|
333
|
+
callSvg.innerHTML = lh;
|
|
334
|
+
callG.innerHTML = ch;
|
|
335
|
+
pointer(s.cursor);
|
|
336
|
+
},
|
|
337
|
+
pointer,
|
|
338
|
+
};
|
|
339
|
+
}
|