@bbki.ng/site 5.4.36 → 5.4.38

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,22 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 5.4.38
4
+
5
+ ### Patch Changes
6
+
7
+ - 22ba590: fix grid layout
8
+ - c66ab86: update shader
9
+ - Updated dependencies [22ba590]
10
+ - @bbki.ng/ui@0.1.12
11
+
12
+ ## 5.4.37
13
+
14
+ ### Patch Changes
15
+
16
+ - 1ba88b0: fix margin
17
+ - Updated dependencies [1ba88b0]
18
+ - @bbki.ng/ui@0.1.11
19
+
3
20
  ## 5.4.36
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "5.4.36",
3
+ "version": "5.4.38",
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.10"
17
+ "@bbki.ng/ui": "0.1.12"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@eslint/compat": "^1.0.0",
@@ -12,10 +12,7 @@ vec4 randGrain(vec2 uv) {
12
12
  return vec4(vec3(0.0), abs(intensity) + 0.02);
13
13
  }
14
14
 
15
- void drawGrainOnNav(vec2 uv) {
16
- // float navHeight = 64. * uDevicePixelRatio / uResolution.y;
17
- //
18
- // if (1. - uv.y < navHeight) {
19
- gl_FragColor = randGrain(uv);
20
- // }
15
+ void drawGrain(vec2 uv) {
16
+ vec4 grain = randGrain(uv);
17
+ gl_FragColor = grain + gl_FragColor * (1.0 - grain.a);
21
18
  }
@@ -1,4 +1,5 @@
1
- // Fine book paper texture — static, white-only, subtle fiber pattern
1
+ // Fine book paper texture — static, subtle fiber pattern
2
+ // Simulates delicate diffuse micro-fiber scattering on white paper
2
3
 
3
4
  float paperHash(vec2 p) {
4
5
  vec3 p3 = fract(vec3(p.xyx) * vec3(443.897, 441.423, 437.195));
@@ -20,14 +21,14 @@ float paperNoise(vec2 uv) {
20
21
  return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
21
22
  }
22
23
 
23
- // fBm with 3 octaves for fine fiber detail
24
+ // fBm with 5 octaves for dense, fine fiber detail
24
25
  float paperFBM(vec2 uv) {
25
26
  float value = 0.0;
26
27
  float amplitude = 0.5;
27
28
  for (int i = 0; i < 3; i++) {
28
29
  value += amplitude * paperNoise(uv);
29
- uv *= 2.2;
30
- amplitude *= 0.45;
30
+ uv *= 2.5;
31
+ amplitude *= 0.4;
31
32
  }
32
33
  return value;
33
34
  }
@@ -36,17 +37,14 @@ void drawPaperTexture(vec2 uv) {
36
37
  // Scale to physical pixels so texture density stays consistent across screens
37
38
  vec2 texCoord = uv * uResolution / uDevicePixelRatio;
38
39
 
39
- // Fine-scale fiber pattern (~1px detail at 1x)
40
- float fiber = paperFBM(texCoord * 0.8);
40
+ // Single high-frequency FBM fine, uniform, no visible banding
41
+ float fiber = paperFBM(texCoord * 3.0);
41
42
 
42
- // Normalize to center around 0 and keep very subtle
43
- float tex = (fiber - 0.5) * 0.06;
43
+ // abs() for full symmetric coverage; low multiplier as quiet base layer
44
+ float alpha = abs(fiber - 0.5) * 0.05;
44
45
 
45
- // White-only: positive values add slight white highlights (paper fiber ridges)
46
- // Negative values stay transparent
47
- float alpha = max(tex, 0.0);
48
-
49
- // Blend paper texture under the grain effect
50
- vec4 paper = vec4(1.0, 1.0, 1.0, alpha);
51
- gl_FragColor = paper + gl_FragColor * (1.0 - paper.a * 0.3);
46
+ // Soft neutral gray (premultiplied) instead of pure black avoids dirty look
47
+ float tone = 0.55;
48
+ vec4 paper = vec4(vec3(tone * alpha), alpha);
49
+ gl_FragColor = paper + gl_FragColor * (1.0 - alpha);
52
50
  }
@@ -22,7 +22,7 @@ void main() {
22
22
  drawPaperTexture(uv);
23
23
 
24
24
  // draw grain on nav
25
- drawGrainOnNav(uv);
25
+ drawGrain(uv);
26
26
 
27
27
  // draw loading spiral
28
28
  drawSpiral(uv);
@@ -81,7 +81,7 @@ const Streaming = () => {
81
81
  </Panel>
82
82
  {scrolled ? (
83
83
  <Button
84
- className="mt-32"
84
+ className="mt-16"
85
85
  transparent={!showScrollBtn}
86
86
  onClick={() => {
87
87
  bbMsgHistoryRef.current?.scrollToBottom();