holostaff-widget 2.1.2 → 2.1.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.
@@ -274,7 +274,7 @@ const Ms = (s) => {
274
274
  },
275
275
  test: () => !0,
276
276
  load: async () => {
277
- await import("./browserAll-DUS2tfWV.js");
277
+ await import("./browserAll-B1XOaRn-.js");
278
278
  }
279
279
  }, Na = {
280
280
  extension: {
@@ -284,7 +284,7 @@ const Ms = (s) => {
284
284
  },
285
285
  test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
286
286
  load: async () => {
287
- await import("./webworkerAll-BCOf6GhK.js");
287
+ await import("./webworkerAll-DRRT_PkE.js");
288
288
  }
289
289
  };
290
290
  class xt {
@@ -9588,17 +9588,17 @@ async function vl(s) {
9588
9588
  for (let r = 0; r < t.length; r++) {
9589
9589
  const o = t[r];
9590
9590
  if (o === "webgpu" && await Al()) {
9591
- const { WebGPURenderer: a } = await import("./WebGPURenderer-CvwOC531.js");
9591
+ const { WebGPURenderer: a } = await import("./WebGPURenderer-DL_0dPIF.js");
9592
9592
  e = a, i = { ...s, ...s.webgpu };
9593
9593
  break;
9594
9594
  } else if (o === "webgl" && Tl(
9595
9595
  s.failIfMajorPerformanceCaveat ?? Lo.defaultOptions.failIfMajorPerformanceCaveat
9596
9596
  )) {
9597
- const { WebGLRenderer: a } = await import("./WebGLRenderer-BWuGN60J.js");
9597
+ const { WebGLRenderer: a } = await import("./WebGLRenderer-CuZpDXNe.js");
9598
9598
  e = a, i = { ...s, ...s.webgl };
9599
9599
  break;
9600
9600
  } else if (o === "canvas") {
9601
- const { CanvasRenderer: a } = await import("./CanvasRenderer-B6bTf5T0.js");
9601
+ const { CanvasRenderer: a } = await import("./CanvasRenderer-B0v2M8OG.js");
9602
9602
  e = a, i = { ...s, ...s.canvasOptions };
9603
9603
  break;
9604
9604
  }
@@ -18451,28 +18451,27 @@ const ud = (
18451
18451
  out vec4 finalColor;
18452
18452
 
18453
18453
  uniform sampler2D uTexture;
18454
+ uniform float uThreshold;
18455
+ uniform float uSmoothness;
18454
18456
 
18455
18457
  void main(void) {
18456
- // Sample color from the top half
18457
- vec2 colorUV = vec2(vTextureCoord.x, vTextureCoord.y * 0.5);
18458
- vec4 color = texture(uTexture, colorUV);
18459
-
18460
- // Sample alpha from the bottom half (grayscale → use .r as alpha)
18461
- vec2 alphaUV = vec2(vTextureCoord.x, vTextureCoord.y * 0.5 + 0.5);
18462
- float alpha = texture(uTexture, alphaUV).r;
18463
-
18458
+ vec4 color = texture(uTexture, vTextureCoord);
18459
+ float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114));
18460
+ // Invert: alpha = 1 for dark (subject), alpha = 0 for bright (white bg)
18461
+ float alpha = 1.0 - smoothstep(uThreshold - uSmoothness, uThreshold, luma);
18464
18462
  finalColor = vec4(color.rgb * alpha, alpha);
18465
18463
  }
18466
18464
  `
18467
18465
  );
18468
18466
  class fd extends sl {
18469
- constructor() {
18470
- const t = ji.from({ vertex: ud, fragment: dd });
18467
+ constructor(t = 0.97, e = 0.04) {
18468
+ const i = ji.from({ vertex: ud, fragment: dd });
18471
18469
  super({
18472
- glProgram: t,
18470
+ glProgram: i,
18473
18471
  resources: {
18474
- stackedUniforms: {
18475
- uDummy: { value: 0, type: "f32" }
18472
+ lumaUniforms: {
18473
+ uThreshold: { value: t, type: "f32" },
18474
+ uSmoothness: { value: e, type: "f32" }
18476
18475
  }
18477
18476
  }
18478
18477
  });
@@ -22967,4 +22966,4 @@ export {
22967
22966
  No as y,
22968
22967
  Ut as z
22969
22968
  };
22970
- //# sourceMappingURL=index-D8J5hSg7.js.map
22969
+ //# sourceMappingURL=index-5VKHaxAH.js.map