123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- import {
- N,
- S,
- T
- } from "./chunk-3OFVLRSL.js";
- // node_modules/@arcgis/core/views/3d/webgl-engine/lib/basicInterfaces.js
- var n;
- var e;
- var N2;
- var O;
- var t;
- var i;
- var u;
- var a;
- var c;
- var l;
- var C;
- var D;
- !function(n2) {
- n2[n2.None = 0] = "None", n2[n2.Front = 1] = "Front", n2[n2.Back = 2] = "Back", n2[n2.COUNT = 3] = "COUNT";
- }(n || (n = {})), function(n2) {
- n2[n2.Less = 0] = "Less", n2[n2.Lequal = 1] = "Lequal", n2[n2.COUNT = 2] = "COUNT";
- }(e || (e = {})), function(n2) {
- n2[n2.BACKGROUND = 0] = "BACKGROUND", n2[n2.UPDATE = 1] = "UPDATE";
- }(N2 || (N2 = {})), function(n2) {
- n2[n2.NOT_LOADED = 0] = "NOT_LOADED", n2[n2.LOADING = 1] = "LOADING", n2[n2.LOADED = 2] = "LOADED";
- }(O || (O = {})), function(n2) {
- n2[n2.IntegratedMeshMaskExcluded = 1] = "IntegratedMeshMaskExcluded", n2[n2.OutlineVisualElementMask = 2] = "OutlineVisualElementMask";
- }(t || (t = {})), function(n2) {
- n2[n2.ASYNC = 0] = "ASYNC", n2[n2.SYNC = 1] = "SYNC";
- }(i || (i = {})), function(n2) {
- n2[n2.Highlight = 0] = "Highlight", n2[n2.MaskOccludee = 1] = "MaskOccludee", n2[n2.COUNT = 2] = "COUNT";
- }(u || (u = {})), function(n2) {
- n2[n2.Triangle = 0] = "Triangle", n2[n2.Point = 1] = "Point", n2[n2.Line = 2] = "Line";
- }(a || (a = {})), function(n2) {
- n2[n2.STRETCH = 1] = "STRETCH", n2[n2.PAD = 2] = "PAD";
- }(c || (c = {})), function(n2) {
- n2[n2.CHANGED = 0] = "CHANGED", n2[n2.UNCHANGED = 1] = "UNCHANGED";
- }(l || (l = {})), function(n2) {
- n2[n2.Blend = 0] = "Blend", n2[n2.Opaque = 1] = "Opaque", n2[n2.Mask = 2] = "Mask", n2[n2.MaskBlend = 3] = "MaskBlend", n2[n2.COUNT = 4] = "COUNT";
- }(C || (C = {})), function(n2) {
- n2[n2.OFF = 0] = "OFF", n2[n2.ON = 1] = "ON";
- }(D || (D = {}));
- // node_modules/@arcgis/core/views/3d/webgl-engine/lib/TransparencyPassType.js
- var o;
- !function(o4) {
- o4[o4.Color = 0] = "Color", o4[o4.Alpha = 1] = "Alpha", o4[o4.FrontFace = 2] = "FrontFace", o4[o4.NONE = 3] = "NONE", o4[o4.COUNT = 4] = "COUNT";
- }(o || (o = {}));
- // node_modules/@arcgis/core/views/webgl/doublePrecisionUtils.js
- function t2(t3, n2, o4) {
- for (let r3 = 0; r3 < o4; ++r3)
- n2[2 * r3] = t3[r3], n2[2 * r3 + 1] = t3[r3] - n2[2 * r3];
- }
- function o2(t3, n2) {
- const o4 = t3.length;
- for (let r3 = 0; r3 < o4; ++r3)
- e2[0] = t3[r3], n2[r3] = e2[0];
- return n2;
- }
- function r(t3, n2) {
- const o4 = t3.length;
- for (let r3 = 0; r3 < o4; ++r3)
- e2[0] = t3[r3], e2[1] = t3[r3] - e2[0], n2[r3] = e2[1];
- return n2;
- }
- var e2 = new Float32Array(2);
- // node_modules/@arcgis/core/views/webgl/renderState.js
- function s(t3, e3, i2 = T.ADD, s2 = [0, 0, 0, 0]) {
- return { srcRgb: t3, srcAlpha: t3, dstRgb: e3, dstAlpha: e3, opRgb: i2, opAlpha: i2, color: { r: s2[0], g: s2[1], b: s2[2], a: s2[3] } };
- }
- function l2(t3, e3, i2, s2, l3 = T.ADD, r3 = T.ADD, o4 = [0, 0, 0, 0]) {
- return { srcRgb: t3, srcAlpha: e3, dstRgb: i2, dstAlpha: s2, opRgb: l3, opAlpha: r3, color: { r: o4[0], g: o4[1], b: o4[2], a: o4[3] } };
- }
- var r2 = { face: N.BACK, mode: S.CCW };
- var o3 = { face: N.FRONT, mode: S.CCW };
- var h = (e3) => e3 === n.Back ? r2 : e3 === n.Front ? o3 : null;
- var a2 = { zNear: 0, zFar: 1 };
- var _ = { r: true, g: true, b: true, a: true };
- function c2(t3) {
- return T2.intern(t3);
- }
- function d(t3) {
- return D2.intern(t3);
- }
- function p(t3) {
- return C2.intern(t3);
- }
- function u2(t3) {
- return A.intern(t3);
- }
- function g(t3) {
- return w.intern(t3);
- }
- function f(t3) {
- return B.intern(t3);
- }
- function v(t3) {
- return z.intern(t3);
- }
- function I(t3) {
- return j.intern(t3);
- }
- function W(t3) {
- return N3.intern(t3);
- }
- var S2 = class {
- constructor(t3, e3) {
- this._makeKey = t3, this._makeRef = e3, this._interns = /* @__PURE__ */ new Map();
- }
- intern(t3) {
- var _a;
- if (!t3)
- return null;
- const e3 = this._makeKey(t3), i2 = this._interns;
- return i2.has(e3) || i2.set(e3, this._makeRef(t3)), (_a = i2.get(e3)) != null ? _a : null;
- }
- };
- function b(t3) {
- return "[" + t3.join(",") + "]";
- }
- var T2 = new S2(y, (t3) => ({ __tag: "Blending", ...t3 }));
- function y(t3) {
- return t3 ? b([t3.srcRgb, t3.srcAlpha, t3.dstRgb, t3.dstAlpha, t3.opRgb, t3.opAlpha, t3.color.r, t3.color.g, t3.color.b, t3.color.a]) : null;
- }
- var D2 = new S2(O2, (t3) => ({ __tag: "Culling", ...t3 }));
- function O2(t3) {
- return t3 ? b([t3.face, t3.mode]) : null;
- }
- var C2 = new S2(m, (t3) => ({ __tag: "PolygonOffset", ...t3 }));
- function m(t3) {
- return t3 ? b([t3.factor, t3.units]) : null;
- }
- var A = new S2(R, (t3) => ({ __tag: "DepthTest", ...t3 }));
- function R(t3) {
- return t3 ? b([t3.func]) : null;
- }
- var w = new S2(k, (t3) => ({ __tag: "StencilTest", ...t3 }));
- function k(t3) {
- return t3 ? b([t3.function.func, t3.function.ref, t3.function.mask, t3.operation.fail, t3.operation.zFail, t3.operation.zPass]) : null;
- }
- var B = new S2(P, (t3) => ({ __tag: "DepthWrite", ...t3 }));
- function P(t3) {
- return t3 ? b([t3.zNear, t3.zFar]) : null;
- }
- var z = new S2(F, (t3) => ({ __tag: "ColorWrite", ...t3 }));
- function F(t3) {
- return t3 ? b([t3.r, t3.g, t3.b, t3.a]) : null;
- }
- var j = new S2(K, (t3) => ({ __tag: "StencilWrite", ...t3 }));
- function K(t3) {
- return t3 ? b([t3.mask]) : null;
- }
- var N3 = new S2(x, (t3) => ({ blending: c2(t3.blending), culling: d(t3.culling), polygonOffset: p(t3.polygonOffset), depthTest: u2(t3.depthTest), stencilTest: g(t3.stencilTest), depthWrite: f(t3.depthWrite), colorWrite: v(t3.colorWrite), stencilWrite: I(t3.stencilWrite) }));
- function x(t3) {
- return t3 ? b([y(t3.blending), O2(t3.culling), m(t3.polygonOffset), R(t3.depthTest), k(t3.stencilTest), P(t3.depthWrite), F(t3.colorWrite), K(t3.stencilWrite)]) : null;
- }
- var M = class {
- constructor(t3) {
- this._pipelineInvalid = true, this._blendingInvalid = true, this._cullingInvalid = true, this._polygonOffsetInvalid = true, this._depthTestInvalid = true, this._stencilTestInvalid = true, this._depthWriteInvalid = true, this._colorWriteInvalid = true, this._stencilWriteInvalid = true, this._stateSetters = t3;
- }
- setPipeline(t3) {
- (this._pipelineInvalid || t3 !== this._pipeline) && (this._setBlending(t3.blending), this._setCulling(t3.culling), this._setPolygonOffset(t3.polygonOffset), this._setDepthTest(t3.depthTest), this._setStencilTest(t3.stencilTest), this._setDepthWrite(t3.depthWrite), this._setColorWrite(t3.colorWrite), this._setStencilWrite(t3.stencilWrite), this._pipeline = t3), this._pipelineInvalid = false;
- }
- invalidateBlending() {
- this._blendingInvalid = true, this._pipelineInvalid = true;
- }
- invalidateCulling() {
- this._cullingInvalid = true, this._pipelineInvalid = true;
- }
- invalidatePolygonOffset() {
- this._polygonOffsetInvalid = true, this._pipelineInvalid = true;
- }
- invalidateDepthTest() {
- this._depthTestInvalid = true, this._pipelineInvalid = true;
- }
- invalidateStencilTest() {
- this._stencilTestInvalid = true, this._pipelineInvalid = true;
- }
- invalidateDepthWrite() {
- this._depthWriteInvalid = true, this._pipelineInvalid = true;
- }
- invalidateColorWrite() {
- this._colorWriteInvalid = true, this._pipelineInvalid = true;
- }
- invalidateStencilWrite() {
- this._stencilTestInvalid = true, this._pipelineInvalid = true;
- }
- _setBlending(t3) {
- this._blending = this._setSubState(t3, this._blending, this._blendingInvalid, this._stateSetters.setBlending), this._blendingInvalid = false;
- }
- _setCulling(t3) {
- this._culling = this._setSubState(t3, this._culling, this._cullingInvalid, this._stateSetters.setCulling), this._cullingInvalid = false;
- }
- _setPolygonOffset(t3) {
- this._polygonOffset = this._setSubState(t3, this._polygonOffset, this._polygonOffsetInvalid, this._stateSetters.setPolygonOffset), this._polygonOffsetInvalid = false;
- }
- _setDepthTest(t3) {
- this._depthTest = this._setSubState(t3, this._depthTest, this._depthTestInvalid, this._stateSetters.setDepthTest), this._depthTestInvalid = false;
- }
- _setStencilTest(t3) {
- this._stencilTest = this._setSubState(t3, this._stencilTest, this._stencilTestInvalid, this._stateSetters.setStencilTest), this._stencilTestInvalid = false;
- }
- _setDepthWrite(t3) {
- this._depthWrite = this._setSubState(t3, this._depthWrite, this._depthWriteInvalid, this._stateSetters.setDepthWrite), this._depthWriteInvalid = false;
- }
- _setColorWrite(t3) {
- this._colorWrite = this._setSubState(t3, this._colorWrite, this._colorWriteInvalid, this._stateSetters.setColorWrite), this._colorWriteInvalid = false;
- }
- _setStencilWrite(t3) {
- this._stencilWrite = this._setSubState(t3, this._stencilWrite, this._stencilWriteInvalid, this._stateSetters.setStencilWrite), this._stencilTestInvalid = false;
- }
- _setSubState(t3, e3, i2, n2) {
- return (i2 || t3 !== e3) && (n2(t3), this._pipelineInvalid = true), t3;
- }
- };
- export {
- n,
- e,
- O,
- t,
- a,
- c,
- C,
- t2,
- o2 as o,
- r,
- o as o2,
- s,
- l2 as l,
- h,
- a2,
- _,
- W,
- M
- };
- //# sourceMappingURL=chunk-LDMWL65U.js.map
|