chunk-E5TKVDJT.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import {
  2. h,
  3. o,
  4. x
  5. } from "./chunk-264YGWEE.js";
  6. import {
  7. r
  8. } from "./chunk-ZLQP3WDC.js";
  9. import {
  10. I
  11. } from "./chunk-EQNT4A7P.js";
  12. import {
  13. e
  14. } from "./chunk-TFHLTN6F.js";
  15. import {
  16. i,
  17. s
  18. } from "./chunk-O3JQY77G.js";
  19. import {
  20. has
  21. } from "./chunk-SPWQ3AWG.js";
  22. // node_modules/@arcgis/core/views/2d/engine/webgl/TiledDisplayObject.js
  23. var r2 = class extends r {
  24. constructor(t, s2, i3, r3, h2, o2, n2 = h2, a = o2) {
  25. super(), this.triangleCountReportedInDebug = 0, this.triangleCount = 0, this.texture = null, this.key = new e(t), this.resolution = s2, this.x = i3, this.y = r3, this.width = h2, this.height = o2, this.rangeX = n2, this.rangeY = a;
  26. }
  27. destroy() {
  28. this.texture && (this.texture.dispose(), this.texture = null);
  29. }
  30. setTransform(i3) {
  31. const e2 = this.resolution / (i3.resolution * i3.pixelRatio), r3 = this.transforms.tileMat3, [h2, o2] = i3.toScreenNoRotation([0, 0], [this.x, this.y]), n2 = this.width / this.rangeX * e2, a = this.height / this.rangeY * e2;
  32. s(r3, n2, 0, 0, 0, a, 0, h2, o2, 1), i(this.transforms.dvs, i3.displayViewMat3, r3);
  33. }
  34. };
  35. // node_modules/@arcgis/core/views/2d/engine/webgl/TileContainer.js
  36. var n = (e2, r3) => e2.key.level - r3.key.level != 0 ? e2.key.level - r3.key.level : e2.key.row - r3.key.row != 0 ? e2.key.row - r3.key.row : e2.key.col - r3.key.col;
  37. var i2 = class extends o {
  38. constructor(e2) {
  39. super(), this._tileInfoView = e2;
  40. }
  41. get requiresDedicatedFBO() {
  42. return false;
  43. }
  44. renderChildren(e2) {
  45. this.sortChildren(n), this.setStencilReference(e2), super.renderChildren(e2);
  46. }
  47. createRenderParams(e2) {
  48. const { state: r3 } = e2, s2 = super.createRenderParams(e2);
  49. return s2.requiredLevel = this._tileInfoView.getClosestInfoForScale(r3.scale).level, s2.displayLevel = this._tileInfoView.tileInfo.scaleToZoom(r3.scale), s2;
  50. }
  51. prepareRenderPasses(r3) {
  52. const n2 = super.prepareRenderPasses(r3);
  53. return n2.push(r3.registerRenderPass({ name: "stencil", brushes: [h], drawPhase: I.DEBUG | I.MAP | I.HIGHLIGHT, target: () => this.getStencilTarget() })), has("esri-tiles-debug") && n2.push(r3.registerRenderPass({ name: "tileInfo", brushes: [x], drawPhase: I.DEBUG, target: () => this.children })), n2;
  54. }
  55. getStencilTarget() {
  56. return this.children;
  57. }
  58. setStencilReference(e2) {
  59. let r3 = 1;
  60. for (const s2 of this.children)
  61. s2.stencilRef = r3++;
  62. }
  63. };
  64. export {
  65. r2 as r,
  66. i2 as i
  67. };
  68. //# sourceMappingURL=chunk-E5TKVDJT.js.map