@deck.gl/arcgis 9.0.3 → 9.0.5
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 +2 -2
- package/dist/commons.d.ts.map +1 -1
- package/dist/commons.js +42 -24
- package/dist/deck-layer-view-2d.d.ts.map +1 -1
- package/dist/deck-layer-view-2d.js +21 -8
- package/dist/deck-renderer.d.ts +2 -1
- package/dist/deck-renderer.d.ts.map +1 -1
- package/dist/deck-renderer.js +11 -4
- package/dist/dist.dev.js +190 -5660
- package/dist/index.cjs +67 -33
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist.min.js +2 -3
- package/package.json +4 -5
- package/src/commons.ts +56 -36
- package/src/deck-layer-view-2d.ts +22 -8
- package/src/deck-renderer.ts +12 -4
package/dist/index.cjs
CHANGED
|
@@ -110,14 +110,29 @@ function createDeckLayer(DeckProps2, Layer2, DeckLayerView2D2) {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
// dist/deck-layer-view-2d.js
|
|
114
|
-
var import_webgl = require("@luma.gl/webgl");
|
|
115
|
-
|
|
116
113
|
// dist/commons.js
|
|
117
114
|
var import_constants = require("@luma.gl/constants");
|
|
118
115
|
var import_engine = require("@luma.gl/engine");
|
|
119
116
|
var import_core = require("@deck.gl/core");
|
|
120
|
-
function
|
|
117
|
+
async function createDeckInstance(gl) {
|
|
118
|
+
return new Promise((resolve) => {
|
|
119
|
+
const deckInstance = new import_core.Deck({
|
|
120
|
+
viewState: {},
|
|
121
|
+
controller: false,
|
|
122
|
+
gl,
|
|
123
|
+
parameters: {
|
|
124
|
+
depthCompare: "less-equal"
|
|
125
|
+
},
|
|
126
|
+
width: null,
|
|
127
|
+
height: null,
|
|
128
|
+
onDeviceInitialized: (device) => {
|
|
129
|
+
resolve({ deckInstance, device });
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async function initializeResources(gl) {
|
|
135
|
+
const { deckInstance, device } = await createDeckInstance(gl);
|
|
121
136
|
const texture = device.createTexture({
|
|
122
137
|
format: "rgba8unorm",
|
|
123
138
|
width: 1,
|
|
@@ -155,7 +170,13 @@ void main(void) {
|
|
|
155
170
|
},
|
|
156
171
|
parameters: {
|
|
157
172
|
depthWriteEnabled: true,
|
|
158
|
-
depthCompare: "less-equal"
|
|
173
|
+
depthCompare: "less-equal",
|
|
174
|
+
blendColorSrcFactor: "one",
|
|
175
|
+
blendColorDstFactor: "one-minus-src-alpha",
|
|
176
|
+
blendAlphaSrcFactor: "one",
|
|
177
|
+
blendAlphaDstFactor: "one-minus-src-alpha",
|
|
178
|
+
blendColorOperation: "add",
|
|
179
|
+
blendAlphaOperation: "add"
|
|
159
180
|
},
|
|
160
181
|
geometry: new import_engine.Geometry({
|
|
161
182
|
topology: "triangle-strip",
|
|
@@ -169,18 +190,11 @@ void main(void) {
|
|
|
169
190
|
id: "deckfbo",
|
|
170
191
|
width: 1,
|
|
171
192
|
height: 1,
|
|
172
|
-
colorAttachments: [texture]
|
|
193
|
+
colorAttachments: [texture],
|
|
194
|
+
depthStencilAttachment: "depth16unorm"
|
|
173
195
|
});
|
|
174
|
-
|
|
175
|
-
viewState: {},
|
|
176
|
-
controller: false,
|
|
177
|
-
device,
|
|
178
|
-
parameters: {
|
|
179
|
-
depthTest: true
|
|
180
|
-
},
|
|
196
|
+
deckInstance.setProps({
|
|
181
197
|
_framebuffer: fbo,
|
|
182
|
-
width: null,
|
|
183
|
-
height: null,
|
|
184
198
|
_customRender: (redrawReason) => {
|
|
185
199
|
if (redrawReason === "arcgis") {
|
|
186
200
|
deckInstance._drawLayers(redrawReason);
|
|
@@ -205,15 +219,14 @@ function render(resources, viewport) {
|
|
|
205
219
|
const textureToScreenPass = device.beginRenderPass({
|
|
206
220
|
framebuffer: screenFbo,
|
|
207
221
|
parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },
|
|
208
|
-
clearColor:
|
|
209
|
-
clearDepth:
|
|
222
|
+
clearColor: false,
|
|
223
|
+
clearDepth: false
|
|
210
224
|
});
|
|
211
|
-
|
|
212
|
-
blend: true,
|
|
213
|
-
blendFunc: [1, 771]
|
|
214
|
-
}, () => {
|
|
225
|
+
try {
|
|
215
226
|
model.draw(textureToScreenPass);
|
|
216
|
-
}
|
|
227
|
+
} finally {
|
|
228
|
+
textureToScreenPass.end();
|
|
229
|
+
}
|
|
217
230
|
}
|
|
218
231
|
function finalizeResources(resources) {
|
|
219
232
|
resources.deck.finalize();
|
|
@@ -226,23 +239,37 @@ function finalizeResources(resources) {
|
|
|
226
239
|
function createDeckLayerView2D(BaseLayerViewGL2D2) {
|
|
227
240
|
return BaseLayerViewGL2D2.createSubclass({
|
|
228
241
|
properties: {
|
|
242
|
+
cancelInitialization: null,
|
|
229
243
|
resources: null
|
|
230
244
|
},
|
|
231
|
-
attach() {
|
|
245
|
+
async attach() {
|
|
232
246
|
const gl = this.context;
|
|
233
|
-
|
|
234
|
-
this.
|
|
235
|
-
|
|
236
|
-
|
|
247
|
+
let cancelled = false;
|
|
248
|
+
this.cancelInitialization = () => cancelled = true;
|
|
249
|
+
const resources = await initializeResources.call(this, gl);
|
|
250
|
+
if (cancelled) {
|
|
251
|
+
finalizeResources(resources);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
this.resources = resources;
|
|
255
|
+
this.layer.deck.on("change", (props) => resources.deck.setProps(props));
|
|
256
|
+
resources.deck.setProps(this.layer.deck.toJSON());
|
|
237
257
|
},
|
|
238
258
|
redraw() {
|
|
239
259
|
this.requestRender();
|
|
240
260
|
},
|
|
241
261
|
detach() {
|
|
242
|
-
|
|
243
|
-
this.
|
|
262
|
+
var _a;
|
|
263
|
+
(_a = this.cancelInitialization) == null ? void 0 : _a.call(this);
|
|
264
|
+
if (this.resources) {
|
|
265
|
+
finalizeResources(this.resources);
|
|
266
|
+
this.resources = null;
|
|
267
|
+
}
|
|
244
268
|
},
|
|
245
269
|
render(renderParameters) {
|
|
270
|
+
if (!this.resources) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
246
273
|
const [width, height] = this.view.state.size;
|
|
247
274
|
const state = renderParameters.state;
|
|
248
275
|
render(this.resources, {
|
|
@@ -259,7 +286,6 @@ function createDeckLayerView2D(BaseLayerViewGL2D2) {
|
|
|
259
286
|
}
|
|
260
287
|
|
|
261
288
|
// dist/deck-renderer.js
|
|
262
|
-
var import_webgl2 = require("@luma.gl/webgl");
|
|
263
289
|
function arcgisFOVToDeckAltitude(fov, aspectRatio) {
|
|
264
290
|
const D = Math.sqrt(1 + aspectRatio ** 2);
|
|
265
291
|
const halfFOV = fov / 2 / 180 * Math.PI;
|
|
@@ -269,18 +295,26 @@ function createDeckRenderer(DeckProps2, externalRenderers2) {
|
|
|
269
295
|
class DeckRenderer2 {
|
|
270
296
|
constructor(view, props) {
|
|
271
297
|
this.resources = null;
|
|
298
|
+
this.cancelInitialization = null;
|
|
272
299
|
this.view = view;
|
|
273
300
|
this.deck = new DeckProps2(props);
|
|
274
301
|
}
|
|
275
|
-
setup(context) {
|
|
302
|
+
async setup(context) {
|
|
276
303
|
const gl = context.gl;
|
|
277
|
-
|
|
278
|
-
|
|
304
|
+
let cancelled = false;
|
|
305
|
+
this.cancelInitialization = () => cancelled = true;
|
|
306
|
+
const resources = await initializeResources.call(this, gl);
|
|
307
|
+
if (cancelled) {
|
|
308
|
+
finalizeResources(resources);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
279
311
|
this.deck.on("change", (props) => resources.deck.setProps(props));
|
|
280
312
|
resources.deck.setProps(this.deck.toJSON());
|
|
281
313
|
this.resources = resources;
|
|
282
314
|
}
|
|
283
315
|
dispose() {
|
|
316
|
+
var _a;
|
|
317
|
+
(_a = this.cancelInitialization) == null ? void 0 : _a.call(this);
|
|
284
318
|
if (this.resources) {
|
|
285
319
|
finalizeResources(this.resources);
|
|
286
320
|
}
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["index.js", "deck-props.js", "deck-layer.js", "deck-layer-view-2d.js", "
|
|
4
|
-
"sourcesContent": ["import createDeckProps from \"./deck-props.js\";\nimport createDeckLayer from \"./deck-layer.js\";\nimport createDeckLayerView2D from \"./deck-layer-view-2d.js\";\nimport createDeckRenderer from \"./deck-renderer.js\";\nimport Accessor from '@arcgis/core/core/Accessor';\nimport Layer from '@arcgis/core/layers/Layer';\nimport BaseLayerViewGL2D from '@arcgis/core/views/2d/layers/BaseLayerViewGL2D';\nimport * as externalRenderers from '@arcgis/core/views/3d/externalRenderers';\n// require-style loader\nexport { loadArcGISModules } from \"./load-modules.js\";\n// ESM-style classes\nconst DeckProps = createDeckProps(Accessor);\nconst DeckLayerView2D = createDeckLayerView2D(BaseLayerViewGL2D);\nexport const DeckLayer = createDeckLayer(DeckProps, Layer, DeckLayerView2D);\nexport const DeckRenderer = createDeckRenderer(DeckProps, externalRenderers);\n", "const properties = {\n layers: {},\n layerFilter: {},\n parameters: {},\n effects: {},\n pickingRadius: {},\n onBeforeRender: {},\n onAfterRender: {},\n onClick: {},\n onHover: {},\n onDragStart: {},\n onDrag: {},\n onDragEnd: {},\n onError: {},\n debug: {},\n drawPickingColors: {},\n getCursor: {},\n getTooltip: {}\n};\n/* eslint-disable callback-return */\nexport default function createDeckProps(Accessor) {\n const DeckProps = Accessor.createSubclass({\n properties,\n constructor() {\n this._callbacks = {};\n this.watch(Object.keys(properties), (newValue, oldValue, propName) => {\n this.emit('change', { [propName]: newValue });\n });\n },\n on(eventName, cb) {\n this._callbacks[eventName] = this._callbacks[eventName] || [];\n this._callbacks[eventName].push(cb);\n },\n emit(eventName, details) {\n const callbacks = this._callbacks[eventName];\n if (callbacks) {\n for (const cb of callbacks) {\n cb(details);\n }\n }\n },\n toJSON() {\n const result = {};\n for (const key of this.keys()) {\n if (this[key] !== undefined) {\n result[key] = this[key];\n }\n }\n return result;\n }\n });\n return DeckProps;\n}\n", "export default function createDeckLayer(DeckProps, Layer, DeckLayerView2D) {\n // A layer that displays inside a MapView using an instance\n // of the layer view defined above.\n return Layer.createSubclass({\n properties: {\n deck: {},\n blendMode: {},\n effect: {}\n },\n constructor() {\n this.deck = new DeckProps();\n },\n // Called by the MapView whenever a layer view\n // needs to be created for a given layer.\n createLayerView(view) {\n if (view.type === '2d') {\n return new DeckLayerView2D({\n view,\n layer: this\n });\n }\n // eslint-disable-next-line\n console.error('DeckLayer does not support SceneView at the moment. Use DeckRenderer instead.');\n return null;\n }\n });\n}\n", "import { WebGLDevice } from '@luma.gl/webgl';\nimport { initializeResources, render, finalizeResources } from \"./commons.js\";\nexport default function createDeckLayerView2D(BaseLayerViewGL2D) {\n return BaseLayerViewGL2D.createSubclass({\n properties: {\n resources: null\n },\n // Attach is called as soon as the layer view is ready to start rendering.\n attach() {\n // We use a full-screen quad and shaders to composite the frame rendered\n // with deck.gl on top of the MapView. Composition uses the MapView context.\n const gl = this.context;\n const device = WebGLDevice.attach(gl);\n this.resources = initializeResources.call(this, device);\n // Update deck props\n this.layer.deck.on('change', props => this.resources.deck.setProps(props));\n // We need to start drawing the deck.gl layer immediately.\n this.resources.deck.setProps(this.layer.deck.toJSON());\n },\n redraw() {\n this.requestRender();\n },\n // Called when the layer must be destroyed.\n detach() {\n finalizeResources(this.resources);\n this.resources = null;\n },\n // Called every time that the layer view must be rendered.\n render(renderParameters) {\n const [width, height] = this.view.state.size;\n // The view state must be kept in-sync with the MapView of the ArcGIS API.\n const state = renderParameters.state;\n render(this.resources, {\n width,\n height,\n latitude: this.view.center.latitude,\n longitude: this.view.center.longitude,\n zoom: this.view.featuresTilingScheme.scaleToLevel(state.scale),\n bearing: -state.rotation,\n pitch: 0\n });\n }\n });\n}\n", "/* eslint-disable no-invalid-this */\nimport { GL } from '@luma.gl/constants';\nimport { Model, Geometry } from '@luma.gl/engine';\nimport { Deck } from '@deck.gl/core';\nexport function initializeResources(device) {\n const texture = device.createTexture({\n format: 'rgba8unorm',\n width: 1,\n height: 1,\n sampler: {\n minFilter: 'linear',\n magFilter: 'linear',\n addressModeU: 'clamp-to-edge',\n addressModeV: 'clamp-to-edge'\n }\n });\n const model = new Model(device, {\n vs: `\\\n#version 300 es\nin vec2 pos;\nout vec2 v_texcoord;\nvoid main(void) {\n gl_Position = vec4(pos, 0.0, 1.0);\n v_texcoord = (pos + 1.0) / 2.0;\n}\n `,\n fs: `\\\n#version 300 es\nprecision mediump float;\nuniform sampler2D deckglTexture;\nin vec2 v_texcoord;\nout vec4 fragColor;\n\nvoid main(void) {\n vec4 imageColor = texture(deckglTexture, v_texcoord);\n imageColor.rgb *= imageColor.a;\n fragColor = imageColor;\n}\n `,\n bindings: {\n deckglTexture: texture\n },\n parameters: {\n depthWriteEnabled: true,\n depthCompare: 'less-equal'\n },\n geometry: new Geometry({\n topology: 'triangle-strip',\n attributes: {\n pos: { size: 2, value: new Int8Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1]) }\n }\n }),\n vertexCount: 6\n });\n const fbo = device.createFramebuffer({\n id: 'deckfbo',\n width: 1,\n height: 1,\n colorAttachments: [texture]\n });\n const deckInstance = new Deck({\n // The view state will be set dynamically to track the MapView current extent.\n viewState: {},\n // Input is handled by the ArcGIS API for JavaScript.\n controller: false,\n // We use the same WebGL context as the ArcGIS API for JavaScript.\n device,\n // We need depth testing in general; we don't know what layers might be added to the deck.\n parameters: {\n depthTest: true\n },\n // This deck renders into an auxiliary framebuffer.\n _framebuffer: fbo,\n // To disable canvas resizing, since the FBO is owned by the ArcGIS API for JavaScript.\n width: null,\n height: null,\n _customRender: redrawReason => {\n if (redrawReason === 'arcgis') {\n deckInstance._drawLayers(redrawReason);\n }\n else {\n this.redraw();\n }\n }\n });\n return { deck: deckInstance, texture, fbo, model };\n}\nexport function render(resources, viewport) {\n const { model, deck, fbo } = resources;\n const device = model.device;\n const screenFbo = device.getParametersWebGL(36006);\n const { width, height, ...viewState } = viewport;\n /* global window */\n const dpr = window.devicePixelRatio;\n const pixelWidth = Math.round(width * dpr);\n const pixelHeight = Math.round(height * dpr);\n fbo.resize({ width: pixelWidth, height: pixelHeight });\n deck.setProps({ viewState });\n // redraw deck immediately into deckFbo\n deck.redraw('arcgis');\n // We overlay the texture on top of the map using the full-screen quad.\n const textureToScreenPass = device.beginRenderPass({\n framebuffer: screenFbo,\n parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },\n clearColor: [0, 0, 0, 0],\n clearDepth: 1\n });\n device.withParametersWebGL({\n blend: true,\n blendFunc: [1, 771]\n }, () => {\n model.draw(textureToScreenPass);\n });\n}\nexport function finalizeResources(resources) {\n resources.deck.finalize();\n resources.model.destroy();\n resources.fbo.destroy();\n resources.texture.destroy();\n}\n", "/* eslint-disable no-invalid-this */\nimport { WebGLDevice } from '@luma.gl/webgl';\nimport { initializeResources, render, finalizeResources } from \"./commons.js\";\n/** Convert ArcGIS FOV to WebMercatorViewport altitude */\nfunction arcgisFOVToDeckAltitude(fov, aspectRatio) {\n // ArcGIS fov is corner-to-corner\n const D = Math.sqrt(1 + aspectRatio ** 2);\n const halfFOV = (fov / 2 / 180) * Math.PI;\n return D / 2 / Math.tan(halfFOV);\n}\nexport default function createDeckRenderer(DeckProps, externalRenderers) {\n class DeckRenderer {\n constructor(view, props) {\n this.resources = null;\n this.view = view;\n this.deck = new DeckProps(props);\n }\n setup(context) {\n const gl = context.gl;\n const device = WebGLDevice.attach(gl);\n const resources = initializeResources.call(this, device);\n this.deck.on('change', props => resources.deck.setProps(props));\n resources.deck.setProps(this.deck.toJSON());\n this.resources = resources;\n }\n dispose() {\n if (this.resources) {\n finalizeResources(this.resources);\n }\n }\n redraw() {\n externalRenderers.requestRender(this.view);\n }\n render() {\n const [width, height] = this.view.size;\n render(this.resources, {\n width,\n height,\n latitude: this.view.center.latitude,\n longitude: this.view.center.longitude,\n altitude: arcgisFOVToDeckAltitude(this.view.camera.fov, width / height),\n zoom: this.view.zoom,\n bearing: this.view.camera.heading,\n pitch: this.view.camera.tilt\n });\n }\n }\n return DeckRenderer;\n}\n", "import createDeckProps from \"./deck-props.js\";\nimport createDeckLayer from \"./deck-layer.js\";\nimport createDeckLayerView2D from \"./deck-layer-view-2d.js\";\nimport createDeckRenderer from \"./deck-renderer.js\";\nimport { loadModules as esriLoaderLoadModules } from 'esri-loader';\nlet arcGIS;\nexport async function loadArcGISModules(modules, loadScriptOptions) {\n const namespace = Array.isArray(modules) ? null : modules;\n await loadArcGISModule(namespace, loadScriptOptions);\n if (Array.isArray(modules)) {\n return esriLoaderLoadModules(modules, loadScriptOptions).then(array => {\n return { ...arcGIS, modules: array };\n });\n }\n return arcGIS;\n}\nasync function loadArcGISModule(esri, loadScriptOptions) {\n if (arcGIS) {\n // Already loaded\n return arcGIS;\n }\n if (esri) {\n // Using user-provided dependencies\n // Right now this object has to be manually assembled - let @arcgis/webpack-plugin handle this?\n const Layer = esri.layers.Layer;\n const Accessor = esri.core.Accessor;\n const BaseLayerViewGL2D = esri.views['2d'].layers.BaseLayerViewGL2D;\n const externalRenderers = esri.views['3d'].externalRenderers;\n return initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers);\n }\n const [Layer, Accessor, BaseLayerViewGL2D, externalRenderers] = await esriLoaderLoadModules([\n 'esri/layers/Layer',\n 'esri/core/Accessor',\n 'esri/views/2d/layers/BaseLayerViewGL2D',\n 'esri/views/3d/externalRenderers'\n ], loadScriptOptions);\n return initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers);\n}\nfunction initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers) {\n const DeckProps = createDeckProps(Accessor);\n const DeckLayerView2D = createDeckLayerView2D(BaseLayerViewGL2D);\n const DeckLayer = createDeckLayer(DeckProps, Layer, DeckLayerView2D);\n const DeckRenderer = createDeckRenderer(DeckProps, externalRenderers);\n arcGIS = { DeckLayer, DeckRenderer };\n return arcGIS;\n}\n"],
|
|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A,IACX;AAAA,EACJ,CAAC;AACD,SAAOC;AACX;;;ACpDe,SAAR,gBAAiCC,YAAWC,QAAOC,kBAAiB;AAGvE,SAAOD,OAAM,eAAe;AAAA,IACxB,YAAY;AAAA,MACR,MAAM,CAAC;AAAA,MACP,WAAW,CAAC;AAAA,MACZ,QAAQ,CAAC;AAAA,IACb;AAAA,IACA,cAAc;AACV,WAAK,OAAO,IAAID,WAAU;AAAA,IAC9B;AAAA,IAGA,gBAAgB,MAAM;AAClB,UAAI,KAAK,SAAS,MAAM;AACpB,eAAO,IAAIE,iBAAgB;AAAA,UACvB;AAAA,UACA,OAAO;AAAA,QACX,CAAC;AAAA,MACL;AAEA,cAAQ,MAAM,+EAA+E;AAC7F,aAAO;AAAA,IACX;AAAA,EACJ,CAAC;AACL;;;
|
|
6
|
-
"names": ["Accessor", "DeckProps", "DeckProps", "Layer", "DeckLayerView2D", "BaseLayerViewGL2D", "
|
|
3
|
+
"sources": ["index.js", "deck-props.js", "deck-layer.js", "commons.js", "deck-layer-view-2d.js", "deck-renderer.js", "load-modules.js"],
|
|
4
|
+
"sourcesContent": ["import createDeckProps from \"./deck-props.js\";\nimport createDeckLayer from \"./deck-layer.js\";\nimport createDeckLayerView2D from \"./deck-layer-view-2d.js\";\nimport createDeckRenderer from \"./deck-renderer.js\";\nimport Accessor from '@arcgis/core/core/Accessor';\nimport Layer from '@arcgis/core/layers/Layer';\nimport BaseLayerViewGL2D from '@arcgis/core/views/2d/layers/BaseLayerViewGL2D';\nimport * as externalRenderers from '@arcgis/core/views/3d/externalRenderers';\n// require-style loader\nexport { loadArcGISModules } from \"./load-modules.js\";\n// ESM-style classes\nconst DeckProps = createDeckProps(Accessor);\nconst DeckLayerView2D = createDeckLayerView2D(BaseLayerViewGL2D);\nexport const DeckLayer = createDeckLayer(DeckProps, Layer, DeckLayerView2D);\nexport const DeckRenderer = createDeckRenderer(DeckProps, externalRenderers);\n", "const properties = {\n layers: {},\n layerFilter: {},\n parameters: {},\n effects: {},\n pickingRadius: {},\n onBeforeRender: {},\n onAfterRender: {},\n onClick: {},\n onHover: {},\n onDragStart: {},\n onDrag: {},\n onDragEnd: {},\n onError: {},\n debug: {},\n drawPickingColors: {},\n getCursor: {},\n getTooltip: {}\n};\n/* eslint-disable callback-return */\nexport default function createDeckProps(Accessor) {\n const DeckProps = Accessor.createSubclass({\n properties,\n constructor() {\n this._callbacks = {};\n this.watch(Object.keys(properties), (newValue, oldValue, propName) => {\n this.emit('change', { [propName]: newValue });\n });\n },\n on(eventName, cb) {\n this._callbacks[eventName] = this._callbacks[eventName] || [];\n this._callbacks[eventName].push(cb);\n },\n emit(eventName, details) {\n const callbacks = this._callbacks[eventName];\n if (callbacks) {\n for (const cb of callbacks) {\n cb(details);\n }\n }\n },\n toJSON() {\n const result = {};\n for (const key of this.keys()) {\n if (this[key] !== undefined) {\n result[key] = this[key];\n }\n }\n return result;\n }\n });\n return DeckProps;\n}\n", "export default function createDeckLayer(DeckProps, Layer, DeckLayerView2D) {\n // A layer that displays inside a MapView using an instance\n // of the layer view defined above.\n return Layer.createSubclass({\n properties: {\n deck: {},\n blendMode: {},\n effect: {}\n },\n constructor() {\n this.deck = new DeckProps();\n },\n // Called by the MapView whenever a layer view\n // needs to be created for a given layer.\n createLayerView(view) {\n if (view.type === '2d') {\n return new DeckLayerView2D({\n view,\n layer: this\n });\n }\n // eslint-disable-next-line\n console.error('DeckLayer does not support SceneView at the moment. Use DeckRenderer instead.');\n return null;\n }\n });\n}\n", "/* eslint-disable no-invalid-this */\nimport { GL } from '@luma.gl/constants';\nimport { Model, Geometry } from '@luma.gl/engine';\nimport { Deck } from '@deck.gl/core';\nasync function createDeckInstance(gl) {\n return new Promise(resolve => {\n const deckInstance = new Deck({\n // The view state will be set dynamically to track the MapView current extent.\n viewState: {},\n // Input is handled by the ArcGIS API for JavaScript.\n controller: false,\n // We use the same WebGL context as the ArcGIS API for JavaScript.\n gl,\n // We need depth testing in general; we don't know what layers might be added to the deck.\n parameters: {\n depthCompare: 'less-equal'\n },\n // To disable canvas resizing, since the FBO is owned by the ArcGIS API for JavaScript.\n width: null,\n height: null,\n onDeviceInitialized: (device) => {\n resolve({ deckInstance, device });\n }\n });\n });\n}\nexport async function initializeResources(gl) {\n const { deckInstance, device } = await createDeckInstance(gl);\n const texture = device.createTexture({\n format: 'rgba8unorm',\n width: 1,\n height: 1,\n sampler: {\n minFilter: 'linear',\n magFilter: 'linear',\n addressModeU: 'clamp-to-edge',\n addressModeV: 'clamp-to-edge'\n }\n });\n const model = new Model(device, {\n vs: `\\\n#version 300 es\nin vec2 pos;\nout vec2 v_texcoord;\nvoid main(void) {\n gl_Position = vec4(pos, 0.0, 1.0);\n v_texcoord = (pos + 1.0) / 2.0;\n}\n `,\n fs: `\\\n#version 300 es\nprecision mediump float;\nuniform sampler2D deckglTexture;\nin vec2 v_texcoord;\nout vec4 fragColor;\n\nvoid main(void) {\n vec4 imageColor = texture(deckglTexture, v_texcoord);\n imageColor.rgb *= imageColor.a;\n fragColor = imageColor;\n}\n `,\n bindings: {\n deckglTexture: texture\n },\n parameters: {\n depthWriteEnabled: true,\n depthCompare: 'less-equal',\n blendColorSrcFactor: 'one',\n blendColorDstFactor: 'one-minus-src-alpha',\n blendAlphaSrcFactor: 'one',\n blendAlphaDstFactor: 'one-minus-src-alpha',\n blendColorOperation: 'add',\n blendAlphaOperation: 'add'\n },\n geometry: new Geometry({\n topology: 'triangle-strip',\n attributes: {\n pos: { size: 2, value: new Int8Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1]) }\n }\n }),\n vertexCount: 6\n });\n const fbo = device.createFramebuffer({\n id: 'deckfbo',\n width: 1,\n height: 1,\n colorAttachments: [texture],\n depthStencilAttachment: 'depth16unorm'\n });\n deckInstance.setProps({\n // This deck renders into an auxiliary framebuffer.\n _framebuffer: fbo,\n _customRender: redrawReason => {\n if (redrawReason === 'arcgis') {\n deckInstance._drawLayers(redrawReason);\n }\n else {\n this.redraw();\n }\n }\n });\n return { deck: deckInstance, texture, fbo, model };\n}\nexport function render(resources, viewport) {\n const { model, deck, fbo } = resources;\n const device = model.device;\n // @ts-ignore device.getParametersWebGL should return `any` not `void`?\n const screenFbo = device.getParametersWebGL(36006);\n const { width, height, ...viewState } = viewport;\n /* global window */\n const dpr = window.devicePixelRatio;\n const pixelWidth = Math.round(width * dpr);\n const pixelHeight = Math.round(height * dpr);\n fbo.resize({ width: pixelWidth, height: pixelHeight });\n deck.setProps({ viewState });\n // redraw deck immediately into deckFbo\n deck.redraw('arcgis');\n // We overlay the texture on top of the map using the full-screen quad.\n const textureToScreenPass = device.beginRenderPass({\n framebuffer: screenFbo,\n parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },\n clearColor: false,\n clearDepth: false\n });\n try {\n model.draw(textureToScreenPass);\n }\n finally {\n textureToScreenPass.end();\n }\n}\nexport function finalizeResources(resources) {\n resources.deck.finalize();\n resources.model.destroy();\n resources.fbo.destroy();\n resources.texture.destroy();\n}\n", "import { initializeResources, render, finalizeResources } from \"./commons.js\";\nexport default function createDeckLayerView2D(BaseLayerViewGL2D) {\n return BaseLayerViewGL2D.createSubclass({\n properties: {\n cancelInitialization: null,\n resources: null\n },\n // Attach is called as soon as the layer view is ready to start rendering.\n async attach() {\n // We use a full-screen quad and shaders to composite the frame rendered\n // with deck.gl on top of the MapView. Composition uses the MapView context.\n const gl = this.context;\n let cancelled = false;\n this.cancelInitialization = () => (cancelled = true);\n const resources = await initializeResources.call(this, gl);\n // If the layer got detached while awaiting, do not proceed\n if (cancelled) {\n finalizeResources(resources);\n return;\n }\n this.resources = resources;\n // Update deck props\n this.layer.deck.on('change', props => resources.deck.setProps(props));\n // We need to start drawing the deck.gl layer immediately.\n resources.deck.setProps(this.layer.deck.toJSON());\n },\n redraw() {\n this.requestRender();\n },\n // Called when the layer must be destroyed.\n detach() {\n this.cancelInitialization?.();\n if (this.resources) {\n finalizeResources(this.resources);\n this.resources = null;\n }\n },\n // Called every time that the layer view must be rendered.\n render(renderParameters) {\n if (!this.resources) {\n return;\n }\n const [width, height] = this.view.state.size;\n // The view state must be kept in-sync with the MapView of the ArcGIS API.\n const state = renderParameters.state;\n render(this.resources, {\n width,\n height,\n latitude: this.view.center.latitude,\n longitude: this.view.center.longitude,\n zoom: this.view.featuresTilingScheme.scaleToLevel(state.scale),\n bearing: -state.rotation,\n pitch: 0\n });\n }\n });\n}\n", "/* eslint-disable no-invalid-this */\nimport { initializeResources, render, finalizeResources } from \"./commons.js\";\n/** Convert ArcGIS FOV to WebMercatorViewport altitude */\nfunction arcgisFOVToDeckAltitude(fov, aspectRatio) {\n // ArcGIS fov is corner-to-corner\n const D = Math.sqrt(1 + aspectRatio ** 2);\n const halfFOV = (fov / 2 / 180) * Math.PI;\n return D / 2 / Math.tan(halfFOV);\n}\nexport default function createDeckRenderer(DeckProps, externalRenderers) {\n class DeckRenderer {\n constructor(view, props) {\n this.resources = null;\n this.cancelInitialization = null;\n this.view = view;\n this.deck = new DeckProps(props);\n }\n async setup(context) {\n const gl = context.gl;\n let cancelled = false;\n this.cancelInitialization = () => (cancelled = true);\n const resources = await initializeResources.call(this, gl);\n // If the renderer got disposed while awaiting, do not proceed\n if (cancelled) {\n finalizeResources(resources);\n return;\n }\n this.deck.on('change', props => resources.deck.setProps(props));\n resources.deck.setProps(this.deck.toJSON());\n this.resources = resources;\n }\n dispose() {\n this.cancelInitialization?.();\n if (this.resources) {\n finalizeResources(this.resources);\n }\n }\n redraw() {\n externalRenderers.requestRender(this.view);\n }\n render() {\n const [width, height] = this.view.size;\n render(this.resources, {\n width,\n height,\n latitude: this.view.center.latitude,\n longitude: this.view.center.longitude,\n altitude: arcgisFOVToDeckAltitude(this.view.camera.fov, width / height),\n zoom: this.view.zoom,\n bearing: this.view.camera.heading,\n pitch: this.view.camera.tilt\n });\n }\n }\n return DeckRenderer;\n}\n", "import createDeckProps from \"./deck-props.js\";\nimport createDeckLayer from \"./deck-layer.js\";\nimport createDeckLayerView2D from \"./deck-layer-view-2d.js\";\nimport createDeckRenderer from \"./deck-renderer.js\";\nimport { loadModules as esriLoaderLoadModules } from 'esri-loader';\nlet arcGIS;\nexport async function loadArcGISModules(modules, loadScriptOptions) {\n const namespace = Array.isArray(modules) ? null : modules;\n await loadArcGISModule(namespace, loadScriptOptions);\n if (Array.isArray(modules)) {\n return esriLoaderLoadModules(modules, loadScriptOptions).then(array => {\n return { ...arcGIS, modules: array };\n });\n }\n return arcGIS;\n}\nasync function loadArcGISModule(esri, loadScriptOptions) {\n if (arcGIS) {\n // Already loaded\n return arcGIS;\n }\n if (esri) {\n // Using user-provided dependencies\n // Right now this object has to be manually assembled - let @arcgis/webpack-plugin handle this?\n const Layer = esri.layers.Layer;\n const Accessor = esri.core.Accessor;\n const BaseLayerViewGL2D = esri.views['2d'].layers.BaseLayerViewGL2D;\n const externalRenderers = esri.views['3d'].externalRenderers;\n return initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers);\n }\n const [Layer, Accessor, BaseLayerViewGL2D, externalRenderers] = await esriLoaderLoadModules([\n 'esri/layers/Layer',\n 'esri/core/Accessor',\n 'esri/views/2d/layers/BaseLayerViewGL2D',\n 'esri/views/3d/externalRenderers'\n ], loadScriptOptions);\n return initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers);\n}\nfunction initialize(Layer, Accessor, BaseLayerViewGL2D, externalRenderers) {\n const DeckProps = createDeckProps(Accessor);\n const DeckLayerView2D = createDeckLayerView2D(BaseLayerViewGL2D);\n const DeckLayer = createDeckLayer(DeckProps, Layer, DeckLayerView2D);\n const DeckRenderer = createDeckRenderer(DeckProps, externalRenderers);\n arcGIS = { DeckLayer, DeckRenderer };\n return arcGIS;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAM,aAAa;AAAA,EACf,QAAQ,CAAC;AAAA,EACT,aAAa,CAAC;AAAA,EACd,YAAY,CAAC;AAAA,E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AAA,EACJ,GAAG,iBAAiB;AACpB,SAAO,WAAWC,QAAOC,WAAUC,oBAAmBC,kBAAiB;AAC3E;AACA,SAAS,WAAWH,QAAOC,WAAUC,oBAAmBC,oBAAmB;AACvE,QAAMC,aAAY,gBAAgBH,SAAQ;AAC1C,QAAMI,mBAAkB,sBAAsBH,kBAAiB;AAC/D,QAAMI,aAAY,gBAAgBF,YAAWJ,QAAOK,gBAAe;AACnE,QAAME,gBAAe,mBAAmBH,YAAWD,kBAAiB;AACpE,WAAS,EAAE,WAAAG,YAAW,cAAAC,cAAa;AACnC,SAAO;AACX;;;ANlCA,IAAM,YAAY,gBAAgB,gBAAAC,OAAQ;AAC1C,IAAM,kBAAkB,sBAAsB,yBAAAC,OAAiB;AACxD,IAAM,YAAY,gBAAgB,WAAW,aAAAC,SAAO,eAAe;AACnE,IAAM,eAAe,mBAAmB,WAAW,iBAAiB;",
|
|
6
|
+
"names": ["Accessor", "DeckProps", "DeckProps", "Layer", "DeckLayerView2D", "BaseLayerViewGL2D", "DeckProps", "externalRenderers", "DeckRenderer", "esriLoaderLoadModules", "Layer", "Accessor", "BaseLayerViewGL2D", "externalRenderers", "DeckProps", "DeckLayerView2D", "DeckLayer", "DeckRenderer", "Accessor", "BaseLayerViewGL2D", "Layer"]
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export declare const DeckRenderer: {
|
|
|
5
5
|
view: __esri.SceneView;
|
|
6
6
|
deck: any;
|
|
7
7
|
resources: import("./commons").RenderResources | null;
|
|
8
|
-
|
|
8
|
+
cancelInitialization: (() => void) | null;
|
|
9
|
+
setup(context: any): Promise<void>;
|
|
9
10
|
dispose(): void;
|
|
10
11
|
redraw(): void;
|
|
11
12
|
render(): void;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,iBAAiB,EAAC,0BAAuB;AAKjD,eAAO,MAAM,SAAS,KAAqD,CAAC;AAC5E,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,iBAAiB,EAAC,0BAAuB;AAKjD,eAAO,MAAM,SAAS,KAAqD,CAAC;AAC5E,eAAO,MAAM,YAAY;;;;;;;;;;;CAAmD,CAAC"}
|