fix: 首页文案微调 — Flutter 客户端改移动端、hero 大字去「我」
postfx 尾迹色随主题(dark #1600ff,对齐原版 lensFlare 控制), 随本提交一并带入:GlassModels 的 Dark 修复已在上一条提交。
This commit is contained in:
@@ -5,6 +5,7 @@ import { useFrame, useThree } from "@react-three/fiber";
|
||||
import { EffectComposer } from "@react-three/postprocessing";
|
||||
import { UnsignedByteType, Vector2 } from "three";
|
||||
import { usePointer } from "@/lib/pointer";
|
||||
import { useResolvedTheme } from "@/lib/shellMedia";
|
||||
import { scrollBus } from "@/lib/scrollBus";
|
||||
import {
|
||||
FluidPushPass,
|
||||
@@ -30,10 +31,15 @@ import {
|
||||
* lime trail acts as a pointer indicator over the dot curtain
|
||||
* - params: starRays 6, intensity .7, threshold .99, streakScale
|
||||
* 8·(w/1920)·(mobile?2:1), hotspotPower 32, gate .88,
|
||||
* tailColorLight #ffa300
|
||||
* tailColor 随主题: light #ffa300 / dark #1600ff(原 lensFlare 控制
|
||||
* tailColorLight/tailColorDark,resolvedTheme 切换)。
|
||||
* ⚠ 尾迹色叠在玻璃高光热点上:Dark 下用橙色会把模型区域的
|
||||
* r/g 抬高、显得"发灰发透明"而非原版的饱和蓝。
|
||||
*/
|
||||
|
||||
const BRIGHT_SOURCE_SECTIONS = ["banner", "footer"];
|
||||
const TAIL_COLOR_LIGHT = "#ffa300";
|
||||
const TAIL_COLOR_DARK = "#1600ff";
|
||||
const clamp01 = (v: number) => Math.min(1, Math.max(0, v));
|
||||
const sT = (e?: number) => (e === undefined ? 0 : clamp01(e > 1 ? e / 100 : e));
|
||||
|
||||
@@ -81,6 +87,9 @@ export function PostFX() {
|
||||
const { uv: pointerUv, insideRef } = usePointer();
|
||||
const isMobile = size.width < 1024;
|
||||
const reducedMotion = useReducedMotion();
|
||||
// 尾迹色随主题(原版: resolvedTheme → tailColorDark / tailColorLight)
|
||||
const isDark = useResolvedTheme() === "dark";
|
||||
const tailColor = isDark ? TAIL_COLOR_DARK : TAIL_COLOR_LIGHT;
|
||||
|
||||
const composerRef = useRef<any>(null);
|
||||
|
||||
@@ -95,9 +104,11 @@ export function PostFX() {
|
||||
streakScale: 8,
|
||||
hotspotPower: 32,
|
||||
gate: 0.88,
|
||||
tailColor: "#ffa300",
|
||||
tailColor,
|
||||
}),
|
||||
[]
|
||||
// 尾迹色随主题切换时需重建材质 uniform —— tailColor 进依赖
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[tailColor]
|
||||
);
|
||||
const fluidPass = useMemo(() => new FluidPushPass(), []);
|
||||
|
||||
@@ -124,9 +135,9 @@ export function PostFX() {
|
||||
streakScale,
|
||||
hotspotPower: 32,
|
||||
gate: 0.88,
|
||||
tailColor: "#ffa300",
|
||||
tailColor,
|
||||
});
|
||||
}, [flarePass, streakScale]);
|
||||
}, [flarePass, streakScale, tailColor]);
|
||||
|
||||
const dprRef = useRef(1);
|
||||
useEffect(() => {
|
||||
|
||||
@@ -188,7 +188,7 @@ function seed() {
|
||||
about_p2: "我相信工程塑造可靠的产品,设计赋予它们灵魂;",
|
||||
about_p2_link_label: "我的作品",
|
||||
intro_prefix:
|
||||
"我是北极新一,一名横跨设计与工程的全栈开发者:Web 前端与后端、Flutter 客户端、AI 应用开发都有实践,也从产品设计一路做到工程落地。工作之外,我常在 ",
|
||||
"我是北极新一,一名横跨设计与工程的全栈开发者:Web 前端与后端、移动端、AI 应用开发都有实践,也从产品设计一路做到工程落地。工作之外,我常在 ",
|
||||
intro_suffix: " 上记录与分享这些探索。",
|
||||
intro_brand: "小红书",
|
||||
footer_headline: "让我们|创造|一些不凡的|数字作品",
|
||||
|
||||
Reference in New Issue
Block a user