@taole/giftstage 0.3.0 → 0.3.1

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.
@@ -3686,10 +3686,15 @@ const hg = class CA {
3686
3686
  return this.currentDrawResult = $("backend-lost", "WebGPU device is lost"), this.rejectSVGAFastPathDraw(), this.currentDrawResult;
3687
3687
  if (!this.passEncoder)
3688
3688
  return this.rejectSVGAFastPathDraw(), this.currentDrawResult = $("invalid-command", "WebGPU frame is not active"), this.currentDrawResult;
3689
+ if ((A.stencil != null && A.stencil !== "none" || g === "clip-mask" || g === "clip-mask-instanced" || g === "svga-frame-table-clip-mask") && !this.frameUsesStencil)
3690
+ return this.rejectSVGAFastPathDraw(), this.currentDrawResult = $(
3691
+ "invalid-command",
3692
+ `WebGPU ${g} requires a depth-stencil attachment in the active frame`
3693
+ ), this.currentDrawResult;
3689
3694
  try {
3690
3695
  this.drawInternal(A);
3691
- } catch (I) {
3692
- return this.currentDrawResult = $("submission-error", this.errorMessage(I)), this.currentDrawRecorded || this.rejectSVGAFastPathDraw(), this.currentDrawResult;
3696
+ } catch (B) {
3697
+ return this.currentDrawResult = $("submission-error", this.errorMessage(B)), this.currentDrawRecorded || this.rejectSVGAFastPathDraw(), this.currentDrawResult;
3693
3698
  }
3694
3699
  return this.currentDrawRecorded || this.rejectSVGAFastPathDraw(), this.currentDrawResult;
3695
3700
  }
@@ -8836,7 +8841,7 @@ const PI = 6, jI = { x: 0, y: 0, w: 1, h: 1 }, nC = class IC {
8836
8841
  requiresStencil(A) {
8837
8842
  var g, I, B, Q, E;
8838
8843
  for (const i of A) {
8839
- if (i.type !== "svga" || !i.videoEntity || i.opacity < 0.05 || i.state !== "playing" && i.state !== "fly" && i.state !== "stopped")
8844
+ if (i.type !== "svga" || !i.videoEntity || i.state !== "playing" && i.state !== "fly" && i.state !== "stopped")
8840
8845
  continue;
8841
8846
  const e = this.resolveRenderableFrame(i, i.videoEntity);
8842
8847
  if (e == null) continue;
@@ -8849,6 +8854,7 @@ const PI = 6, jI = { x: 0, y: 0, w: 1, h: 1 }, nC = class IC {
8849
8854
  continue;
8850
8855
  }
8851
8856
  }
8857
+ if (i.opacity < 0.05) continue;
8852
8858
  const t = this.getFrameClipMode(i.videoEntity, e);
8853
8859
  if (t === 2 || t === 1 && ((E = i.rotation) != null ? E : 0) !== 0) return !0;
8854
8860
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/giftstage",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "High-performance WebGPU/WebGL gift animation player unifying SVGA, VAP, AlphaVideo, and images",
5
5
  "type": "module",
6
6
  "main": "dist/gift-stage.cjs",