feat: 移植 hyper-space 超空间区块(cursor.glb 条纹箭头 + 8vh 滚动叙事)与箭头全屏白模式
- HyperspaceModel.tsx:1:1 移植原站 cx——cursor.glb 合并几何、屏幕矩形追踪(12 帧缓存+滚动增量修正)、restScale 0.1→峰值 hypot(vw,vh)×1.64/radius 的吞噬缩放(damp 32/s)、shrink 折叠、条纹 shader(uStripeReveal 蓝底→黑底星空放射)、scaleSpinDegrees 180 收拢自旋、指针跟随高光 - HyperSpaceSection.tsx:8 视口高 + sticky,段位推进 seg0-primary/secondary(Innovate with purpose / human touch)→ seg1(进度环 + 四段主张)→ end(FUTURE-FIRST/ALWAYS);逐字符哈希延迟 stagger(hsstFadeIn/Out) - arrowFullscreen.ts:原站 module 1111 进度 store(setDampedScaleT 阈值翻转订阅,header 0.5 阈值白模式、section 0.5 白模式同步) - Header:箭头过阈值后整体转白(ARROW_FULLSCREEN_DOM_COLOR_TRANSITION) - 修复:main 不再是滚动容器(原站 sticky 依赖内部滚动,我们的 Lenis 是窗口级,sticky 永不钉住导致末段文案不出现) - scrollBus 增加 subscribeScroll/notifyScroll 供 DOM 侧响应式读取;useLightController 从 GlassModels 导出复用 - 验证:glError=0 无反馈环;段位推进/白模式触发与回落/区块顺序 全部 CDP 行为探针通过;build+tsc 通过
This commit is contained in:
@@ -13,3 +13,21 @@ export const scrollBus: ScrollBusState = {
|
||||
progress: 0,
|
||||
sP: 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* Lightweight pub/sub so DOM components (hyper-space section stages) can
|
||||
* read `scrollBus.current` reactively via useSyncExternalStore — the
|
||||
* original reads it through `useLenisScrollTop` (module 35231).
|
||||
*/
|
||||
const scrollListeners = new Set<() => void>();
|
||||
|
||||
export function subscribeScroll(cb: () => void): () => void {
|
||||
scrollListeners.add(cb);
|
||||
return () => {
|
||||
scrollListeners.delete(cb);
|
||||
};
|
||||
}
|
||||
|
||||
export function notifyScroll() {
|
||||
for (const cb of scrollListeners) cb();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user