@deck.gl/arcgis 9.3.3 → 9.3.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 -4
- package/dist/commons.d.ts.map +1 -1
- package/dist/commons.js +62 -22
- package/dist/commons.js.map +1 -1
- package/dist/deck-renderer.d.ts +6 -3
- package/dist/deck-renderer.d.ts.map +1 -1
- package/dist/deck-renderer.js +186 -35
- package/dist/deck-renderer.js.map +1 -1
- package/dist/dist.dev.js +7821 -98
- package/dist/index.cjs +2823 -68
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/load-modules.js +7 -7
- package/dist/load-modules.js.map +1 -1
- package/dist.min.js +6 -4
- package/package.json +2 -2
- package/src/commons.ts +73 -24
- package/src/deck-renderer.ts +230 -37
- package/src/index.ts +2 -2
- package/src/load-modules.ts +7 -7
package/dist/commons.d.ts
CHANGED
|
@@ -9,10 +9,6 @@ export type RenderResources = {
|
|
|
9
9
|
texture: Texture;
|
|
10
10
|
model: Model;
|
|
11
11
|
fbo: Framebuffer;
|
|
12
|
-
_externalFramebuffer?: {
|
|
13
|
-
handle: WebGLFramebuffer;
|
|
14
|
-
wrapper: Framebuffer;
|
|
15
|
-
};
|
|
16
12
|
};
|
|
17
13
|
export declare function initializeResources(this: Renderer, gl: WebGL2RenderingContext): Promise<RenderResources>;
|
|
18
14
|
export declare function render(resources: RenderResources, viewport: {
|
|
@@ -24,6 +20,8 @@ export declare function render(resources: RenderResources, viewport: {
|
|
|
24
20
|
altitude?: number;
|
|
25
21
|
pitch: number;
|
|
26
22
|
bearing: number;
|
|
23
|
+
views?: unknown;
|
|
24
|
+
viewState?: unknown;
|
|
27
25
|
}): void;
|
|
28
26
|
export declare function finalizeResources(resources: RenderResources): void;
|
|
29
27
|
export {};
|
package/dist/commons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commons.d.ts","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAMA,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;AAIhD,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;
|
|
1
|
+
{"version":3,"file":"commons.d.ts","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAMA,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;AAIhD,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,CAiG1B;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;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,QAmFF;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,eAAe,QAK3D"}
|
package/dist/commons.js
CHANGED
|
@@ -57,7 +57,9 @@ out vec4 fragColor;
|
|
|
57
57
|
|
|
58
58
|
void main(void) {
|
|
59
59
|
vec4 imageColor = texture(deckglTexture, v_texcoord);
|
|
60
|
-
|
|
60
|
+
// FBO stores premultiplied RGBA (rgb already multiplied by alpha).
|
|
61
|
+
// The composite blend (ONE, ONE_MINUS_SRC_ALPHA) handles premultiplied
|
|
62
|
+
// input correctly; multiplying again here would darken overlays.
|
|
61
63
|
fragColor = imageColor;
|
|
62
64
|
}
|
|
63
65
|
`,
|
|
@@ -65,8 +67,8 @@ void main(void) {
|
|
|
65
67
|
deckglTexture: texture
|
|
66
68
|
},
|
|
67
69
|
parameters: {
|
|
68
|
-
depthWriteEnabled:
|
|
69
|
-
depthCompare: '
|
|
70
|
+
depthWriteEnabled: false,
|
|
71
|
+
depthCompare: 'always',
|
|
70
72
|
blendColorSrcFactor: 'one',
|
|
71
73
|
blendColorDstFactor: 'one-minus-src-alpha',
|
|
72
74
|
blendAlphaSrcFactor: 'one',
|
|
@@ -95,6 +97,13 @@ void main(void) {
|
|
|
95
97
|
_framebuffer: fbo,
|
|
96
98
|
_customRender: redrawReason => {
|
|
97
99
|
if (redrawReason === 'arcgis') {
|
|
100
|
+
// ArcGIS renders with alphaSrc=ZERO (preserves destination alpha for its
|
|
101
|
+
// own compositing pipeline). Without resetting this, deck layers inherit
|
|
102
|
+
// that blend state and write alpha=0 into the FBO, making the composite
|
|
103
|
+
// shader output (0,0,0,0) everywhere. Reset to standard premultiplied-alpha
|
|
104
|
+
// blend so the FBO stores correct RGBA for the composite pass.
|
|
105
|
+
const glCtx = device.gl;
|
|
106
|
+
glCtx.blendFuncSeparate(glCtx.ONE, glCtx.ONE_MINUS_SRC_ALPHA, glCtx.ONE, glCtx.ONE_MINUS_SRC_ALPHA);
|
|
98
107
|
deckInstance._drawLayers(redrawReason);
|
|
99
108
|
}
|
|
100
109
|
else {
|
|
@@ -108,33 +117,65 @@ export function render(resources, viewport) {
|
|
|
108
117
|
const { model, deck, fbo } = resources;
|
|
109
118
|
const device = model.device;
|
|
110
119
|
if (device instanceof WebGLDevice) {
|
|
111
|
-
|
|
120
|
+
// @ts-ignore device.getParametersWebGL should return `any` not `void`?
|
|
121
|
+
const rawScreenFbo = device.getParametersWebGL(36006);
|
|
122
|
+
const { width, height, views, viewState, ...defaultViewState } = viewport;
|
|
112
123
|
/* global window */
|
|
113
124
|
const dpr = window.devicePixelRatio;
|
|
114
125
|
const pixelWidth = Math.round(width * dpr);
|
|
115
126
|
const pixelHeight = Math.round(height * dpr);
|
|
116
|
-
// Wrap the external framebuffer handle so luma.gl treats it as a proper Framebuffer resource.
|
|
117
|
-
const externalFbo = device.getParametersWebGL(36006);
|
|
118
|
-
let screenFbo = null;
|
|
119
|
-
if (externalFbo) {
|
|
120
|
-
if (resources._externalFramebuffer?.handle !== externalFbo) {
|
|
121
|
-
resources._externalFramebuffer?.wrapper.destroy();
|
|
122
|
-
const wrapper = device.createFramebuffer({
|
|
123
|
-
handle: externalFbo,
|
|
124
|
-
width: pixelWidth,
|
|
125
|
-
height: pixelHeight
|
|
126
|
-
});
|
|
127
|
-
resources._externalFramebuffer = { handle: externalFbo, wrapper };
|
|
128
|
-
}
|
|
129
|
-
screenFbo = resources._externalFramebuffer.wrapper;
|
|
130
|
-
}
|
|
131
127
|
fbo.resize({ width: pixelWidth, height: pixelHeight });
|
|
132
|
-
|
|
128
|
+
// luma's Framebuffer.resize() clones and destroys the color attachment texture when
|
|
129
|
+
// dimensions change, leaving the cached texture reference and the model sampler binding
|
|
130
|
+
// pointing at a destroyed GPU handle. Re-sync if the attachment was replaced.
|
|
131
|
+
const currentTexture = fbo.colorAttachments[0].texture ?? fbo.colorAttachments[0];
|
|
132
|
+
if (currentTexture !== resources.texture) {
|
|
133
|
+
resources.texture = currentTexture;
|
|
134
|
+
model.setBindings({ deckglTexture: currentTexture });
|
|
135
|
+
}
|
|
136
|
+
// Pass CSS pixel dimensions — deck handles DPR internally. Passing physical
|
|
137
|
+
// pixels would double-apply DPR and project layer geometry off-screen.
|
|
138
|
+
// Without width/height, deck's viewport aspect diverges from ArcGIS's,
|
|
139
|
+
// causing the overlay to drift off the ground plane under tilt/rotation.
|
|
140
|
+
const deckProps = {
|
|
141
|
+
width,
|
|
142
|
+
height,
|
|
143
|
+
viewState: viewState || defaultViewState
|
|
144
|
+
};
|
|
145
|
+
if (views) {
|
|
146
|
+
deckProps.views = views;
|
|
147
|
+
}
|
|
148
|
+
deck.setProps(deckProps);
|
|
133
149
|
// redraw deck immediately into deckFbo
|
|
134
150
|
deck.redraw('arcgis');
|
|
135
151
|
// We overlay the texture on top of the map using the full-screen quad.
|
|
152
|
+
const { gl } = device;
|
|
153
|
+
// drawBuffers is per-FBO state not tracked by luma's state cache;
|
|
154
|
+
// restore it for the screen FBO after rendering to the offscreen FBO.
|
|
155
|
+
if (rawScreenFbo) {
|
|
156
|
+
gl.bindFramebuffer(36160, rawScreenFbo);
|
|
157
|
+
gl.drawBuffers([36064]);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
gl.drawBuffers([1029]);
|
|
161
|
+
}
|
|
162
|
+
// The model sets blend factors but not blend:true, so
|
|
163
|
+
// setDeviceParameters won't enable blending on its own.
|
|
164
|
+
gl.enable(3042);
|
|
165
|
+
gl.blendFuncSeparate(1, 771, 1, 771);
|
|
166
|
+
gl.blendEquationSeparate(32774, 32774);
|
|
167
|
+
// luma's WEBGLRenderPass duck-types the framebuffer prop, reading `.handle`, `.width`,
|
|
168
|
+
// `.height`, and `.colorAttachments`. A raw WebGLFramebuffer has none of those, which
|
|
169
|
+
// breaks viewport auto-setup and draw-buffer selection. Build a minimal adapter that
|
|
170
|
+
// luma's state tracker accepts; `'handle' in obj` is true, so the raw FBO is bound.
|
|
171
|
+
const screenFboAdapter = {
|
|
172
|
+
handle: rawScreenFbo,
|
|
173
|
+
width: pixelWidth,
|
|
174
|
+
height: pixelHeight,
|
|
175
|
+
colorAttachments: [null]
|
|
176
|
+
};
|
|
136
177
|
const textureToScreenPass = device.beginRenderPass({
|
|
137
|
-
framebuffer:
|
|
178
|
+
framebuffer: screenFboAdapter,
|
|
138
179
|
parameters: { viewport: [0, 0, pixelWidth, pixelHeight] },
|
|
139
180
|
clearColor: false,
|
|
140
181
|
clearDepth: false
|
|
@@ -152,6 +193,5 @@ export function finalizeResources(resources) {
|
|
|
152
193
|
resources.model.destroy();
|
|
153
194
|
resources.fbo.destroy();
|
|
154
195
|
resources.texture.destroy();
|
|
155
|
-
resources._externalFramebuffer?.wrapper.destroy();
|
|
156
196
|
}
|
|
157
197
|
//# sourceMappingURL=commons.js.map
|
package/dist/commons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commons.js","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,EAAE,EAAC,MAAM,0BAA0B,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"commons.js","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,KAAK,EAAE,QAAQ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AAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAC;YACvD,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;QACH,IAAI,CAAC;YACH,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAClC,CAAC;gBAAS,CAAC;YACT,mBAAmB,CAAC,GAAG,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAA0B;IAC1D,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC1B,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC1B,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACxB,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;AAC9B,CAAC"}
|
package/dist/deck-renderer.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { RenderResources } from "./commons.js";
|
|
2
2
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
3
3
|
import type { DeckProps } from '@deck.gl/core';
|
|
4
|
-
export default function createDeckRenderer(DeckProps: any,
|
|
5
|
-
new (
|
|
4
|
+
export default function createDeckRenderer(DeckProps: any, RenderNode: any): {
|
|
5
|
+
new (viewOrProps: SceneView | ({
|
|
6
|
+
view: SceneView;
|
|
7
|
+
} & DeckProps), props?: DeckProps): {
|
|
6
8
|
view: SceneView;
|
|
7
9
|
deck: any;
|
|
8
10
|
resources: RenderResources | null;
|
|
9
11
|
cancelInitialization: (() => void) | null;
|
|
10
|
-
|
|
12
|
+
renderNode: any;
|
|
13
|
+
setup(_context?: unknown): Promise<void>;
|
|
11
14
|
dispose(): void;
|
|
12
15
|
redraw(): void;
|
|
13
16
|
render(): void;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAyF7C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,KAAA,EAAE,UAAU,KAAA;sBAQnC,SAAS,GAAG,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAC,GAAG,SAAS,CAAC,UAAU,SAAS;cANjF,SAAS;cACT,GAAG;mBACE,eAAe,GAAG,IAAI;8BACX,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;oBAC7B,GAAG;yBAiJQ,OAAO;;;;;EAqBjC"}
|
package/dist/deck-renderer.js
CHANGED
|
@@ -3,56 +3,207 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
/* eslint-disable no-invalid-this */
|
|
5
5
|
import { initializeResources, render, finalizeResources } from "./commons.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import MapView from "../../core/src/views/map-view.js";
|
|
7
|
+
// Web Mercator scale at zoom 0 for 256 px tiles; deck.gl uses 512 px tiles,
|
|
8
|
+
// so the final zoom is shifted by -1.
|
|
9
|
+
const ARCGIS_WEB_MERCATOR_SCALE_AT_ZOOM_0 = 591657550.5;
|
|
10
|
+
const DECK_GROUND_MPP_AT_ZOOM_0 = 78271.484;
|
|
11
|
+
const METERS_PER_DEG_LAT = 111320;
|
|
12
|
+
const ARCGIS_DIAGONAL_FOV_RADIANS = (55 * Math.PI) / 180;
|
|
13
|
+
const ALTITUDE_BLEND_START_TILT = 65;
|
|
14
|
+
const ALTITUDE_BLEND_END_TILT = 80;
|
|
15
|
+
function getDistanceMeters(a, b) {
|
|
16
|
+
const midLatRad = (((a.latitude + b.latitude) / 2) * Math.PI) / 180;
|
|
17
|
+
const dLatM = (a.latitude - b.latitude) * METERS_PER_DEG_LAT;
|
|
18
|
+
const dLngM = (a.longitude - b.longitude) * METERS_PER_DEG_LAT * Math.cos(midLatRad);
|
|
19
|
+
return Math.sqrt(dLatM * dLatM + dLngM * dLngM);
|
|
12
20
|
}
|
|
13
|
-
|
|
21
|
+
function getZoom(view, longitude, latitude, width, height) {
|
|
22
|
+
const focalPoint = view.toMap({ x: width / 2, y: height / 2 });
|
|
23
|
+
const focalPointRight = view.toMap({ x: width / 2 + 1, y: height / 2 });
|
|
24
|
+
if (focalPoint && focalPointRight) {
|
|
25
|
+
const horizontalMetersPerPixel = getDistanceMeters(focalPoint, focalPointRight);
|
|
26
|
+
if (horizontalMetersPerPixel > 0) {
|
|
27
|
+
const latitudeRad = (latitude * Math.PI) / 180;
|
|
28
|
+
return Math.log2((DECK_GROUND_MPP_AT_ZOOM_0 * Math.cos(latitudeRad)) / horizontalMetersPerPixel);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return Math.log2(ARCGIS_WEB_MERCATOR_SCALE_AT_ZOOM_0 / view.scale) - 1;
|
|
32
|
+
}
|
|
33
|
+
function smoothstep(edge0, edge1, value) {
|
|
34
|
+
const t = Math.max(0, Math.min(1, (value - edge0) / (edge1 - edge0)));
|
|
35
|
+
return t * t * (3 - 2 * t);
|
|
36
|
+
}
|
|
37
|
+
function getFovMatchedAltitude(width, height) {
|
|
38
|
+
const aspect = width / height;
|
|
39
|
+
const verticalTan = Math.tan(ARCGIS_DIAGONAL_FOV_RADIANS / 2) / Math.sqrt(1 + aspect * aspect);
|
|
40
|
+
return 0.5 / verticalTan;
|
|
41
|
+
}
|
|
42
|
+
function getAltitude(tilt, slantAltitude, width, height) {
|
|
43
|
+
const fovAltitude = getFovMatchedAltitude(width, height);
|
|
44
|
+
const blend = smoothstep(ALTITUDE_BLEND_START_TILT, ALTITUDE_BLEND_END_TILT, tilt);
|
|
45
|
+
return slantAltitude * (1 - blend) + fovAltitude * blend;
|
|
46
|
+
}
|
|
47
|
+
function getArcGISMatrixViewState(view, longitude, latitude, zoom, resolution, altitude) {
|
|
48
|
+
return {
|
|
49
|
+
views: new MapView({ id: 'arcgis-scene' }),
|
|
50
|
+
viewState: {
|
|
51
|
+
'arcgis-scene': {
|
|
52
|
+
id: 'arcgis-scene',
|
|
53
|
+
longitude,
|
|
54
|
+
latitude,
|
|
55
|
+
zoom,
|
|
56
|
+
pitch: view.camera.tilt,
|
|
57
|
+
bearing: view.camera.heading,
|
|
58
|
+
altitude,
|
|
59
|
+
position: [0, 0, 0],
|
|
60
|
+
resolution
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export default function createDeckRenderer(DeckProps, RenderNode) {
|
|
14
66
|
class DeckRenderer {
|
|
15
|
-
constructor(
|
|
67
|
+
constructor(viewOrProps, props) {
|
|
16
68
|
this.resources = null;
|
|
17
69
|
this.cancelInitialization = null;
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let cancelled = false;
|
|
24
|
-
this.cancelInitialization = () => (cancelled = true);
|
|
25
|
-
const resources = await initializeResources.call(this, gl);
|
|
26
|
-
// If the renderer got disposed while awaiting, do not proceed
|
|
27
|
-
if (cancelled) {
|
|
28
|
-
finalizeResources(resources);
|
|
29
|
-
return;
|
|
70
|
+
this.renderNode = null;
|
|
71
|
+
if (viewOrProps && typeof viewOrProps === 'object' && 'view' in viewOrProps) {
|
|
72
|
+
const { view, ...deckProps } = viewOrProps;
|
|
73
|
+
this.view = view;
|
|
74
|
+
this.deck = new DeckProps(deckProps);
|
|
30
75
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
76
|
+
else {
|
|
77
|
+
this.view = viewOrProps;
|
|
78
|
+
this.deck = new DeckProps(props);
|
|
79
|
+
}
|
|
80
|
+
let isInitializing = false;
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
82
|
+
const self = this;
|
|
83
|
+
const DeckRenderNode = RenderNode.createSubclass({
|
|
84
|
+
consumes: { required: ['composite-color'] },
|
|
85
|
+
produces: 'composite-color',
|
|
86
|
+
initialize() { },
|
|
87
|
+
render(inputs) {
|
|
88
|
+
// biome-ignore lint/complexity/noThisInStatic: RenderNode render is an instance method
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
|
|
90
|
+
const renderNode = this;
|
|
91
|
+
const passthrough = inputs.find(i => i.name === 'composite-color');
|
|
92
|
+
if (!self.resources && !isInitializing) {
|
|
93
|
+
const gl = renderNode.gl;
|
|
94
|
+
if (gl) {
|
|
95
|
+
isInitializing = true;
|
|
96
|
+
let cancelled = false;
|
|
97
|
+
self.cancelInitialization = () => {
|
|
98
|
+
cancelled = true;
|
|
99
|
+
};
|
|
100
|
+
initializeResources
|
|
101
|
+
.call(self, gl)
|
|
102
|
+
.then(resources => {
|
|
103
|
+
isInitializing = false;
|
|
104
|
+
if (cancelled) {
|
|
105
|
+
finalizeResources(resources);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
self.deck.on('change', deckProps => resources.deck.setProps(deckProps));
|
|
109
|
+
resources.deck.setProps(self.deck.toJSON());
|
|
110
|
+
self.resources = resources;
|
|
111
|
+
renderNode.requestRender();
|
|
112
|
+
})
|
|
113
|
+
.catch(err => {
|
|
114
|
+
isInitializing = false;
|
|
115
|
+
// eslint-disable-next-line no-console
|
|
116
|
+
console.error('DeckRenderer: failed to initialize resources', err);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return passthrough;
|
|
120
|
+
}
|
|
121
|
+
if (!self.resources) {
|
|
122
|
+
return passthrough;
|
|
123
|
+
}
|
|
124
|
+
const output = renderNode.bindRenderTarget();
|
|
125
|
+
const gl = renderNode.gl;
|
|
126
|
+
const dpr = window.devicePixelRatio || 1;
|
|
127
|
+
const width = gl.drawingBufferWidth / dpr;
|
|
128
|
+
const height = gl.drawingBufferHeight / dpr;
|
|
129
|
+
// Keep deck.gl's SceneView approximation anchored at the ArcGIS
|
|
130
|
+
// focal point every frame. Zoom comes from the actual horizontal
|
|
131
|
+
// ground meters-per-pixel at screen center (`toMap(center)` and
|
|
132
|
+
// `toMap(center + 1px)`), which stays stable under tilt in local
|
|
133
|
+
// SceneView. We keep the older `view.scale` formula only as a
|
|
134
|
+
// fallback when focal-point sampling is unavailable.
|
|
135
|
+
//
|
|
136
|
+
// deck.gl's `altitude` still couples camera distance and FOV, while
|
|
137
|
+
// ArcGIS keeps them separate. We therefore compute a slant-distance
|
|
138
|
+
// altitude from the live camera position and focal point, then only
|
|
139
|
+
// at high tilt blend toward the ArcGIS fixed-FOV altitude. That
|
|
140
|
+
// preserves the better mid-tilt camera match while reducing the
|
|
141
|
+
// remaining extreme-angle drift.
|
|
142
|
+
const cameraPos = self.view.camera.position;
|
|
143
|
+
const focalPoint = self.view.toMap({ x: width / 2, y: height / 2 });
|
|
144
|
+
const latitude = focalPoint ? focalPoint.latitude : self.view.center.latitude;
|
|
145
|
+
const longitude = focalPoint ? focalPoint.longitude : self.view.center.longitude;
|
|
146
|
+
const midLatRad = (((latitude + cameraPos.latitude) / 2) * Math.PI) / 180;
|
|
147
|
+
const dLatM = (cameraPos.latitude - latitude) * METERS_PER_DEG_LAT;
|
|
148
|
+
const dLngM = (cameraPos.longitude - longitude) * METERS_PER_DEG_LAT * Math.cos(midLatRad);
|
|
149
|
+
const horizM = Math.sqrt(dLatM * dLatM + dLngM * dLngM);
|
|
150
|
+
const slantM = Math.sqrt(horizM * horizM + cameraPos.z * cameraPos.z);
|
|
151
|
+
const zoom = getZoom(self.view, longitude, latitude, width, height);
|
|
152
|
+
const viewportHeightM = height * self.view.resolution;
|
|
153
|
+
const slantAltitude = slantM / viewportHeightM;
|
|
154
|
+
const altitude = getAltitude(self.view.camera.tilt, slantAltitude, width, height);
|
|
155
|
+
const arcgisMatrixView = getArcGISMatrixViewState(self.view, longitude, latitude, zoom, self.view.resolution, altitude);
|
|
156
|
+
try {
|
|
157
|
+
if (arcgisMatrixView) {
|
|
158
|
+
render(self.resources, {
|
|
159
|
+
width,
|
|
160
|
+
height,
|
|
161
|
+
latitude,
|
|
162
|
+
longitude,
|
|
163
|
+
altitude,
|
|
164
|
+
zoom,
|
|
165
|
+
bearing: self.view.camera.heading,
|
|
166
|
+
pitch: self.view.camera.tilt,
|
|
167
|
+
...arcgisMatrixView
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
render(self.resources, {
|
|
172
|
+
width,
|
|
173
|
+
height,
|
|
174
|
+
latitude,
|
|
175
|
+
longitude,
|
|
176
|
+
altitude,
|
|
177
|
+
zoom,
|
|
178
|
+
bearing: self.view.camera.heading,
|
|
179
|
+
pitch: self.view.camera.tilt
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (e) {
|
|
184
|
+
// eslint-disable-next-line no-console
|
|
185
|
+
console.error('DeckRenderer: render error', e);
|
|
186
|
+
}
|
|
187
|
+
return output;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
this.renderNode = new DeckRenderNode({ view: this.view });
|
|
34
191
|
}
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
193
|
+
async setup(_context) { }
|
|
35
194
|
dispose() {
|
|
36
195
|
this.cancelInitialization?.();
|
|
37
196
|
if (this.resources) {
|
|
38
197
|
finalizeResources(this.resources);
|
|
198
|
+
this.resources = null;
|
|
39
199
|
}
|
|
200
|
+
this.renderNode = null;
|
|
40
201
|
}
|
|
41
202
|
redraw() {
|
|
42
|
-
|
|
203
|
+
this.renderNode?.requestRender();
|
|
43
204
|
}
|
|
44
205
|
render() {
|
|
45
|
-
|
|
46
|
-
render(this.resources, {
|
|
47
|
-
width,
|
|
48
|
-
height,
|
|
49
|
-
latitude: this.view.center.latitude,
|
|
50
|
-
longitude: this.view.center.longitude,
|
|
51
|
-
altitude: arcgisFOVToDeckAltitude(this.view.camera.fov, width / height),
|
|
52
|
-
zoom: this.view.zoom,
|
|
53
|
-
bearing: this.view.camera.heading,
|
|
54
|
-
pitch: this.view.camera.tilt
|
|
55
|
-
});
|
|
206
|
+
this.renderNode?.requestRender();
|
|
56
207
|
}
|
|
57
208
|
}
|
|
58
209
|
return DeckRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deck-renderer.js","sourceRoot":"","sources":["../src/deck-renderer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,oCAAoC;AACpC,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,EAAkB,qBAAkB;
|
|
1
|
+
{"version":3,"file":"deck-renderer.js","sourceRoot":"","sources":["../src/deck-renderer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,oCAAoC;AACpC,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,EAAkB,qBAAkB;AAI1F,OAAO,OAAO,yCAAsC;AAEpD,4EAA4E;AAC5E,sCAAsC;AACtC,MAAM,mCAAmC,GAAG,WAAW,CAAC;AACxD,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAC5C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,2BAA2B,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACzD,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,SAAS,iBAAiB,CAAC,CAAC,EAAE,CAAC;IAC7B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