chunk-G3TNMPDJ.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. import {
  2. O,
  3. n
  4. } from "./chunk-EPIK5VPD.js";
  5. import {
  6. I,
  7. N,
  8. R,
  9. S,
  10. T
  11. } from "./chunk-MI7HWWFL.js";
  12. import {
  13. U
  14. } from "./chunk-VNFRAYHO.js";
  15. // node_modules/@arcgis/core/support/requestImageUtils.js
  16. async function t(t2, r2) {
  17. const { data: a2 } = await U(t2, { responseType: "image", ...r2 });
  18. return a2;
  19. }
  20. // node_modules/@arcgis/core/views/webgl/renderState.js
  21. function s(t2, e, i2 = T.ADD, s2 = [0, 0, 0, 0]) {
  22. 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] } };
  23. }
  24. function l(t2, e, i2, s2, l3 = T.ADD, r2 = T.ADD, o2 = [0, 0, 0, 0]) {
  25. 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] } };
  26. }
  27. var r = { face: N.BACK, mode: S.CCW };
  28. var o = { face: N.FRONT, mode: S.CCW };
  29. var h = (e) => e === n.Back ? r : e === n.Front ? o : null;
  30. var a = { zNear: 0, zFar: 1 };
  31. var c = { r: true, g: true, b: true, a: true };
  32. function _(t2) {
  33. return T2.intern(t2);
  34. }
  35. function d(t2) {
  36. return D.intern(t2);
  37. }
  38. function p(t2) {
  39. return C.intern(t2);
  40. }
  41. function u(t2) {
  42. return A.intern(t2);
  43. }
  44. function g(t2) {
  45. return w.intern(t2);
  46. }
  47. function f(t2) {
  48. return B.intern(t2);
  49. }
  50. function v(t2) {
  51. return z.intern(t2);
  52. }
  53. function I2(t2) {
  54. return j.intern(t2);
  55. }
  56. function W(t2) {
  57. return N2.intern(t2);
  58. }
  59. var S2 = class {
  60. constructor(t2, e) {
  61. this.makeKey = t2, this.makeRef = e, this.interns = new Map();
  62. }
  63. intern(t2) {
  64. if (!t2)
  65. return null;
  66. const e = this.makeKey(t2), i2 = this.interns;
  67. return i2.has(e) || i2.set(e, this.makeRef(t2)), i2.get(e);
  68. }
  69. };
  70. function b(t2) {
  71. return "[" + t2.join(",") + "]";
  72. }
  73. var T2 = new S2(y, (t2) => ({ __tag: "Blending", ...t2 }));
  74. function y(t2) {
  75. 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;
  76. }
  77. var D = new S2(O2, (t2) => ({ __tag: "Culling", ...t2 }));
  78. function O2(t2) {
  79. return t2 ? b([t2.face, t2.mode]) : null;
  80. }
  81. var C = new S2(m, (t2) => ({ __tag: "PolygonOffset", ...t2 }));
  82. function m(t2) {
  83. return t2 ? b([t2.factor, t2.units]) : null;
  84. }
  85. var A = new S2(R2, (t2) => ({ __tag: "DepthTest", ...t2 }));
  86. function R2(t2) {
  87. return t2 ? b([t2.func]) : null;
  88. }
  89. var w = new S2(k, (t2) => ({ __tag: "StencilTest", ...t2 }));
  90. function k(t2) {
  91. return t2 ? b([t2.function.func, t2.function.ref, t2.function.mask, t2.operation.fail, t2.operation.zFail, t2.operation.zPass]) : null;
  92. }
  93. var B = new S2(P, (t2) => ({ __tag: "DepthWrite", ...t2 }));
  94. function P(t2) {
  95. return t2 ? b([t2.zNear, t2.zFar]) : null;
  96. }
  97. var z = new S2(F, (t2) => ({ __tag: "ColorWrite", ...t2 }));
  98. function F(t2) {
  99. return t2 ? b([t2.r, t2.g, t2.b, t2.a]) : null;
  100. }
  101. var j = new S2(K, (t2) => ({ __tag: "StencilWrite", ...t2 }));
  102. function K(t2) {
  103. return t2 ? b([t2.mask]) : null;
  104. }
  105. 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) }));
  106. function x(t2) {
  107. 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;
  108. }
  109. var M = class {
  110. constructor(t2) {
  111. 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;
  112. }
  113. setPipeline(t2) {
  114. (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;
  115. }
  116. invalidateBlending() {
  117. this._blendingInvalid = true, this._pipelineInvalid = true;
  118. }
  119. invalidateCulling() {
  120. this._cullingInvalid = true, this._pipelineInvalid = true;
  121. }
  122. invalidatePolygonOffset() {
  123. this._polygonOffsetInvalid = true, this._pipelineInvalid = true;
  124. }
  125. invalidateDepthTest() {
  126. this._depthTestInvalid = true, this._pipelineInvalid = true;
  127. }
  128. invalidateStencilTest() {
  129. this._stencilTestInvalid = true, this._pipelineInvalid = true;
  130. }
  131. invalidateDepthWrite() {
  132. this._depthWriteInvalid = true, this._pipelineInvalid = true;
  133. }
  134. invalidateColorWrite() {
  135. this._colorWriteInvalid = true, this._pipelineInvalid = true;
  136. }
  137. invalidateStencilWrite() {
  138. this._stencilTestInvalid = true, this._pipelineInvalid = true;
  139. }
  140. _setBlending(t2) {
  141. this._blending = this._setSubState(t2, this._blending, this._blendingInvalid, this._stateSetters.setBlending), this._blendingInvalid = false;
  142. }
  143. _setCulling(t2) {
  144. this._culling = this._setSubState(t2, this._culling, this._cullingInvalid, this._stateSetters.setCulling), this._cullingInvalid = false;
  145. }
  146. _setPolygonOffset(t2) {
  147. this._polygonOffset = this._setSubState(t2, this._polygonOffset, this._polygonOffsetInvalid, this._stateSetters.setPolygonOffset), this._polygonOffsetInvalid = false;
  148. }
  149. _setDepthTest(t2) {
  150. this._depthTest = this._setSubState(t2, this._depthTest, this._depthTestInvalid, this._stateSetters.setDepthTest), this._depthTestInvalid = false;
  151. }
  152. _setStencilTest(t2) {
  153. this._stencilTest = this._setSubState(t2, this._stencilTest, this._stencilTestInvalid, this._stateSetters.setStencilTest), this._stencilTestInvalid = false;
  154. }
  155. _setDepthWrite(t2) {
  156. this._depthWrite = this._setSubState(t2, this._depthWrite, this._depthWriteInvalid, this._stateSetters.setDepthWrite), this._depthWriteInvalid = false;
  157. }
  158. _setColorWrite(t2) {
  159. this._colorWrite = this._setSubState(t2, this._colorWrite, this._colorWriteInvalid, this._stateSetters.setColorWrite), this._colorWriteInvalid = false;
  160. }
  161. _setStencilWrite(t2) {
  162. this._stencilWrite = this._setSubState(t2, this._stencilWrite, this._stencilWriteInvalid, this._stateSetters.setStencilWrite), this._stencilTestInvalid = false;
  163. }
  164. _setSubState(t2, e, i2, n2) {
  165. return (i2 || t2 !== e) && (n2(t2), this._pipelineInvalid = true), t2;
  166. }
  167. };
  168. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/OrderIndependentTransparency.js
  169. var c2 = l(R.SRC_ALPHA, R.ONE, R.ONE_MINUS_SRC_ALPHA, R.ONE_MINUS_SRC_ALPHA);
  170. var N3 = s(R.ONE, R.ONE);
  171. var A2 = s(R.ZERO, R.ONE_MINUS_SRC_ALPHA);
  172. function E(r2) {
  173. return r2 === O.FrontFace ? null : r2 === O.Alpha ? A2 : N3;
  174. }
  175. var _2 = 5e5;
  176. var f2 = { factor: -1, units: -2 };
  177. function i(n2) {
  178. return n2 ? f2 : null;
  179. }
  180. function l2(r2, e = I.LESS) {
  181. return r2 === O.NONE || r2 === O.FrontFace ? e : I.LEQUAL;
  182. }
  183. export {
  184. t,
  185. h,
  186. a,
  187. c,
  188. W,
  189. M,
  190. c2,
  191. A2 as A,
  192. E,
  193. _2 as _,
  194. i,
  195. l2 as l
  196. };
  197. //# sourceMappingURL=chunk-G3TNMPDJ.js.map