@idetik/core 0.19.1 → 0.19.2
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 +25 -14
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +25 -25
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/renderers/webgl_renderer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1693,24 +1693,35 @@ class bC extends jB {
|
|
|
1693
1693
|
), this.programs_ = new DC(I), this.bindings_ = new uC(I), this.textures_ = new TC(I), this.state_ = new WC(I), this.initStencil(), this.resize(this.canvas.width, this.canvas.height);
|
|
1694
1694
|
}
|
|
1695
1695
|
render(A) {
|
|
1696
|
-
|
|
1697
|
-
const B = A.
|
|
1696
|
+
this.renderedObjects_ = 0, this.renderedObjectsPerFrame_ = 0;
|
|
1697
|
+
const { opaque: I, transparent: B } = A.layerManager.partitionLayers();
|
|
1698
|
+
for (const a of [...I, ...B])
|
|
1699
|
+
a.update({ viewport: A });
|
|
1700
|
+
if (getComputedStyle(A.element).visibility === "hidden") return;
|
|
1701
|
+
const C = A.getBoxRelativeTo(this.canvas), Q = new IA(
|
|
1698
1702
|
V(0, 0),
|
|
1699
1703
|
V(this.width, this.height)
|
|
1700
|
-
);
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1704
|
+
), E = IA.equals(C.floor(), Q.floor()), i = IA.intersects(C, Q);
|
|
1705
|
+
if (E)
|
|
1706
|
+
this.state_.setScissorTest(!1);
|
|
1707
|
+
else if (i)
|
|
1708
|
+
this.state_.setScissorTest(!0), this.state_.setScissor(C);
|
|
1709
|
+
else {
|
|
1710
|
+
c.warn(
|
|
1711
|
+
"WebGLRenderer",
|
|
1712
|
+
`Viewport ${A.id} is entirely outside canvas bounds, skipping render`
|
|
1713
|
+
);
|
|
1714
|
+
return;
|
|
1715
|
+
}
|
|
1716
|
+
this.clear();
|
|
1717
|
+
const o = A.camera.frustum;
|
|
1706
1718
|
this.state_.setDepthMask(!0);
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1709
|
-
a.update(o), a.state === "ready" && I && this.renderLayer(a, A.camera, i);
|
|
1719
|
+
for (const a of I)
|
|
1720
|
+
a.state === "ready" && this.renderLayer(a, A.camera, o);
|
|
1710
1721
|
this.state_.setDepthMask(!1);
|
|
1711
|
-
for (const a of
|
|
1712
|
-
a.
|
|
1713
|
-
this.
|
|
1722
|
+
for (const a of B)
|
|
1723
|
+
a.state === "ready" && this.renderLayer(a, A.camera, o);
|
|
1724
|
+
this.renderedObjects_ = this.renderedObjectsPerFrame_;
|
|
1714
1725
|
}
|
|
1715
1726
|
initStencil() {
|
|
1716
1727
|
this.gl_.clearStencil(0), this.gl_.stencilMask(255), this.gl_.stencilFunc(this.gl_.EQUAL, 0, 255), this.gl_.stencilOp(this.gl_.KEEP, this.gl_.KEEP, this.gl_.INCR);
|