@idetik/core 0.36.2 → 0.36.3

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/index.js CHANGED
@@ -196,10 +196,10 @@ precision mediump float;
196
196
  layout (location = 0) out vec4 fragColor;
197
197
 
198
198
  uniform float u_opacity;
199
- uniform vec3 u_color;
199
+ uniform vec3 u_wireframeColor;
200
200
 
201
201
  void main() {
202
- fragColor = vec4(u_color, u_opacity);
202
+ fragColor = vec4(u_wireframeColor, u_opacity);
203
203
  }`, lI = `#version 300 es
204
204
 
205
205
  precision highp float;
@@ -1624,6 +1624,12 @@ class GQ {
1624
1624
  setDepthMask(A) {
1625
1625
  this.depthMaskEnabled_ !== A && (this.gl_.depthMask(A), this.depthMaskEnabled_ = A);
1626
1626
  }
1627
+ get stencilTestEnabled() {
1628
+ return this.enabledCapabilities_.get(this.gl_.STENCIL_TEST) ?? !1;
1629
+ }
1630
+ get blendingMode() {
1631
+ return this.currentBlendingMode_;
1632
+ }
1627
1633
  setBlendingMode(A) {
1628
1634
  if (this.currentBlendingMode_ !== A) {
1629
1635
  if (A === "none")
@@ -1787,15 +1793,19 @@ class FQ extends cC {
1787
1793
  });
1788
1794
  const C = this.programs_.use(I.programName);
1789
1795
  if (this.drawGeometry(I.geometry, I, A, C, B), I.wireframeEnabled) {
1790
- this.bindings_.bindGeometry(I.wireframeGeometry);
1791
- const Q = this.programs_.use("wireframe");
1792
- Q.setUniform("u_color", I.wireframeColor.rgb), this.drawGeometry(
1796
+ const Q = this.state_.stencilTestEnabled, E = this.state_.blendingMode;
1797
+ this.state_.setStencilTest(!1), this.state_.setBlendingMode("none"), this.bindings_.bindGeometry(I.wireframeGeometry);
1798
+ const i = this.programs_.use("wireframe");
1799
+ i.setUniform(
1800
+ "u_wireframeColor",
1801
+ I.wireframeColor.rgb
1802
+ ), this.drawGeometry(
1793
1803
  I.wireframeGeometry,
1794
1804
  I,
1795
1805
  A,
1796
- Q,
1806
+ i,
1797
1807
  B
1798
- );
1808
+ ), E !== null && this.state_.setBlendingMode(E), this.state_.setStencilTest(Q);
1799
1809
  }
1800
1810
  }
1801
1811
  drawGeometry(A, I, B, C, Q) {