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.
Files changed (333) hide show
  1. package/README.md +9 -1
  2. package/bin/sera.mjs +31 -0
  3. package/dist/bundle/chunks/{chunk-LOMPDCMP.js → chunk-DFRGGJWV.js} +1 -1
  4. package/dist/bundle/chunks/{chunk-AZC5WTED.js → chunk-EMXTNOOJ.js} +5 -5
  5. package/dist/bundle/chunks/{chunk-KXU77PUU.js → chunk-ET2ARYK4.js} +1 -1
  6. package/dist/bundle/chunks/{chunk-ZNCN2NGY.js → chunk-G5BGS7HZ.js} +2 -2
  7. package/dist/bundle/chunks/{chunk-HODJBMOY.js → chunk-GSGPISRE.js} +3 -4
  8. package/dist/bundle/chunks/{chunk-46WGNYIE.js → chunk-NMUS7OCP.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-HQBQWHLD.js → chunk-RCQXVPCE.js} +1 -1
  10. package/dist/bundle/chunks/{cli-MML2DU4A.js → cli-NOCFT7AL.js} +1 -1
  11. package/dist/bundle/chunks/{execute-HXDNZ26B.js → execute-S2O3RL6V.js} +1 -1
  12. package/dist/bundle/chunks/github-copilot.js +1 -1
  13. package/dist/bundle/chunks/{runtime-JAH75CB5.js → runtime-BRT7AUXY.js} +1 -1
  14. package/dist/bundle/chunks/{virtual-modules-Z2V3PTLI.js → virtual-modules-QR2XYBMY.js} +1 -1
  15. package/dist/bundle/cli-runtime.js +1 -1
  16. package/dist/bundle/index.js +1 -1
  17. package/dist/bundle/rpc-entry.js +1 -1
  18. package/lib/postinstall.js +16 -0
  19. package/lib/update.js +85 -0
  20. package/lib/win-setup.js +96 -0
  21. package/package.json +4 -1
  22. package/sera-core/skills/ambalaj-tasarim/NOTICE +1 -0
  23. package/sera-core/skills/ambalaj-tasarim/SKILL.md +34 -0
  24. package/sera-core/skills/ambalaj-tasarim/dieline.mjs +17 -0
  25. package/sera-core/skills/ambalaj-tasarim/sera-pack.js +535 -0
  26. package/sera-core/skills/animasyonlu-site/NOTICE +1 -0
  27. package/sera-core/skills/animasyonlu-site/SKILL.md +26 -0
  28. package/sera-core/skills/animasyonlu-site/sera-motion.js +310 -0
  29. package/sera-core/skills/animate/LICENSE +21 -0
  30. package/sera-core/skills/animate/NOTICE +2 -0
  31. package/sera-core/skills/animate/RECIPES.md +324 -0
  32. package/sera-core/skills/animate/SKILL.md +209 -0
  33. package/sera-core/skills/astryx-ui/SKILL.md +37 -0
  34. package/sera-core/skills/awwwards/LICENSE +21 -0
  35. package/sera-core/skills/awwwards/NOTICE +5 -0
  36. package/sera-core/skills/awwwards/SKILL.md +357 -0
  37. package/sera-core/skills/awwwards/references/anatomy.md +103 -0
  38. package/sera-core/skills/awwwards/references/art-direction.md +114 -0
  39. package/sera-core/skills/awwwards/references/astro.md +235 -0
  40. package/sera-core/skills/awwwards/references/concepts.md +110 -0
  41. package/sera-core/skills/awwwards/references/content.md +88 -0
  42. package/sera-core/skills/awwwards/references/engine.md +751 -0
  43. package/sera-core/skills/awwwards/references/layout.md +81 -0
  44. package/sera-core/skills/awwwards/references/motion.md +463 -0
  45. package/sera-core/skills/awwwards/references/nextjs.md +386 -0
  46. package/sera-core/skills/awwwards/references/patterns.md +123 -0
  47. package/sera-core/skills/awwwards/references/quality-bar.md +151 -0
  48. package/sera-core/skills/awwwards/references/quality.md +91 -0
  49. package/sera-core/skills/awwwards/references/ship.md +36 -0
  50. package/sera-core/skills/awwwards/references/typography.md +135 -0
  51. package/sera-core/skills/awwwards/references/webgl.md +430 -0
  52. package/sera-core/skills/awwwards/scripts/audit.mjs +243 -0
  53. package/sera-core/skills/awwwards/scripts/browser.mjs +54 -0
  54. package/sera-core/skills/awwwards/scripts/font.mjs +87 -0
  55. package/sera-core/skills/awwwards/scripts/og.mjs +20 -0
  56. package/sera-core/skills/awwwards/scripts/photos.mjs +65 -0
  57. package/sera-core/skills/awwwards/scripts/serve.mjs +48 -0
  58. package/sera-core/skills/awwwards/scripts/shoot.mjs +675 -0
  59. package/sera-core/skills/beceri-yaz/SKILL.md +39 -0
  60. package/sera-core/skills/brag-slim/LICENSE +21 -0
  61. package/sera-core/skills/brag-slim/NOTICE +2 -0
  62. package/sera-core/skills/brag-slim/SKILL.md +108 -0
  63. package/sera-core/skills/brainstorming/LICENSE +21 -0
  64. package/sera-core/skills/brainstorming/NOTICE +5 -0
  65. package/sera-core/skills/brainstorming/SKILL.md +298 -0
  66. package/sera-core/skills/brainstorming/builder-check-prompt.md +23 -0
  67. package/sera-core/skills/copywriting/LICENSE +21 -0
  68. package/sera-core/skills/copywriting/NOTICE +5 -0
  69. package/sera-core/skills/copywriting/SKILL.md +343 -0
  70. package/sera-core/skills/copywriting/references/ai-tells.md +309 -0
  71. package/sera-core/skills/copywriting/references/copy-frameworks.md +432 -0
  72. package/sera-core/skills/copywriting/references/natural-transitions.md +256 -0
  73. package/sera-core/skills/cro/LICENSE +21 -0
  74. package/sera-core/skills/cro/NOTICE +5 -0
  75. package/sera-core/skills/cro/SKILL.md +198 -0
  76. package/sera-core/skills/cro/references/experiments.md +248 -0
  77. package/sera-core/skills/cro/references/form.md +422 -0
  78. package/sera-core/skills/derin-arastirma/referanslar/arastirma-yontem.md +11 -0
  79. package/sera-core/skills/emil-design-eng/LICENSE +21 -0
  80. package/sera-core/skills/emil-design-eng/NOTICE +2 -0
  81. package/sera-core/skills/emil-design-eng/SKILL.md +684 -0
  82. package/sera-core/skills/frontend-design/LICENSE.txt +177 -0
  83. package/sera-core/skills/frontend-design/NOTICE +2 -0
  84. package/sera-core/skills/frontend-design/SKILL.md +71 -0
  85. package/sera-core/skills/gorsel-denetim/SKILL.md +30 -0
  86. package/sera-core/skills/hallmark/LICENSE +21 -0
  87. package/sera-core/skills/hallmark/NOTICE +5 -0
  88. package/sera-core/skills/hallmark/SKILL.md +154 -0
  89. package/sera-core/skills/hallmark/references/anatomy.md +71 -0
  90. package/sera-core/skills/hallmark/references/brand-truth.md +40 -0
  91. package/sera-core/skills/hallmark/references/comp.md +104 -0
  92. package/sera-core/skills/hallmark/references/craft.md +116 -0
  93. package/sera-core/skills/hallmark/references/dark-mode.md +49 -0
  94. package/sera-core/skills/hallmark/references/data-viz.md +48 -0
  95. package/sera-core/skills/hallmark/references/design-md.md +53 -0
  96. package/sera-core/skills/hallmark/references/direction.md +52 -0
  97. package/sera-core/skills/hallmark/references/export-formats.md +80 -0
  98. package/sera-core/skills/hallmark/references/flow.md +131 -0
  99. package/sera-core/skills/hallmark/references/fonts.md +58 -0
  100. package/sera-core/skills/hallmark/references/gates.md +243 -0
  101. package/sera-core/skills/hallmark/references/genres/atmospheric.md +24 -0
  102. package/sera-core/skills/hallmark/references/genres/editorial.md +24 -0
  103. package/sera-core/skills/hallmark/references/genres/modern-minimal.md +24 -0
  104. package/sera-core/skills/hallmark/references/genres/playful.md +24 -0
  105. package/sera-core/skills/hallmark/references/imagery.md +99 -0
  106. package/sera-core/skills/hallmark/references/interaction-and-states.md +89 -0
  107. package/sera-core/skills/hallmark/references/layout.md +104 -0
  108. package/sera-core/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
  109. package/sera-core/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
  110. package/sera-core/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
  111. package/sera-core/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
  112. package/sera-core/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
  113. package/sera-core/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
  114. package/sera-core/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
  115. package/sera-core/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
  116. package/sera-core/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
  117. package/sera-core/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
  118. package/sera-core/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
  119. package/sera-core/skills/hallmark/references/macrostructures/12-letter.md +21 -0
  120. package/sera-core/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
  121. package/sera-core/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
  122. package/sera-core/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
  123. package/sera-core/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
  124. package/sera-core/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
  125. package/sera-core/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
  126. package/sera-core/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
  127. package/sera-core/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
  128. package/sera-core/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
  129. package/sera-core/skills/hallmark/references/macrostructures.md +119 -0
  130. package/sera-core/skills/hallmark/references/microinteractions.md +80 -0
  131. package/sera-core/skills/hallmark/references/patterns.md +202 -0
  132. package/sera-core/skills/hallmark/references/redesign.md +88 -0
  133. package/sera-core/skills/hallmark/references/responsive.md +46 -0
  134. package/sera-core/skills/hallmark/references/review-finish.md +19 -0
  135. package/sera-core/skills/hallmark/references/review-hero.md +20 -0
  136. package/sera-core/skills/hallmark/references/scroll-choreography.md +110 -0
  137. package/sera-core/skills/hallmark/references/texture.md +90 -0
  138. package/sera-core/skills/hallmark/references/themes/README.md +58 -0
  139. package/sera-core/skills/hallmark/references/themes/almanac.md +103 -0
  140. package/sera-core/skills/hallmark/references/themes/arcade.md +102 -0
  141. package/sera-core/skills/hallmark/references/themes/atelier.md +98 -0
  142. package/sera-core/skills/hallmark/references/themes/bloom.md +102 -0
  143. package/sera-core/skills/hallmark/references/themes/blueprint.md +103 -0
  144. package/sera-core/skills/hallmark/references/themes/broadside.md +108 -0
  145. package/sera-core/skills/hallmark/references/themes/brutal.md +95 -0
  146. package/sera-core/skills/hallmark/references/themes/carnival.md +104 -0
  147. package/sera-core/skills/hallmark/references/themes/cobalt.md +101 -0
  148. package/sera-core/skills/hallmark/references/themes/console.md +99 -0
  149. package/sera-core/skills/hallmark/references/themes/coral.md +102 -0
  150. package/sera-core/skills/hallmark/references/themes/darkroom.md +99 -0
  151. package/sera-core/skills/hallmark/references/themes/dose.md +98 -0
  152. package/sera-core/skills/hallmark/references/themes/dusk.md +105 -0
  153. package/sera-core/skills/hallmark/references/themes/editorial.md +97 -0
  154. package/sera-core/skills/hallmark/references/themes/formwork.md +107 -0
  155. package/sera-core/skills/hallmark/references/themes/furrow.md +98 -0
  156. package/sera-core/skills/hallmark/references/themes/garden.md +97 -0
  157. package/sera-core/skills/hallmark/references/themes/grid.md +101 -0
  158. package/sera-core/skills/hallmark/references/themes/halftone.md +106 -0
  159. package/sera-core/skills/hallmark/references/themes/hedgerow.md +104 -0
  160. package/sera-core/skills/hallmark/references/themes/hum.md +99 -0
  161. package/sera-core/skills/hallmark/references/themes/ink.md +106 -0
  162. package/sera-core/skills/hallmark/references/themes/kiln.md +108 -0
  163. package/sera-core/skills/hallmark/references/themes/loom.md +106 -0
  164. package/sera-core/skills/hallmark/references/themes/lumen.md +103 -0
  165. package/sera-core/skills/hallmark/references/themes/manifesto.md +101 -0
  166. package/sera-core/skills/hallmark/references/themes/midnight.md +97 -0
  167. package/sera-core/skills/hallmark/references/themes/newsprint.md +102 -0
  168. package/sera-core/skills/hallmark/references/themes/overprint.md +101 -0
  169. package/sera-core/skills/hallmark/references/themes/pasteup.md +100 -0
  170. package/sera-core/skills/hallmark/references/themes/piste.md +99 -0
  171. package/sera-core/skills/hallmark/references/themes/refract.md +101 -0
  172. package/sera-core/skills/hallmark/references/themes/ribbon.md +106 -0
  173. package/sera-core/skills/hallmark/references/themes/rim.md +96 -0
  174. package/sera-core/skills/hallmark/references/themes/riso.md +98 -0
  175. package/sera-core/skills/hallmark/references/themes/solstice.md +104 -0
  176. package/sera-core/skills/hallmark/references/themes/specimen.md +100 -0
  177. package/sera-core/skills/hallmark/references/themes/spore.md +104 -0
  178. package/sera-core/skills/hallmark/references/themes/sport.md +101 -0
  179. package/sera-core/skills/hallmark/references/themes/squeeze.md +99 -0
  180. package/sera-core/skills/hallmark/references/themes/sticker.md +106 -0
  181. package/sera-core/skills/hallmark/references/themes/studio.md +99 -0
  182. package/sera-core/skills/hallmark/references/themes/terminal.md +96 -0
  183. package/sera-core/skills/hallmark/references/themes/terrazzo.md +106 -0
  184. package/sera-core/skills/hallmark/references/themes/ultraviolet.md +106 -0
  185. package/sera-core/skills/hallmark/references/themes/vantage.md +99 -0
  186. package/sera-core/skills/hallmark/references/themes/vellum.md +105 -0
  187. package/sera-core/skills/hallmark/references/themes/wayfind.md +105 -0
  188. package/sera-core/skills/hallmark/references/themes/werkstatt.md +105 -0
  189. package/sera-core/skills/hallmark/scripts/capture.mjs +132 -0
  190. package/sera-core/skills/hallmark/scripts/refcheck.mjs +405 -0
  191. package/sera-core/skills/hallmark/scripts/sloplint-render.mjs +1283 -0
  192. package/sera-core/skills/hallmark/scripts/sloplint.mjs +4426 -0
  193. package/sera-core/skills/hallmark/scripts/theme.mjs +660 -0
  194. package/sera-core/skills/kurum-ici-iletisim/SKILL.md +40 -0
  195. package/sera-core/skills/launch/LICENSE +21 -0
  196. package/sera-core/skills/launch/NOTICE +5 -0
  197. package/sera-core/skills/launch/SKILL.md +385 -0
  198. package/sera-core/skills/launch/references/shipped-changes.md +84 -0
  199. package/sera-core/skills/launch/references/site-launch-qa.md +57 -0
  200. package/sera-core/skills/marka-kimligi/SKILL.md +30 -0
  201. package/sera-core/skills/mcp-yaz/SKILL.md +41 -0
  202. package/sera-core/skills/mobil-arayuz/SKILL.md +12 -0
  203. package/sera-core/skills/mvp-scoping/LICENSE +21 -0
  204. package/sera-core/skills/mvp-scoping/NOTICE +5 -0
  205. package/sera-core/skills/mvp-scoping/SKILL.md +95 -0
  206. package/sera-core/skills/ortak-yazarlik/SKILL.md +32 -0
  207. package/sera-core/skills/oyun-turleri/SKILL.md +176 -0
  208. package/sera-core/skills/paralel-sadelestirme/SKILL.md +33 -0
  209. package/sera-core/skills/phaser-core/LICENSE +201 -0
  210. package/sera-core/skills/phaser-core/NOTICE +5 -0
  211. package/sera-core/skills/phaser-core/NOTICE-UPSTREAM +15 -0
  212. package/sera-core/skills/phaser-core/SKILL.md +245 -0
  213. package/sera-core/skills/phaser-core/references/scene-flow.md +177 -0
  214. package/sera-core/skills/pitch-deck/LICENSE +21 -0
  215. package/sera-core/skills/pitch-deck/NOTICE +5 -0
  216. package/sera-core/skills/pitch-deck/SKILL.md +103 -0
  217. package/sera-core/skills/sera-3d-oyun/NOTICE +1 -0
  218. package/sera-core/skills/sera-3d-oyun/SKILL.md +12 -0
  219. package/sera-core/skills/sera-3d-oyun/sera-3d.js +3697 -0
  220. package/sera-core/skills/sera-diyagram/SKILL.md +43 -0
  221. package/sera-core/skills/sera-ofis-dosya/SKILL.md +3 -0
  222. package/sera-core/skills/sera-ofis-dosya/referanslar/ofis-ileri.md +46 -0
  223. package/sera-core/skills/sera-ui-site/NOTICE +1 -0
  224. package/sera-core/skills/sera-ui-site/SKILL.md +10 -0
  225. package/sera-core/skills/sera-ui-site/sera-ui.js +83 -0
  226. package/sera-core/skills/sera-veri-gorsel/SKILL.md +3 -0
  227. package/sera-core/skills/sera-veri-gorsel/referanslar/palet-dogrula.mjs +80 -0
  228. package/sera-core/skills/sistem-tarama/SKILL.md +49 -0
  229. package/sera-core/skills/sistem-tarama/referanslar/komutlar.md +78 -0
  230. package/sera-core/skills/tasarim-stilleri/SKILL.md +113 -0
  231. package/sera-core/skills/teardown/LICENSE +22 -0
  232. package/sera-core/skills/teardown/NOTICE +3 -0
  233. package/sera-core/skills/teardown/SKILL.md +144 -0
  234. package/sera-core/skills/teardown/package-lock.json +545 -0
  235. package/sera-core/skills/teardown/package.json +18 -0
  236. package/sera-core/skills/teardown/paths.mjs +30 -0
  237. package/sera-core/skills/teardown/run_sfx.py +10 -0
  238. package/sera-core/skills/teardown/sfx/__init__.py +10 -0
  239. package/sera-core/skills/teardown/sfx/__main__.py +64 -0
  240. package/sera-core/skills/teardown/sfx/dsp.py +453 -0
  241. package/sera-core/skills/teardown/sfx/loudness.py +72 -0
  242. package/sera-core/skills/teardown/sfx/mix.py +111 -0
  243. package/sera-core/skills/teardown/sfx/samples/SOURCES.md +23 -0
  244. package/sera-core/skills/teardown/sfx/samples/fs-258269-mouth-pop.ogg +0 -0
  245. package/sera-core/skills/teardown/sfx/samples/fs-323432-typing.ogg +0 -0
  246. package/sera-core/skills/teardown/sfx/samples/fs-329533-room-tone-in-an-apartment-livi.ogg +0 -0
  247. package/sera-core/skills/teardown/sfx/samples/fs-329569-roomtone-bedroom-yew.ogg +0 -0
  248. package/sera-core/skills/teardown/sfx/samples/fs-339521-vhs-rewind-forward-and-eject.ogg +0 -0
  249. package/sera-core/skills/teardown/sfx/samples/fs-349504-triangle-open-04.ogg +0 -0
  250. package/sera-core/skills/teardown/sfx/samples/fs-416777-digital-typing-wav.ogg +0 -0
  251. package/sera-core/skills/teardown/sfx/samples/fs-426767-apartment-room-tone-wav.ogg +0 -0
  252. package/sera-core/skills/teardown/sfx/samples/fs-447909-keyboard-typing.ogg +0 -0
  253. package/sera-core/skills/teardown/sfx/samples/fs-447910-plop.ogg +0 -0
  254. package/sera-core/skills/teardown/sfx/samples/fs-79388-keyboard-typing-wav.ogg +0 -0
  255. package/sera-core/skills/teardown/sfx/samples/fs-824189-pop-in-sfx.ogg +0 -0
  256. package/sera-core/skills/teardown/sfx/score_kit.py +206 -0
  257. package/sera-core/skills/teardown/sfx/synth.py +294 -0
  258. package/sera-core/skills/teardown/sheet.mjs +127 -0
  259. package/sera-core/skills/teardown/sims/beats.py +212 -0
  260. package/sera-core/skills/teardown/sims/build.mjs +141 -0
  261. package/sera-core/skills/teardown/sims/capture.mjs +211 -0
  262. package/sera-core/skills/teardown/sims/cessna-film/main.js +4 -0
  263. package/sera-core/skills/teardown/sims/cessna-film/timeline.json +1 -0
  264. package/sera-core/skills/teardown/sims/cessna-live/main.js +5 -0
  265. package/sera-core/skills/teardown/sims/cessna-shared/console.js +288 -0
  266. package/sera-core/skills/teardown/sims/cessna-shared/film.js +254 -0
  267. package/sera-core/skills/teardown/sims/cessna-shared/flight.js +53 -0
  268. package/sera-core/skills/teardown/sims/cessna-shared/gear.js +364 -0
  269. package/sera-core/skills/teardown/sims/cessna-shared/live.js +351 -0
  270. package/sera-core/skills/teardown/sims/cessna-shared/score.py +41 -0
  271. package/sera-core/skills/teardown/sims/cessna-shared/stage.js +248 -0
  272. package/sera-core/skills/teardown/sims/kit/director.js +300 -0
  273. package/sera-core/skills/teardown/sims/kit/hud.js +194 -0
  274. package/sera-core/skills/teardown/sims/kit/runtime.js +168 -0
  275. package/sera-core/skills/teardown/sims/kit/stage3d.js +114 -0
  276. package/sera-core/skills/teardown/sims/kit/style.css +137 -0
  277. package/sera-core/skills/teardown/sims/kit/util.js +79 -0
  278. package/sera-core/skills/teardown/sims/kit/warm.js +66 -0
  279. package/sera-core/skills/teardown/sims/strandbeest-film/main.js +4 -0
  280. package/sera-core/skills/teardown/sims/strandbeest-film/timeline.json +1 -0
  281. package/sera-core/skills/teardown/sims/strandbeest-live/main.js +5 -0
  282. package/sera-core/skills/teardown/sims/strandbeest-shared/beast.js +419 -0
  283. package/sera-core/skills/teardown/sims/strandbeest-shared/console.js +375 -0
  284. package/sera-core/skills/teardown/sims/strandbeest-shared/film.js +352 -0
  285. package/sera-core/skills/teardown/sims/strandbeest-shared/jansen.js +67 -0
  286. package/sera-core/skills/teardown/sims/strandbeest-shared/live.js +420 -0
  287. package/sera-core/skills/teardown/sims/strandbeest-shared/score.py +85 -0
  288. package/sera-core/skills/teardown/sims/strandbeest-shared/stage.js +463 -0
  289. package/sera-core/skills/teardown/sims/v8-film/main.js +4 -0
  290. package/sera-core/skills/teardown/sims/v8-film/timeline.json +1 -0
  291. package/sera-core/skills/teardown/sims/v8-live/main.js +5 -0
  292. package/sera-core/skills/teardown/sims/v8-shared/console.js +339 -0
  293. package/sera-core/skills/teardown/sims/v8-shared/engine.js +624 -0
  294. package/sera-core/skills/teardown/sims/v8-shared/film.js +239 -0
  295. package/sera-core/skills/teardown/sims/v8-shared/kin.js +86 -0
  296. package/sera-core/skills/teardown/sims/v8-shared/live.js +374 -0
  297. package/sera-core/skills/teardown/sims/v8-shared/score.py +60 -0
  298. package/sera-core/skills/teardown/sims/v8-shared/stage.js +173 -0
  299. package/sera-core/skills/teardown/wave.mjs +67 -0
  300. package/sera-core/skills/toplu-degisiklik/SKILL.md +39 -0
  301. package/sera-core/skills/ui-ux-pro-max/LICENSE +21 -0
  302. package/sera-core/skills/ui-ux-pro-max/NOTICE +5 -0
  303. package/sera-core/skills/ui-ux-pro-max/SKILL.md +13 -0
  304. package/sera-core/skills/ui-ux-pro-max/references/pro-rules.md +117 -0
  305. package/sera-core/skills/ui-ux-pro-max/references/quick-reference.md +266 -0
  306. package/sera-core/skills/unslop/LICENSE.md +410 -0
  307. package/sera-core/skills/unslop/SKILL.md +217 -0
  308. package/sera-core/skills/unslop/references/effects.md +113 -0
  309. package/sera-core/skills/unslop/references/refs/unslop-dashboard-after.webp +0 -0
  310. package/sera-core/skills/unslop/references/refs/unslop-hero-after.webp +0 -0
  311. package/sera-core/skills/unslop/references/refs.md +16 -0
  312. package/sera-core/skills/unslop/references/rtl.md +72 -0
  313. package/sera-core/skills/unslop/references/signs.md +125 -0
  314. package/sera-core/skills/unslop/references/tokens.md +137 -0
  315. package/sera-core/skills/unslop/references/visuals.md +84 -0
  316. package/sera-core/skills/unslop/scripts/snapshot.mjs +197 -0
  317. package/sera-core/skills/uretken-sanat/SKILL.md +42 -0
  318. package/sera-core/skills/verification-before-completion/LICENSE +21 -0
  319. package/sera-core/skills/verification-before-completion/NOTICE +5 -0
  320. package/sera-core/skills/verification-before-completion/SKILL.md +120 -0
  321. package/sera-core/skills/web-yayin-listesi/SKILL.md +3 -0
  322. package/sera-core/src/app-master.ts +2 -2
  323. package/sera-core/src/app-verify.ts +33 -0
  324. package/sera-core/src/auto-memory.ts +249 -0
  325. package/sera-core/src/extension.ts +69 -3
  326. package/sera-core/src/generated/build-rules.ts +81 -17
  327. package/sera-core/src/generated/quality-probe.ts +2 -0
  328. package/sera-core/src/generated/zero-knowledge.ts +36 -9
  329. package/sera-core/src/image-tool.ts +124 -7
  330. package/sera-core/src/link-data-tools.ts +411 -0
  331. package/sera-core/src/skills.ts +54 -18
  332. package/sera-core/src/video-tool.ts +51 -0
  333. package/sera-core/src/zk.ts +7 -3
