@deck.gl/arcgis 9.0.35 → 9.1.0-beta.1

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/commons.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Model } from '@luma.gl/engine';
2
- import { Deck } from '@deck.gl/core';
3
1
  import type { Texture, Framebuffer } from '@luma.gl/core';
2
+ import { Deck } from '@deck.gl/core';
3
+ import { Model } from '@luma.gl/engine';
4
4
  interface Renderer {
5
5
  redraw: () => void;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"commons.d.ts","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAW,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,KAAK,EAAS,OAAO,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAEhE,UAAU,QAAQ;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,WAAW,CAAC;CAClB,CAAC;AA8BF,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,QAAQ,EACd,EAAE,EAAE,sBAAsB,GACzB,OAAO,CAAC,eAAe,CAAC,CAkF1B;AAED,wBAAgB,MAAM,CACpB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE;IACR,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,QAgCF;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,eAAe,QAK3D"}
1
+ {"version":3,"file":"commons.d.ts","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAS,OAAO,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,KAAK,EAAW,MAAM,iBAAiB,CAAC;AAGhD,UAAU,QAAQ;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,WAAW,CAAC;CAClB,CAAC;AA8BF,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,QAAQ,EACd,EAAE,EAAE,sBAAsB,GACzB,OAAO,CAAC,eAAe,CAAC,CAkF1B;AAED,wBAAgB,MAAM,CACpB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE;IACR,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,QAkCF;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,eAAe,QAK3D"}
package/dist/commons.js CHANGED
@@ -1,7 +1,11 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  /* eslint-disable no-invalid-this */
2
5
  import { GL } from '@luma.gl/constants';
3
- import { Model, Geometry } from '@luma.gl/engine';
4
6
  import { Deck } from '@deck.gl/core';
7
+ import { Model, Geometry } from '@luma.gl/engine';
8
+ import { WebGLDevice } from '@luma.gl/webgl';
5
9
  async function createDeckInstance(gl) {
6
10
  return new Promise(resolve => {
7
11
  const deckInstance = new Deck({
@@ -103,29 +107,31 @@ void main(void) {
103
107
  export function render(resources, viewport) {
104
108
  const { model, deck, fbo } = resources;
105
109
  const device = model.device;
106
- // @ts-ignore device.getParametersWebGL should return `any` not `void`?
107
- const screenFbo = device.getParametersWebGL(36006);
108
- const { width, height, ...viewState } = viewport;
109
- /* global window */
110
- const dpr = window.devicePixelRatio;
111
- const pixelWidth = Math.round(width * dpr);
112
- const pixelHeight = Math.round(height * dpr);
113
- fbo.resize({ width: pixelWidth, height: pixelHeight });
114
- deck.setProps({ viewState });
115
- // redraw deck immediately into deckFbo
116
- deck.redraw('arcgis');
117
- // We overlay the texture on top of the map using the full-screen quad.
118
- const textureToScreenPass = device.beginRenderPass({
119
- framebuffer: screenFbo,
120
- parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },
121
- clearColor: false,
122
- clearDepth: false
123
- });
124
- try {
125
- model.draw(textureToScreenPass);
126
- }
127
- finally {
128
- textureToScreenPass.end();
110
+ if (device instanceof WebGLDevice) {
111
+ // @ts-ignore device.getParametersWebGL should return `any` not `void`?
112
+ const screenFbo = device.getParametersWebGL(36006);
113
+ const { width, height, ...viewState } = viewport;
114
+ /* global window */
115
+ const dpr = window.devicePixelRatio;
116
+ const pixelWidth = Math.round(width * dpr);
117
+ const pixelHeight = Math.round(height * dpr);
118
+ fbo.resize({ width: pixelWidth, height: pixelHeight });
119
+ deck.setProps({ viewState });
120
+ // redraw deck immediately into deckFbo
121
+ deck.redraw('arcgis');
122
+ // We overlay the texture on top of the map using the full-screen quad.
123
+ const textureToScreenPass = device.beginRenderPass({
124
+ framebuffer: screenFbo,
125
+ parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },
126
+ clearColor: false,
127
+ clearDepth: false
128
+ });
129
+ try {
130
+ model.draw(textureToScreenPass);
131
+ }
132
+ finally {
133
+ textureToScreenPass.end();
134
+ }
129
135
  }
130
136
  }
131
137
  export function finalizeResources(resources) {
@@ -1 +1 @@
1
- {"version":3,"file":"deck-layer-view-2d.d.ts","sourceRoot":"","sources":["../src/deck-layer-view-2d.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,iBAAiB,KAAA,OAgE9D"}
1
+ {"version":3,"file":"deck-layer-view-2d.d.ts","sourceRoot":"","sources":["../src/deck-layer-view-2d.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,iBAAiB,KAAA,OAgE9D"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  import { initializeResources, render, finalizeResources } from "./commons.js";
2
5
  export default function createDeckLayerView2D(BaseLayerViewGL2D) {
3
6
  return BaseLayerViewGL2D.createSubclass({
@@ -1 +1 @@
1
- {"version":3,"file":"deck-layer.d.ts","sourceRoot":"","sources":["../src/deck-layer.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA,EAAE,eAAe,KAAA,OAgCxE"}
1
+ {"version":3,"file":"deck-layer.d.ts","sourceRoot":"","sources":["../src/deck-layer.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA,EAAE,eAAe,KAAA,OAgCxE"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  export default function createDeckLayer(DeckProps, Layer, DeckLayerView2D) {
2
5
  // A layer that displays inside a MapView using an instance
3
6
  // of the layer view defined above.
@@ -1 +1 @@
1
- {"version":3,"file":"deck-props.d.ts","sourceRoot":"","sources":["../src/deck-props.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,KAAA,OAsC/C"}
1
+ {"version":3,"file":"deck-props.d.ts","sourceRoot":"","sources":["../src/deck-props.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,KAAA,OAsC/C"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  const properties = {
2
5
  layers: {},
3
6
  layerFilter: {},
@@ -1,5 +1,6 @@
1
1
  import { RenderResources } from "./commons.js";
2
2
  import SceneView from '@arcgis/core/views/SceneView';
3
+ import type { DeckProps } from '@deck.gl/core';
3
4
  export default function createDeckRenderer(DeckProps: any, externalRenderers: any): {
4
5
  new (view: SceneView, props: DeckProps): {
5
6
  view: SceneView;
@@ -1 +1 @@
1
- {"version":3,"file":"deck-renderer.d.ts","sourceRoot":"","sources":["../src/deck-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAiD,eAAe,EAAC,qBAAkB;AAE1F,OAAO,SAAS,MAAM,8BAA8B,CAAC;AAWrD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,KAAA,EAAE,iBAAiB,KAAA;eAOjD,SAAS,SAAS,SAAS;cALvC,SAAS;cACT,GAAG;mBACE,eAAe,GAAG,IAAI;8BACX,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;;;;;;EAqD5C"}
1
+ {"version":3,"file":"deck-renderer.d.ts","sourceRoot":"","sources":["../src/deck-renderer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiD,eAAe,EAAC,qBAAkB;AAE1F,OAAO,SAAS,MAAM,8BAA8B,CAAC;AACrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAU7C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,KAAA,EAAE,iBAAiB,KAAA;eAOjD,SAAS,SAAS,SAAS;cALvC,SAAS;cACT,GAAG;mBACE,eAAe,GAAG,IAAI;8BACX,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;;;;;;EAqD5C"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  /* eslint-disable no-invalid-this */
2
5
  import { initializeResources, render, finalizeResources } from "./commons.js";
3
6
  /** Convert ArcGIS FOV to WebMercatorViewport altitude */