@bbki.ng/site 5.4.43 → 5.4.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 5.4.45
4
+
5
+ ### Patch Changes
6
+
7
+ - 80724cd: fix scroll
8
+ - Updated dependencies [80724cd]
9
+ - @bbki.ng/ui@0.1.19
10
+
11
+ ## 5.4.44
12
+
13
+ ### Patch Changes
14
+
15
+ - b88ab47: update spiral size
16
+ - Updated dependencies [b88ab47]
17
+ - @bbki.ng/ui@0.1.18
18
+
3
19
  ## 5.4.43
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "5.4.43",
3
+ "version": "5.4.45",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "react-dom": "^18.0.0",
15
15
  "react-router-dom": "6",
16
16
  "swr": "^2.2.5",
17
- "@bbki.ng/ui": "0.1.17"
17
+ "@bbki.ng/ui": "0.1.19"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@eslint/compat": "^1.0.0",
@@ -42,11 +42,12 @@ void drawSpiral(vec2 uv) {
42
42
  vec2 p = uv - center;
43
43
  p.x *= aspect;
44
44
 
45
- // Clamp scale so the spiral never grows beyond ~480px equivalent
46
- float maxSpiralPx = 480.0;
47
- float baseScale = 4.0;
48
- float minDim = min(uResolution.x, uResolution.y) / uDevicePixelRatio;
49
- float scale = max(baseScale, minDim / maxSpiralPx * baseScale);
45
+ // Fixed visual size: spiral always appears ~120 CSS px wide, regardless of device.
46
+ // After aspect correction, 1 curve unit = uResolution.y / scale physical pixels,
47
+ // so spiral CSS width = 0.6 * cssHeight / scale. Solve for scale:
48
+ float cssHeight = uResolution.y / uDevicePixelRatio;
49
+ float targetCss = 80.0;
50
+ float scale = 0.6 * cssHeight / targetCss;
50
51
  p *= scale;
51
52
 
52
53
  // early exit: spiral fits within radius ~0.35 in curve space
@@ -88,7 +89,8 @@ void drawSpiral(vec2 uv) {
88
89
  float dc = distance(p, closest);
89
90
  minDist = min(minDist, dc);
90
91
 
91
- float lineWidth = 0.005;
92
+ // ~1.2 CSS px line width, device-independent
93
+ float lineWidth = 1.2 * scale / cssHeight;
92
94
  float alpha = 1.0 - smoothstep(0.0, lineWidth, minDist);
93
95
 
94
96
  float spiralAlpha = alpha * 0.8 * uSpiralOpacity;