Setting the file. One moment.
State · Frost Sequence Camera Orbit · heygen-com/hyperframes · Skills Docs
ContentsBack to the top of the page Three Mesh BVH LICENSE
(opens in a new tab)
source/src/core/ state.ts
TypeScript · 86 lines · 3 KB
false
,
10 clicked: false ,
11 uiHidden: false ,
12 overUi: false ,
13 };
14
15 export const sim = {
16 strokeActive: false , // cursor currently over the object with movement
17 overObject: false ,
18 lastStrokeT: - 1e9 ,
19 healing: false ,
20 resetRequestedAt: - 1 , // clock time when a reset fade started, -1 when none
21 fade: 1 , // powder fade multiplier (reset)
22 sceneFade: 1 , // scene exposure multiplier (shape crossfade)
23 hoverAmount: 0 , // smoothed 0..1 hover feel
24 fps: 0 ,
25 frameMs: 0 ,
26 pixelRatio: 1 , // effective DPR of the heavy scene pass
27 outputPixelRatio: 1 , // DPR of the final post-processing output
28 sceneResolutionScale: 1 ,
29 gpuFrames: 0 ,
30 gpuRenderMs: 0 ,
31 gpuComputeMs: 0 ,
32 fieldActive: true ,
33 powderActive: true ,
34 computeMs: 0 ,
35 counts: { active: 0 , healing: 0 , dormant: 0 , total: 0 },
36 erosion: { max: 0 , over50: 0 , over90: 0 , refrost: 0 },
37 };
38
39 /**
40 * Per-page override layer used by the hero variants. Nothing here is set on `/`, which keeps the
41 * experiment page exactly as tuned. Hero pages write into it every frame from their own DialKit panel.
42 */
43 export const heroFrame = {
44 enabled: false ,
45 clickResets: true ,
46 /** false = the hero keeps the shared Camera folder + Shape offsets (the page looks exactly like `/`) */
47 framing: true ,
48 /** camera framing (replaces the Camera folder values while enabled) */
49 distance: 13.5 ,
50 height: 1.2 ,
51 lookAtX: 0 ,
52 lookAtY: - 0.15 ,
53 fov: 27 ,
54 baseYaw: 0 ,
55 basePitch: 0 ,
56 rotateYaw: 35 ,
57 rotatePitch: 10 ,
58 parallaxRange: 3 ,
59 /** world-space offset of the object (so it can sit right / left / cropped) */
60 objectX: 0 ,
61 objectY: 0 ,
62 objectZ: 0 ,
63 /** optional backdrop override (light variants) */
64 backdrop: null as null | {
65 top : string ;
66 mid : string ;
67 bottom : string ;
68 centerX : number ;
69 centerY : number ;
70 radius : number ;
71 falloff : number ;
72 },
73 /** optional shape override (logo variant) */
74 shape: null as null | string ,
75 /** while true the field never heals (scroll-driven erosion holds its state) */
76 healSuspended: false ,
77 /** cursor erosion on/off (some variants only erode via scripted triggers) */
78 cursorErodes: true ,
79 /** show the stats HUD on hero pages (off by default, the page is the point) */
80 hud: false ,
81 /** Optional final camera transform used by scroll-driven camera exports after the normal object rig. */
82 cameraOverride: null as null | (( camera : import ( "three/webgpu" ). PerspectiveCamera ) => void ),
83 cameraProgress: 0 ,
84 /** extrusion parameters for the logo shape (hero 4); a change reloads the mark */
85 logoParams: null as null | Record < string , number >,
86 };