holostaff-widget 2.0.3 → 2.1.0

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-dXyw9pTp.js");
277
+ await import("./browserAll-BW5pRFgz.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-Cg9oHHQ6.js");
287
+ await import("./webworkerAll-DFor3Z43.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-LbpsbxD7.js");
9591
+ const { WebGPURenderer: a } = await import("./WebGPURenderer-LTc1I0_L.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-DrkBZJEC.js");
9597
+ const { WebGLRenderer: a } = await import("./WebGLRenderer-BIgjIp2n.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-BjfQuSLh.js");
9601
+ const { CanvasRenderer: a } = await import("./CanvasRenderer-QBO__o0a.js");
9602
9602
  e = a, i = { ...s, ...s.canvasOptions };
9603
9603
  break;
9604
9604
  }
@@ -18451,43 +18451,24 @@ const ud = (
18451
18451
  out vec4 finalColor;
18452
18452
 
18453
18453
  uniform sampler2D uTexture;
18454
- uniform float uSimilarity;
18455
- uniform float uSmoothness;
18456
18454
 
18457
18455
  void main(void) {
18458
- vec4 color = texture(uTexture, vTextureCoord);
18459
- // Perceptual luminance
18460
- float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114));
18461
- // Dark pixels → transparent, bright pixels → opaque
18462
- float alpha = smoothstep(uSimilarity, uSimilarity + uSmoothness, luma);
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
+
18463
18464
  finalColor = vec4(color.rgb * alpha, alpha);
18464
18465
  }
18465
18466
  `
18466
18467
  );
18467
18468
  class fd extends sl {
18468
- constructor(t = 0.08, e = 0.25) {
18469
- const i = ji.from({ vertex: ud, fragment: dd });
18470
- super({
18471
- glProgram: i,
18472
- resources: {
18473
- chromaKeyUniforms: {
18474
- uSimilarity: { value: t, type: "f32" },
18475
- uSmoothness: { value: e, type: "f32" }
18476
- }
18477
- }
18478
- });
18479
- }
18480
- get threshold() {
18481
- return this.resources.chromaKeyUniforms.uniforms.uSimilarity;
18482
- }
18483
- set threshold(t) {
18484
- this.resources.chromaKeyUniforms.uniforms.uSimilarity = t;
18485
- }
18486
- get smoothness() {
18487
- return this.resources.chromaKeyUniforms.uniforms.uSmoothness;
18488
- }
18489
- set smoothness(t) {
18490
- this.resources.chromaKeyUniforms.uniforms.uSmoothness = t;
18469
+ constructor() {
18470
+ const t = ji.from({ vertex: ud, fragment: dd });
18471
+ super({ glProgram: t, resources: {} });
18491
18472
  }
18492
18473
  }
18493
18474
  const si = 200, jt = si * (416 / 624), Pr = 280;
@@ -18499,7 +18480,7 @@ class pd {
18499
18480
  async loadIdleVideo(t) {
18500
18481
  this.videoElement = document.createElement("video"), this.videoElement.src = t, this.videoElement.loop = !0, this.videoElement.muted = !0, this.videoElement.playsInline = !0, this.videoElement.crossOrigin = "anonymous", this.videoElement.style.display = "none", document.body.appendChild(this.videoElement), await this.videoElement.play();
18501
18482
  const e = J.from(this.videoElement);
18502
- this.idleSprite = new fe(e), this.idleSprite.width = si, this.idleSprite.height = jt, this.idleSprite.anchor.set(0.5, 1), this.idleSprite.filters = [new fd(0.08, 0.25)], this.idleGroup = new Lt(), this.idleGroup.addChild(this.idleSprite), this.container.addChild(this.idleGroup), this.container.x = this.stageWidth / 2, this.container.y = this.stageHeight + jt;
18483
+ this.idleSprite = new fe(e), this.idleSprite.width = si, this.idleSprite.height = jt, this.idleSprite.anchor.set(0.5, 1), this.idleSprite.filters = [new fd()], this.idleGroup = new Lt(), this.idleGroup.addChild(this.idleSprite), this.container.addChild(this.idleGroup), this.container.x = this.stageWidth / 2, this.container.y = this.stageHeight + jt;
18503
18484
  }
18504
18485
  /**
18505
18486
  * Load from a static image instead of video (fallback).
@@ -22979,4 +22960,4 @@ export {
22979
22960
  No as y,
22980
22961
  Ut as z
22981
22962
  };
22982
- //# sourceMappingURL=index-CBz_zJTe.js.map
22963
+ //# sourceMappingURL=index-CQX7AKCl.js.map