HyperFrames Registry 是一个组件注册表,用于把可复用的 blocks 和 components 安装并接入 HyperFrames 合成。blocks 是独立子合成,拥有自己的尺寸、时长和时间线,通过宿主合成中的 data-composition-src 引入;components 是效果片段,没有独立尺寸,需要把其 HTML、CSS、JS 直接粘贴进宿主合成。安装使用 hyperframes add <name>,例如 hyperframes add data-chart 安装 block,hyperframes add grain-overlay 安装 component;可用 --dir 指定项目、--json 输出机器可读结果、--no-clipboard 跳过剪贴板(适用于 CI 或无头环境)。blocks 默认安装到 compositions/<name>.html,components 默认安装到 compositions/components/<name>.html,路径可在 hyperframes.json 的 paths 中配置,注册表地址也可配置。接入 block 时需在宿主 index.html 中设置 data-composition-src、data-composition-id(须与 block 内部 ID 一致)、data-start、data-duration、data-width、data-height、data-track-index 等属性。接入 component 时需读取已装文件,把 HTML 元素复制进目标合成,把 style 复制进样式,把 script 复制到时间线代码之前,并按片段注释接入 GSAP 时间线。可用 curl 读取 registry.json 浏览条目。注意 hyperframes add 仅适用于 blocks 和 components,示例需用 hyperframes init <dir> --example <name>。付费、价格与平台等信息暂未提供。
hyperframes-registry
通用与其它
更新于 10-16 05:53