@bbki.ng/site 5.4.42 → 5.4.44

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.44
4
+
5
+ ### Patch Changes
6
+
7
+ - b88ab47: update spiral size
8
+ - Updated dependencies [b88ab47]
9
+ - @bbki.ng/ui@0.1.18
10
+
11
+ ## 5.4.43
12
+
13
+ ### Patch Changes
14
+
15
+ - c65909e: fix: style
16
+ - Updated dependencies [c65909e]
17
+ - @bbki.ng/ui@0.1.17
18
+
3
19
  ## 5.4.42
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.42",
3
+ "version": "5.4.44",
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.16"
17
+ "@bbki.ng/ui": "0.1.18"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@eslint/compat": "^1.0.0",
@@ -28,7 +28,7 @@ export const EffectLayer = () => {
28
28
  vertex={vert}
29
29
  onRender={onRender}
30
30
  style={{
31
- height: '100dvh',
31
+ height: '100lvh',
32
32
  }}
33
33
  />
34
34
  );
@@ -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;
package/src/blog/main.css CHANGED
@@ -57,6 +57,11 @@ body {
57
57
  overflow: hidden !important;
58
58
  }
59
59
 
60
+ body,
61
+ #blog {
62
+ height: 100lvh;
63
+ }
64
+
60
65
  #blog {
61
66
  overflow: auto;
62
67
  -ms-overflow-style: none; /* Internet Explorer 10+ */