123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- import {
- O,
- n
- } from "./chunk-EPIK5VPD.js";
- import {
- I,
- N,
- R,
- S,
- T
- } from "./chunk-MI7HWWFL.js";
- import {
- U
- } from "./chunk-VNFRAYHO.js";
- // node_modules/@arcgis/core/support/requestImageUtils.js
- async function t(t2, r2) {
- const { data: a2 } = await U(t2, { responseType: "image", ...r2 });
- return a2;
- }
- // node_modules/@arcgis/core/views/webgl/renderState.js
- function s(t2, e, i2 = T.ADD, s2 = [0, 0, 0, 0]) {
- return { srcRgb: t2, srcAlpha: t2, dstRgb: e, dstAlpha: e, opRgb: i2, opAlpha: i2, color: { r: s2[0], g: s2[1], b: s2[2], a: s2[3] } };
- }
- function l(t2, e, i2, s2, l3 = T.ADD, r2 = T.ADD, o2 = [0, 0, 0, 0]) {
- return { srcRgb: t2, srcAlpha: e, dstRgb: i2, dstAlpha: s2, opRgb: l3, opAlpha: r2, color: { r: o2[0], g: o2[1], b: o2[2], a: o2[3] } };
- }
- var r = { face: N.BACK, mode: S.CCW };
- var o = { face: N.FRONT, mode: S.CCW };
- var h = (e) => e === n.Back ? r : e === n.Front ? o : null;
- var a = { zNear: 0, zFar: 1 };
- var c = { r: true, g: true, b: true, a: true };
- function _(t2) {
- return T2.intern(t2);
- }
- function d(t2) {
- return D.intern(t2);
- }
- function p(t2) {
- return C.intern(t2);
- }
- function u(t2) {
- return A.intern(t2);
- }
- function g(t2) {
- return w.intern(t2);
- }
- function f(t2) {
- return B.intern(t2);
- }
- function v(t2) {
- return z.intern(t2);
- }
- function I2(t2) {
- return j.intern(t2);
- }
- function W(t2) {
- return N2.intern(t2);
- }
- var S2 = class {
- constructor(t2, e) {
- this.makeKey = t2, this.makeRef = e, this.interns = new Map();
- }
- intern(t2) {
- if (!t2)
- return null;
- const e = this.makeKey(t2), i2 = this.interns;
- return i2.has(e) || i2.set(e, this.makeRef(t2)), i2.get(e);
- }
- };
- function b(t2) {
- return "[" + t2.join(",") + "]";
- }
- var T2 = new S2(y, (t2) => ({ __tag: "Blending", ...t2 }));
- function y(t2) {
- return t2 ? b([t2.srcRgb, t2.srcAlpha, t2.dstRgb, t2.dstAlpha, t2.opRgb, t2.opAlpha, t2.color.r, t2.color.g, t2.color.b, t2.color.a]) : null;
- }
- var D = new S2(O2, (t2) => ({ __tag: "Culling", ...t2 }));
- function O2(t2) {
- return t2 ? b([t2.face, t2.mode]) : null;
- }
- var C = new S2(m, (t2) => ({ __tag: "PolygonOffset", ...t2 }));
- function m(t2) {
- return t2 ? b([t2.factor, t2.units]) : null;
- }
- var A = new S2(R2, (t2) => ({ __tag: "DepthTest", ...t2 }));
- function R2(t2) {
- return t2 ? b([t2.func]) : null;
- }
- var w = new S2(k, (t2) => ({ __tag: "StencilTest", ...t2 }));
- function k(t2) {
- return t2 ? b([t2.function.func, t2.function.ref, t2.function.mask, t2.operation.fail, t2.operation.zFail, t2.operation.zPass]) : null;
- }
- var B = new S2(P, (t2) => ({ __tag: "DepthWrite", ...t2 }));
- function P(t2) {
- return t2 ? b([t2.zNear, t2.zFar]) : null;
- }
- var z = new S2(F, (t2) => ({ __tag: "ColorWrite", ...t2 }));
- function F(t2) {
- return t2 ? b([t2.r, t2.g, t2.b, t2.a]) : null;
- }
- var j = new S2(K, (t2) => ({ __tag: "StencilWrite", ...t2 }));
- function K(t2) {
- return t2 ? b([t2.mask]) : null;
- }
- var N2 = new S2(x, (t2) => ({ blending: _(t2.blending), culling: d(t2.culling), polygonOffset: p(t2.polygonOffset), depthTest: u(t2.depthTest), stencilTest: g(t2.stencilTest), depthWrite: f(t2.depthWrite), colorWrite: v(t2.colorWrite), stencilWrite: I2(t2.stencilWrite) }));
- function x(t2) {
- return t2 ? b([y(t2.blending), O2(t2.culling), m(t2.polygonOffset), R2(t2.depthTest), k(t2.stencilTest), P(t2.depthWrite), F(t2.colorWrite), K(t2.stencilWrite)]) : null;
- }
- var M = class {
- constructor(t2) {
- 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 = t2;
- }
- setPipeline(t2) {
- (this._pipelineInvalid || t2 !== this._pipeline) && (this._setBlending(t2.blending), this._setCulling(t2.culling), this._setPolygonOffset(t2.polygonOffset), this._setDepthTest(t2.depthTest), this._setStencilTest(t2.stencilTest), this._setDepthWrite(t2.depthWrite), this._setColorWrite(t2.colorWrite), this._setStencilWrite(t2.stencilWrite), this._pipeline = t2), 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(t2) {
- this._blending = this._setSubState(t2, this._blending, this._blendingInvalid, this._stateSetters.setBlending), this._blendingInvalid = false;
- }
- _setCulling(t2) {
- this._culling = this._setSubState(t2, this._culling, this._cullingInvalid, this._stateSetters.setCulling), this._cullingInvalid = false;
- }
- _setPolygonOffset(t2) {
- this._polygonOffset = this._setSubState(t2, this._polygonOffset, this._polygonOffsetInvalid, this._stateSetters.setPolygonOffset), this._polygonOffsetInvalid = false;
- }
- _setDepthTest(t2) {
- this._depthTest = this._setSubState(t2, this._depthTest, this._depthTestInvalid, this._stateSetters.setDepthTest), this._depthTestInvalid = false;
- }
- _setStencilTest(t2) {
- this._stencilTest = this._setSubState(t2, this._stencilTest, this._stencilTestInvalid, this._stateSetters.setStencilTest), this._stencilTestInvalid = false;
- }
- _setDepthWrite(t2) {
- this._depthWrite = this._setSubState(t2, this._depthWrite, this._depthWriteInvalid, this._stateSetters.setDepthWrite), this._depthWriteInvalid = false;
- }
- _setColorWrite(t2) {
- this._colorWrite = this._setSubState(t2, this._colorWrite, this._colorWriteInvalid, this._stateSetters.setColorWrite), this._colorWriteInvalid = false;
- }
- _setStencilWrite(t2) {
- this._stencilWrite = this._setSubState(t2, this._stencilWrite, this._stencilWriteInvalid, this._stateSetters.setStencilWrite), this._stencilTestInvalid = false;
- }
- _setSubState(t2, e, i2, n2) {
- return (i2 || t2 !== e) && (n2(t2), this._pipelineInvalid = true), t2;
- }
- };
- // node_modules/@arcgis/core/views/3d/webgl-engine/lib/OrderIndependentTransparency.js
- var c2 = l(R.SRC_ALPHA, R.ONE, R.ONE_MINUS_SRC_ALPHA, R.ONE_MINUS_SRC_ALPHA);
- var N3 = s(R.ONE, R.ONE);
- var A2 = s(R.ZERO, R.ONE_MINUS_SRC_ALPHA);
- function E(r2) {
- return r2 === O.FrontFace ? null : r2 === O.Alpha ? A2 : N3;
- }
- var _2 = 5e5;
- var f2 = { factor: -1, units: -2 };
- function i(n2) {
- return n2 ? f2 : null;
- }
- function l2(r2, e = I.LESS) {
- return r2 === O.NONE || r2 === O.FrontFace ? e : I.LEQUAL;
- }
- export {
- t,
- h,
- a,
- c,
- W,
- M,
- c2,
- A2 as A,
- E,
- _2 as _,
- i,
- l2 as l
- };
- //# sourceMappingURL=chunk-G3TNMPDJ.js.map
|