@scrawl-board/board 0.1.0-beta.3 → 0.1.0-beta.4

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/dist/browser.js CHANGED
@@ -35884,12 +35884,16 @@ var FRAGMENT = `
35884
35884
  return max(lineAlpha2.x, lineAlpha2.y);
35885
35885
  }
35886
35886
 
35887
- // Distance from p's nearest grid intersection, in world units. Dot radius
35888
- // matches the configured line width in pixels, same anti-aliasing.
35887
+ // Distance from p's nearest grid intersection, in world units. A line's
35888
+ // width reads as visible even at 1px because it spans the whole screen;
35889
+ // an isolated dot at that same 1px radius gets almost entirely eaten by
35890
+ // anti-aliasing and all but disappears. Scaling the radius up keeps a
35891
+ // dot's on-screen weight comparable to a line drawn with the same
35892
+ // uGridLineWidthPx, rather than using it literally as a radius.
35889
35893
  float gridDotAlpha(vec2 p) {
35890
35894
  vec2 cell = mod(p, uGridSpacing) - uGridSpacing * 0.5;
35891
35895
  float dist = length(cell);
35892
- float radius = uGridLineWidthPx * uWorldPerPixel;
35896
+ float radius = uGridLineWidthPx * uWorldPerPixel * 1.75;
35893
35897
  float aa = uWorldPerPixel;
35894
35898
  return 1.0 - smoothstep(radius - aa * 0.5, radius + aa * 0.5, dist);
35895
35899
  }
package/dist/index.js CHANGED
@@ -35964,12 +35964,16 @@ var FRAGMENT = `
35964
35964
  return max(lineAlpha2.x, lineAlpha2.y);
35965
35965
  }
35966
35966
 
35967
- // Distance from p's nearest grid intersection, in world units. Dot radius
35968
- // matches the configured line width in pixels, same anti-aliasing.
35967
+ // Distance from p's nearest grid intersection, in world units. A line's
35968
+ // width reads as visible even at 1px because it spans the whole screen;
35969
+ // an isolated dot at that same 1px radius gets almost entirely eaten by
35970
+ // anti-aliasing and all but disappears. Scaling the radius up keeps a
35971
+ // dot's on-screen weight comparable to a line drawn with the same
35972
+ // uGridLineWidthPx, rather than using it literally as a radius.
35969
35973
  float gridDotAlpha(vec2 p) {
35970
35974
  vec2 cell = mod(p, uGridSpacing) - uGridSpacing * 0.5;
35971
35975
  float dist = length(cell);
35972
- float radius = uGridLineWidthPx * uWorldPerPixel;
35976
+ float radius = uGridLineWidthPx * uWorldPerPixel * 1.75;
35973
35977
  float aa = uWorldPerPixel;
35974
35978
  return 1.0 - smoothstep(radius - aa * 0.5, radius + aa * 0.5, dist);
35975
35979
  }
package/dist/react.js CHANGED
@@ -35926,12 +35926,16 @@ var FRAGMENT = `
35926
35926
  return max(lineAlpha2.x, lineAlpha2.y);
35927
35927
  }
35928
35928
 
35929
- // Distance from p's nearest grid intersection, in world units. Dot radius
35930
- // matches the configured line width in pixels, same anti-aliasing.
35929
+ // Distance from p's nearest grid intersection, in world units. A line's
35930
+ // width reads as visible even at 1px because it spans the whole screen;
35931
+ // an isolated dot at that same 1px radius gets almost entirely eaten by
35932
+ // anti-aliasing and all but disappears. Scaling the radius up keeps a
35933
+ // dot's on-screen weight comparable to a line drawn with the same
35934
+ // uGridLineWidthPx, rather than using it literally as a radius.
35931
35935
  float gridDotAlpha(vec2 p) {
35932
35936
  vec2 cell = mod(p, uGridSpacing) - uGridSpacing * 0.5;
35933
35937
  float dist = length(cell);
35934
- float radius = uGridLineWidthPx * uWorldPerPixel;
35938
+ float radius = uGridLineWidthPx * uWorldPerPixel * 1.75;
35935
35939
  float aa = uWorldPerPixel;
35936
35940
  return 1.0 - smoothstep(radius - aa * 0.5, radius + aa * 0.5, dist);
35937
35941
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrawl-board/board",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "The Scrawl Board SDK: an embeddable, collaborative infinite-canvas whiteboard for React and vanilla JS/TS apps.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {