Trim comments to the non-obvious why
Drop narration, history and restated-code comments across the repo, keep short ones for security boundaries, upstream quirks and ordering constraints, and record the convention in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* The live intro widget on /stp: DVD-logo-style bouncing phrases.
|
||||
*
|
||||
* The animation deliberately keeps its state in the plain `animState` array, not
|
||||
* in the reactive `items` ref — mutating a ref 30 times a second would trigger a
|
||||
* Vue re-render per frame. `items` exists only to render the initial DOM; after
|
||||
* that, positions are written straight onto the elements. Element and container
|
||||
* sizes are cached and re-measured on resize rather than read each frame, since
|
||||
* reading offsetWidth in a rAF callback forces a synchronous layout.
|
||||
*
|
||||
* Frames are throttled to ~30fps via FRAME_INTERVAL because the motion is slow
|
||||
* and this is a background decoration.
|
||||
* Bouncing phrases. Animation state is a plain array, not the reactive
|
||||
* `items`, to avoid a re-render per frame; sizes are cached until resize.
|
||||
*/
|
||||
import { rand } from "@vueuse/core";
|
||||
import { ref, onMounted, onUnmounted, nextTick } from "vue";
|
||||
|
||||
Reference in New Issue
Block a user