@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.
|
|
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.
|
|
17
|
+
"@bbki.ng/ui": "0.1.18"
|
|
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
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
float
|
|
49
|
-
float
|
|
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
|
-
|
|
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;
|