@@ -0,0 +1,419 @@
1
+ // The beest itself, built from nothing but tubes, red joint caps, crank throws, rubber feet and sails. One crankshaft
2
+ // runs the long axis (z); each station on it carries a crank throw and two mirrored Jansen legs (front and back),
3
+ // so the beast walks broadside along -x like the real ones on the beach. update(theta, t) poses every link from the
4
+ // solved linkage: instanced meshes, matrices recomposed per frame, nothing animated by hand.
5
+ import * as THREE from 'three';
6
+ import {FOOT_MIN, JOINTS, LINKS, PATH, solveLeg, solveMirror} from './jansen.js';
7
+
8
+ const V3 = THREE.Vector3;
9
+ export const S = 0.012; // metres per Jansen unit
10
+ export const PAD = 2.2; // foot pad half-height, units
11
+ export const CFG = {stations: 10, spacing: 26, half: 4.2};
12
+ // phase of each station's crank throw: a wave that runs down the spine
13
+ export const phaseOf = (s) => -s * ((Math.PI * 2) / CFG.stations);
14
+ // link layers inside a leg plane, toward (+1) or away from (-1) the station centre
15
+ const LAYER = {j: 1, k: 1, b: -1, c: -1, d: -1, e: 0, f: 0, g: -1, h: 0, i: 1};
16
+
17
+ // ------------------------------------------------------------ body motion without foot slip
18
+ // The body moves at minus the mean stance velocity of the feet on the ground, integrated over one crank turn.
19
+ const NT = 1440;
20
+ const legsAt = (th) => {
21
+ const out = [];
22
+ for (let s = 0; s < CFG.stations; s++) {
23
+ const ps = th + phaseOf(s);
24
+ out.push(solveLeg(ps).F, solveMirror(ps).F);
25
+ }
26
+ return out;
27
+ };
28
+ const MOTION = (() => {
29
+ const X = new Float32Array(NT + 1);
30
+ const Y = new Float32Array(NT + 1);
31
+ const dth = (Math.PI * 2) / NT;
32
+ let x = 0;
33
+ let vPrev = 20;
34
+ for (let n = 0; n <= NT; n++) {
35
+ const th = n * dth;
36
+ const a = legsAt(th - dth * 0.5);
37
+ const b = legsAt(th + dth * 0.5);
38
+ let ws = 0;
39
+ let vs = 0;
40
+ let low = Infinity;
41
+ for (let q = 0; q < a.length; q++) {
42
+ const lift = (a[q][1] + b[q][1]) / 2 - FOOT_MIN;
43
+ low = Math.min(low, lift);
44
+ const w = Math.max(0, 1 - lift / 1.2);
45
+ ws += w;
46
+ vs += (w * (b[q][0] - a[q][0])) / dth;
47
+ }
48
+ const v = ws > 0 ? vs / ws : vPrev;
49
+ vPrev = v;
50
+ X[n] = x;
51
+ Y[n] = low;
52
+ x -= v * dth;
53
+ }
54
+ return {X, Y, stride: X[NT]};
55
+ })();
56
+ /** Body offset along x (units) and the lowest foot's lift for crank angle theta (any number of turns). */
57
+ export function bodyAt(theta) {
58
+ const turns = Math.floor(theta / (Math.PI * 2));
59
+ const u = (theta / (Math.PI * 2) - turns) * NT;
60
+ const n = Math.floor(u);
61
+ const k = u - n;
62
+ return {x: turns * MOTION.stride + MOTION.X[n] + (MOTION.X[n + 1] - MOTION.X[n]) * k, low: MOTION.Y[n] + (MOTION.Y[n + 1] - MOTION.Y[n]) * k};
63
+ }
64
+ export const STRIDE = MOTION.stride;
65
+ /** One leg's joints for station s, side 0 (front, foot toward -x) or 1 (the mirror), at crank angle theta. */
66
+ export const legAt = (s, side, theta) => (side ? solveMirror : solveLeg)(theta + phaseOf(s));
67
+ /** The leg plane's z, in units, for station s and side. */
68
+ export const legZ = (s, side) => -((CFG.stations - 1) * CFG.spacing) / 2 + s * CFG.spacing + (side ? CFG.half : -CFG.half);
69
+ /** Where a foot sits on its own path (0..1, the path's crank parameter) at crank angle theta. */
70
+ export const footParam = (s, side, theta) => {
71
+ const ps = theta + phaseOf(s);
72
+ const a = side ? Math.PI - ps : ps;
73
+ return (((a / (Math.PI * 2)) % 1) + 1) % 1;
74
+ };
75
+
76
+ // the foot path as a lit trace: visible over the arc the foot swept in the last uLen of a turn
77
+ const TRACE_VERT = /* glsl */ `attribute float aS; varying float vS; void main(){ vS = aS; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }`;
78
+ const TRACE_FRAG = /* glsl */ `uniform vec3 uCol; uniform float uHead; uniform float uLen; uniform float uSign; uniform float uAlpha; varying float vS;
79
+ void main(){
80
+ float d = fract(uSign * (uHead - vS));
81
+ float on = 1.0 - smoothstep(uLen - 0.004, uLen + 0.004, d);
82
+ // the freshest part of the arc burns brighter
83
+ float hot = 0.75 + 0.25 * (1.0 - d / max(uLen, 1e-3));
84
+ if (on * uAlpha < 0.01) discard;
85
+ gl_FragColor = vec4(uCol * hot, on * uAlpha);
86
+ }`;
87
+
88
+ // ------------------------------------------------------------ the build
89
+ export function buildBeast(P) {
90
+ const group = new THREE.Group();
91
+ const N = CFG.stations;
92
+ const z0 = -((N - 1) * CFG.spacing) / 2;
93
+ const zs = (s) => z0 + s * CFG.spacing;
94
+
95
+ const mats = {
96
+ tube: new THREE.MeshPhysicalMaterial({color: P.tube, roughness: 0.34, metalness: 0, clearcoat: 0.35, clearcoatRoughness: 0.4}),
97
+ joint: new THREE.MeshPhysicalMaterial({color: P.joint, roughness: 0.32, metalness: 0, clearcoat: 0.5, clearcoatRoughness: 0.3}),
98
+ steel: new THREE.MeshStandardMaterial({color: P.steel, roughness: 0.32, metalness: 0.75}),
99
+ foot: new THREE.MeshStandardMaterial({color: P.foot, roughness: 0.85, metalness: 0}),
100
+ sail: new THREE.MeshStandardMaterial({color: P.sail, roughness: 0.7, metalness: 0, transparent: true, opacity: 0.86, side: THREE.DoubleSide, depthWrite: false}),
101
+ };
102
+ // the isolated leg keeps its own solid copies while everything else turns to glass
103
+ mats.heroTube = mats.tube.clone();
104
+ mats.heroJoint = mats.joint.clone();
105
+ mats.heroFoot = mats.foot.clone();
106
+ for (const k of ['tube', 'joint', 'steel', 'foot']) mats[k].transparent = true;
107
+ const tubeCol = new THREE.Color(P.tube);
108
+ const heroCol = new THREE.Color(P.hero || '#2a2622');
109
+ const tubeGeo = new THREE.CylinderGeometry(1, 1, 1, 16, 1, true);
110
+ const capGeo = new THREE.CylinderGeometry(1, 1, 1, 24, 1);
111
+ // a joint cap: a short cylinder with a bevel, axis along z
112
+ capGeo.rotateX(Math.PI / 2);
113
+ const footGeo = new THREE.SphereGeometry(1, 24, 14);
114
+
115
+ // counts
116
+ const legs = N * 2;
117
+ const nTubes = legs * LINKS.length + N * 6 + (N - 1) * 3 + N * 3; // legs, frame triangles, longerons, mast + boom + stay
118
+ const nCaps = legs * (JOINTS.length + 1) + N * 3 + N * 2; // leg joints + the crank pin per leg, bearings, mast caps
119
+ const nSteel = N * 3 + 1; // crank pins, two webs per station, the axle
120
+ const tubes = new THREE.InstancedMesh(tubeGeo, mats.tube, nTubes);
121
+ const caps = new THREE.InstancedMesh(capGeo, mats.joint, nCaps);
122
+ const steel = new THREE.InstancedMesh(tubeGeo, mats.steel, nSteel);
123
+ const feet = new THREE.InstancedMesh(footGeo, mats.foot, legs);
124
+ const heroTubes = new THREE.InstancedMesh(tubeGeo, mats.heroTube, LINKS.length + 1);
125
+ const heroCaps = new THREE.InstancedMesh(capGeo, mats.heroJoint, JOINTS.length + 2);
126
+ const heroFeet = new THREE.InstancedMesh(footGeo, mats.heroFoot, 1);
127
+ const main = [tubes, caps, steel, feet];
128
+ const hero = [heroTubes, heroCaps, heroFeet];
129
+ for (const m of [...main, ...hero]) {
130
+ m.castShadow = true;
131
+ m.receiveShadow = true;
132
+ m.frustumCulled = false;
133
+ m.instanceMatrix.setUsage(THREE.DynamicDrawUsage);
134
+ group.add(m);
135
+ }
136
+
137
+ // foot traces, one closed loop per leg in its own plane, the crank parameter carried per vertex
138
+ const traces = [];
139
+ {
140
+ const NP = PATH.length;
141
+ const cum = new Float32Array(NP + 1);
142
+ for (let n = 1; n <= NP; n++) {
143
+ const a = PATH[n - 1];
144
+ const b = PATH[n % NP];
145
+ cum[n] = cum[n - 1] + Math.hypot(b[0] - a[0], b[1] - a[1]);
146
+ }
147
+ const SEG = 240;
148
+ const RAD = 8;
149
+ for (let st = 0; st < N; st++)
150
+ for (let side = 0; side < 2; side++) {
151
+ const zl = legZ(st, side);
152
+ const pts = [];
153
+ const par = [];
154
+ for (let i = 0; i < SEG; i++) {
155
+ // even steps along the loop, each tagged with the crank parameter it was reached at
156
+ const target = (i / SEG) * cum[NP];
157
+ let lo = 0;
158
+ let hi = NP;
159
+ while (hi - lo > 1) {
160
+ const m = (lo + hi) >> 1;
161
+ if (cum[m] <= target) lo = m;
162
+ else hi = m;
163
+ }
164
+ const a = PATH[lo % NP];
165
+ const b = PATH[(lo + 1) % NP];
166
+ const k = (target - cum[lo]) / Math.max(1e-6, cum[lo + 1] - cum[lo]);
167
+ const u = a[0] + (b[0] - a[0]) * k;
168
+ const v = a[1] + (b[1] - a[1]) * k;
169
+ pts.push(new V3((side ? -u : u) * S, (v - PAD * 0.25) * S, zl * S));
170
+ par.push((lo + k) / NP);
171
+ }
172
+ const geo = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(pts, true), SEG, 0.55 * S, RAD, true);
173
+ const aS = new Float32Array(geo.attributes.position.count);
174
+ for (let i = 0; i <= SEG; i++) for (let r = 0; r <= RAD; r++) aS[i * (RAD + 1) + r] = par[i % SEG];
175
+ geo.setAttribute('aS', new THREE.BufferAttribute(aS, 1));
176
+ const mat = new THREE.ShaderMaterial({
177
+ vertexShader: TRACE_VERT,
178
+ fragmentShader: TRACE_FRAG,
179
+ uniforms: {uCol: {value: new THREE.Color(P.trace || '#e0662b')}, uHead: {value: 0}, uLen: {value: 1}, uSign: {value: side ? -1 : 1}, uAlpha: {value: 0}},
180
+ transparent: true,
181
+ depthWrite: false,
182
+ });
183
+ const mesh = new THREE.Mesh(geo, mat);
184
+ mesh.renderOrder = 3;
185
+ mesh.frustumCulled = false;
186
+ mesh.visible = false;
187
+ mesh.userData = {st, side};
188
+ group.add(mesh);
189
+ traces.push(mesh);
190
+ }
191
+ }
192
+
193
+ // sails: one cambered sheet per station, re-shaped every frame (wind fill + flutter)
194
+ const SU = 14;
195
+ const SV = 18;
196
+ const sailTex = (() => {
197
+ const c = document.createElement('canvas');
198
+ c.width = c.height = 512;
199
+ const g = c.getContext('2d');
200
+ g.fillStyle = '#ffffff';
201
+ g.fillRect(0, 0, 512, 512);
202
+ g.strokeStyle = 'rgba(120,112,100,0.5)';
203
+ g.lineWidth = 2;
204
+ for (let k = 1; k < 6; k++) {
205
+ g.beginPath();
206
+ g.moveTo(0, (k * 512) / 6);
207
+ g.lineTo(512, (k * 512) / 6);
208
+ g.stroke();
209
+ }
210
+ g.strokeStyle = 'rgba(120,112,100,0.26)';
211
+ for (let k = 1; k < 4; k++) {
212
+ g.beginPath();
213
+ g.moveTo((k * 512) / 4, 0);
214
+ g.lineTo((k * 512) / 4, 512);
215
+ g.stroke();
216
+ }
217
+ const t = new THREE.CanvasTexture(c);
218
+ t.colorSpace = THREE.SRGBColorSpace;
219
+ t.anisotropy = 8;
220
+ return t;
221
+ })();
222
+ mats.sail.map = sailTex;
223
+ const SAIL = {mast: 30, base: 30, height: 64, chord: 52, yaw: -0.5};
224
+ const cy = Math.cos(SAIL.yaw);
225
+ const sy = Math.sin(SAIL.yaw);
226
+ // a point of the sail plane (u along the chord, zz off the plane) turned about the mast to meet the wind
227
+ const yawU = (u, zz) => SAIL.mast + (u - SAIL.mast) * cy - zz * sy;
228
+ const yawZ = (u, zz) => (u - SAIL.mast) * sy + zz * cy;
229
+ const sails = [...Array(N)].map((_, s) => {
230
+ const geo = new THREE.PlaneGeometry(1, 1, SU, SV);
231
+ const mesh = new THREE.Mesh(geo, mats.sail);
232
+ mesh.position.z = zs(s) * S;
233
+ mesh.renderOrder = 2;
234
+ mesh.frustumCulled = false;
235
+ group.add(mesh);
236
+ return mesh;
237
+ });
238
+ // the sail outline in (u, v) for chord fraction r (0 at the mast) and height fraction q
239
+ const sailPt = (r, q) => {
240
+ const chord = SAIL.chord * (1 - Math.pow(q, 1.35)) * (0.92 + 0.08 * Math.sin(q * Math.PI));
241
+ return [SAIL.mast - r * chord, SAIL.base + q * SAIL.height - r * r * 10 * (1 - q)];
242
+ };
243
+
244
+ // ------------------------------------------------------------ per-frame pose
245
+ const M4 = new THREE.Matrix4();
246
+ const q = new THREE.Quaternion();
247
+ const qZ = new THREE.Quaternion(); // caps are built along z already
248
+ const Y = new V3(0, 1, 0);
249
+ const dir = new V3();
250
+ const mid = new V3();
251
+ const sc = new V3();
252
+ const pa = new V3();
253
+ const pb = new V3();
254
+ let it = 0;
255
+ let ic = 0;
256
+ let is = 0;
257
+ let ht = 0;
258
+ let hc = 0;
259
+ const tube = (mesh, i, A, B, r) => {
260
+ dir.subVectors(B, A);
261
+ const L = dir.length();
262
+ mid.addVectors(A, B).multiplyScalar(0.5);
263
+ q.setFromUnitVectors(Y, dir.multiplyScalar(1 / L));
264
+ sc.set(r * S, L, r * S);
265
+ M4.compose(mid, q, sc);
266
+ mesh.setMatrixAt(i, M4);
267
+ };
268
+ let toHero = false;
269
+ const T = (u0, v0, z0_, u1, v1, z1, r = 1.15) => {
270
+ pa.set(u0 * S, v0 * S, z0_ * S);
271
+ pb.set(u1 * S, v1 * S, z1 * S);
272
+ if (toHero) tube(heroTubes, ht++, pa, pb, r);
273
+ else tube(tubes, it++, pa, pb, r);
274
+ };
275
+ const ST = (u0, v0, z0_, u1, v1, z1, r) => {
276
+ pa.set(u0 * S, v0 * S, z0_ * S);
277
+ pb.set(u1 * S, v1 * S, z1 * S);
278
+ tube(steel, is++, pa, pb, r);
279
+ };
280
+ const CAP = (u, v, z, r = 2.1, len = 5.2) => {
281
+ mid.set(u * S, v * S, z * S);
282
+ sc.set(r * S, r * S, len * S);
283
+ M4.compose(mid, qZ, sc);
284
+ if (toHero) heroCaps.setMatrixAt(hc++, M4);
285
+ else caps.setMatrixAt(ic++, M4);
286
+ };
287
+ const TOP = 20; // frame apex above the axle
288
+
289
+ // ops: iso (0..1) isolates the hero leg {st, side}; trace (0..1) shows every foot loop, heroTrace (0..1) how much
290
+ // of the hero's loop its foot has drawn so far
291
+ const out = {heroJ: null, heroZ: 0};
292
+ const update = (theta, t = 0, wind = 1, ops = {}) => {
293
+ const iso = ops.iso ?? 0;
294
+ const H = ops.hero ?? {st: 0, side: 0};
295
+ it = 0;
296
+ ic = 0;
297
+ is = 0;
298
+ ht = 0;
299
+ hc = 0;
300
+ // glass: the ghosted frame fades, the hero leg darkens to ink
301
+ const ghost = 1 - 0.84 * iso;
302
+ mats.tube.opacity = ghost;
303
+ mats.joint.opacity = ghost;
304
+ mats.foot.opacity = ghost;
305
+ mats.steel.opacity = 1 - 0.6 * iso;
306
+ mats.heroTube.color.copy(tubeCol).lerp(heroCol, iso);
307
+ for (const m of hero) m.visible = iso > 0.001;
308
+ const hw = CFG.half;
309
+ // the crankshaft
310
+ ST(0, 0, zs(0) - 14, 0, 0, zs(N - 1) + 14, 1.5);
311
+ const feetM = [];
312
+ for (let s = 0; s < N; s++) {
313
+ const z = zs(s);
314
+ const ps = theta + phaseOf(s);
315
+ const legsS = [
316
+ {J: solveLeg(ps), z: z - hw, w: 1},
317
+ {J: solveMirror(ps), z: z + hw, w: -1},
318
+ ];
319
+ // crank throw: two webs and the pin both legs ride on
320
+ const A = legsS[0].J.A;
321
+ ST(0, 0, z - hw - 3.2, A[0], A[1], z - hw - 3.2, 1.6);
322
+ ST(0, 0, z + hw + 3.2, A[0], A[1], z + hw + 3.2, 1.6);
323
+ ST(A[0], A[1], z - hw - 3.2, A[0], A[1], z + hw + 3.2, 1.25);
324
+ legsS.forEach(({J, z: zl, w}, side) => {
325
+ toHero = iso > 0.001 && s === H.st && side === H.side;
326
+ for (const [p, r, key] of LINKS) {
327
+ const dz = LAYER[key] * w * 1.25;
328
+ T(J[p][0], J[p][1], zl + dz, J[r][0], J[r][1], zl + dz);
329
+ }
330
+ for (const key of JOINTS) CAP(J[key][0], J[key][1], zl, key === 'P' ? 2.5 : 2.05, key === 'P' ? 6.2 : 5.0);
331
+ CAP(J.A[0], J.A[1], zl, 1.9, 4.4);
332
+ if (toHero) {
333
+ // the crank m drawn as part of the leg, and the axle bearing it turns on
334
+ T(0, 0, zl + w * 2.6, J.A[0], J.A[1], zl + w * 2.6, 1.3);
335
+ CAP(0, 0, zl, 2.9, 4.6);
336
+ }
337
+ if (s === H.st && side === H.side) {
338
+ out.heroJ = J;
339
+ out.heroZ = zl;
340
+ }
341
+ feetM.push([J.F, zl, J.E, toHero]);
342
+ toHero = false;
343
+ // frame: axle bearing to the fixed pivot, pivot to the apex
344
+ T(0, 0, zl, J.P[0], J.P[1], zl, 1.3);
345
+ T(J.P[0], J.P[1], zl, 0, TOP, z, 1.3);
346
+ });
347
+ CAP(0, 0, z - hw, 2.9, 4.6);
348
+ CAP(0, 0, z + hw, 2.9, 4.6);
349
+ CAP(0, TOP, z, 2.4, 6);
350
+ // mast, boom and a stay to the frame
351
+ const top = sailPt(0, 1);
352
+ const foot = sailPt(1, 0);
353
+ T(SAIL.mast, TOP, z, top[0], top[1] + 4, z, 1.05);
354
+ T(SAIL.mast, SAIL.base, z, yawU(foot[0], 0), foot[1], z + yawZ(foot[0], 0), 0.9);
355
+ T(0, TOP, z, SAIL.mast, SAIL.base - 2, z, 1.0);
356
+ CAP(SAIL.mast, SAIL.base, z, 1.8, 3.6);
357
+ CAP(top[0], top[1] + 4, z, 1.6, 3.2);
358
+ }
359
+ // longerons: pivot rails front and back, the apex spine
360
+ for (let s = 0; s < N - 1; s++) {
361
+ const a = zs(s);
362
+ const b = zs(s + 1);
363
+ T(-38, -7.8, a - hw, -38, -7.8, b - hw, 1.2);
364
+ T(38, -7.8, a + hw, 38, -7.8, b + hw, 1.2);
365
+ T(0, TOP, a, 0, TOP, b, 1.3);
366
+ }
367
+ // feet: rubber pads under each lower link, flattened and tipped with the shin
368
+ let fk = 0;
369
+ for (let k = 0; k < feetM.length; k++) {
370
+ const [F, zl, E, isHero] = feetM[k];
371
+ dir.set(F[0] - E[0], F[1] - E[1], 0).normalize();
372
+ q.setFromUnitVectors(Y, dir.multiplyScalar(-1));
373
+ mid.set(F[0] * S, (F[1] - PAD * 0.25) * S, zl * S);
374
+ sc.set(3.4 * S, PAD * S, 4.2 * S);
375
+ M4.compose(mid, q, sc);
376
+ if (isHero) heroFeet.setMatrixAt(0, M4);
377
+ else feet.setMatrixAt(fk++, M4);
378
+ }
379
+ tubes.count = it;
380
+ caps.count = ic;
381
+ steel.count = is;
382
+ feet.count = fk;
383
+ heroTubes.count = ht;
384
+ heroCaps.count = hc;
385
+ for (const m of [...main, ...hero]) m.instanceMatrix.needsUpdate = true;
386
+
387
+ // foot traces: the hero's loop draws itself, the rest fade in together
388
+ const trace = ops.trace ?? 0;
389
+ const heroTrace = ops.heroTrace ?? 0;
390
+ for (const m of traces) {
391
+ const {st, side} = m.userData;
392
+ const isH = st === H.st && side === H.side;
393
+ const u = m.material.uniforms;
394
+ u.uHead.value = footParam(st, side, theta);
395
+ u.uLen.value = isH && heroTrace > 0 ? Math.min(1, heroTrace) : 1;
396
+ u.uAlpha.value = (isH ? Math.max(heroTrace > 0 ? 1 : 0, trace) : trace * (1 - 0.9 * iso)) * (ops.traceFade ?? 1);
397
+ m.visible = u.uAlpha.value > 0.01 && u.uLen.value > 0.002;
398
+ }
399
+
400
+ // sails: filled by the wind, a flutter running aft along the leech
401
+ for (let s = 0; s < N; s++) {
402
+ const pos = sails[s].geometry.attributes.position;
403
+ let n = 0;
404
+ for (let iv = 0; iv <= SV; iv++) {
405
+ const qv = 1 - iv / SV;
406
+ for (let iu = 0; iu <= SU; iu++) {
407
+ const r = iu / SU;
408
+ const [u, v] = sailPt(r, qv);
409
+ const fill = wind * 7.5 * Math.sin(Math.PI * Math.min(1, r * 1.15)) * (0.55 + 0.45 * qv);
410
+ const flut = 0.9 * r * r * Math.sin(t * 9.0 - r * 7.0 + qv * 3.0 + s * 1.7) * (0.4 + 0.6 * wind);
411
+ pos.setXYZ(n++, yawU(u, fill + flut) * S, v * S, yawZ(u, fill + flut) * S);
412
+ }
413
+ }
414
+ pos.needsUpdate = true;
415
+ sails[s].geometry.computeVertexNormals();
416
+ }
417
+ };
418
+ return {group, update, mats, sails, traces, main, hero, out, length: ((N - 1) * CFG.spacing + 28) * S, zs};
419
+ }