From 425b077a1711cbe9cd7b2d43f86d05e484c6f4fe Mon Sep 17 00:00:00 2001 From: ukimsanov Date: Wed, 20 May 2026 14:27:12 -0700 Subject: [PATCH] fix(skill): audit-found bugs in hyperframes core examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three concrete bugs found while auditing PR #991: 1. html-in-canvas-patterns.md (#1 in catalog, 3D Rotation with Bloom): The code example used `new THREE.EffectComposer(renderer)` UMD-style namespace access while the ESM imports right below pull them in as bare named imports. Three.js r150+ removed the UMD `examples/js/` globals, so as written the example throws `TypeError: THREE.EffectComposer is not a constructor`. Switched to the bare names matching the imports. THREE.Vector2 stays as-is — Vector2 is on the THREE namespace. 2. techniques.md (#5, Lottie Animation): The CDN path `@lottiefiles/dotlottie-web/dist/dotlottie-player.js` returns 404. `@lottiefiles/dotlottie-web` is the JavaScript SDK, not a web component — its `main` is `dist/index.cjs`. The web-component package is `@lottiefiles/dotlottie-wc` and the custom element is ``, not ``. Updated both. 3. techniques.md (5 occurrences across Lottie / lottie-web / Video / @font-face examples): asset paths used the `../capture/` pattern that PR #989's `invalid_capture_path` lint rule emits an error for. Replaced all with root-relative `capture/...`. PRs #989 and #991 are no longer self-contradictory. --- .../references/html-in-canvas-patterns.md | 11 ++++++---- skills/hyperframes/references/techniques.md | 22 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/skills/hyperframes/references/html-in-canvas-patterns.md b/skills/hyperframes/references/html-in-canvas-patterns.md index bd6fd8f79..f826b1f92 100644 --- a/skills/hyperframes/references/html-in-canvas-patterns.md +++ b/skills/hyperframes/references/html-in-canvas-patterns.md @@ -98,10 +98,13 @@ var mesh = new THREE.Mesh( ); scene3d.add(mesh); -// Post-processing: bloom for cinematic glow -var composer = new THREE.EffectComposer(renderer); -composer.addPass(new THREE.RenderPass(scene3d, camera)); -composer.addPass(new THREE.UnrealBloomPass(new THREE.Vector2(1920, 1080), 0.3, 0.4, 0.85)); +// Post-processing: bloom for cinematic glow. +// EffectComposer / RenderPass / UnrealBloomPass are ES-module named imports +// (see the import block below) — they're NOT properties of THREE in modern +// versions. Three.js r150+ removed the UMD `examples/js/` globals. +var composer = new EffectComposer(renderer); +composer.addPass(new RenderPass(scene3d, camera)); +composer.addPass(new UnrealBloomPass(new THREE.Vector2(1920, 1080), 0.3, 0.4, 0.85)); var proxy = { rotY: -0.12, zoom: 4.2 }; tl.to( diff --git a/skills/hyperframes/references/techniques.md b/skills/hyperframes/references/techniques.md index ca7f28fb6..6226b4e28 100644 --- a/skills/hyperframes/references/techniques.md +++ b/skills/hyperframes/references/techniques.md @@ -188,16 +188,22 @@ The slide distance DECAYS per word (80→12px) — mimics a camera settling. Vector animations that play inside a composition. Use for logos, character animations, icons. ```html - -. --> + + - +