@luma.gl/engine 9.3.5 → 9.4.0-alpha.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/animation/animator.d.ts +42 -0
- package/dist/animation/animator.d.ts.map +1 -0
- package/dist/animation/animator.js +53 -0
- package/dist/animation/animator.js.map +1 -0
- package/dist/animation-loop/animation-loop.d.ts +14 -2
- package/dist/animation-loop/animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/animation-loop.js +40 -22
- package/dist/animation-loop/animation-loop.js.map +1 -1
- package/dist/animation-loop/animation-props.d.ts +2 -0
- package/dist/animation-loop/animation-props.d.ts.map +1 -1
- package/dist/animation-loop/make-animation-loop.d.ts +1 -0
- package/dist/animation-loop/make-animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/make-animation-loop.js +3 -0
- package/dist/animation-loop/make-animation-loop.js.map +1 -1
- package/dist/application-utils/load-file.d.ts +2 -0
- package/dist/application-utils/load-file.d.ts.map +1 -1
- package/dist/application-utils/load-file.js +31 -5
- package/dist/application-utils/load-file.js.map +1 -1
- package/dist/compute/buffer-transform.d.ts +5 -1
- package/dist/compute/buffer-transform.d.ts.map +1 -1
- package/dist/compute/buffer-transform.js +7 -3
- package/dist/compute/buffer-transform.js.map +1 -1
- package/dist/compute/computation.d.ts +20 -8
- package/dist/compute/computation.d.ts.map +1 -1
- package/dist/compute/computation.js +34 -13
- package/dist/compute/computation.js.map +1 -1
- package/dist/compute/swap.d.ts.map +1 -1
- package/dist/compute/swap.js +17 -0
- package/dist/compute/swap.js.map +1 -1
- package/dist/dist.dev.js +4100 -1979
- package/dist/dist.min.js +288 -42
- package/dist/dynamic-buffer/dynamic-buffer.d.ts +171 -0
- package/dist/dynamic-buffer/dynamic-buffer.d.ts.map +1 -0
- package/dist/dynamic-buffer/dynamic-buffer.js +316 -0
- package/dist/dynamic-buffer/dynamic-buffer.js.map +1 -0
- package/dist/dynamic-texture/dynamic-texture.d.ts +14 -1
- package/dist/dynamic-texture/dynamic-texture.d.ts.map +1 -1
- package/dist/dynamic-texture/dynamic-texture.js +31 -2
- package/dist/dynamic-texture/dynamic-texture.js.map +1 -1
- package/dist/dynamic-texture/texture-binding-source.d.ts +55 -0
- package/dist/dynamic-texture/texture-binding-source.d.ts.map +1 -0
- package/dist/dynamic-texture/texture-binding-source.js +55 -0
- package/dist/dynamic-texture/texture-binding-source.js.map +1 -0
- package/dist/dynamic-texture/texture-data.d.ts +5 -3
- package/dist/dynamic-texture/texture-data.d.ts.map +1 -1
- package/dist/dynamic-texture/texture-data.js +5 -0
- package/dist/dynamic-texture/texture-data.js.map +1 -1
- package/dist/dynamic-texture/video-texture.d.ts +101 -0
- package/dist/dynamic-texture/video-texture.d.ts.map +1 -0
- package/dist/dynamic-texture/video-texture.js +272 -0
- package/dist/dynamic-texture/video-texture.js.map +1 -0
- package/dist/geometries/cube-geometry.d.ts +1 -0
- package/dist/geometries/cube-geometry.d.ts.map +1 -1
- package/dist/geometries/cube-geometry.js +22 -2
- package/dist/geometries/cube-geometry.js.map +1 -1
- package/dist/geometries/plane-geometry.d.ts +10 -0
- package/dist/geometries/plane-geometry.d.ts.map +1 -1
- package/dist/geometries/plane-geometry.js.map +1 -1
- package/dist/geometry/geometry-utils.d.ts +36 -1
- package/dist/geometry/geometry-utils.d.ts.map +1 -1
- package/dist/geometry/geometry-utils.js +137 -2
- package/dist/geometry/geometry-utils.js.map +1 -1
- package/dist/geometry/geometry.d.ts +52 -33
- package/dist/geometry/geometry.d.ts.map +1 -1
- package/dist/geometry/geometry.js +70 -19
- package/dist/geometry/geometry.js.map +1 -1
- package/dist/geometry/gpu-geometry.d.ts +37 -4
- package/dist/geometry/gpu-geometry.d.ts.map +1 -1
- package/dist/geometry/gpu-geometry.js +44 -36
- package/dist/geometry/gpu-geometry.js.map +1 -1
- package/dist/index.cjs +3990 -1961
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +20 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/material/material-factory.d.ts +2 -1
- package/dist/material/material-factory.d.ts.map +1 -1
- package/dist/material/material-factory.js.map +1 -1
- package/dist/material/material.d.ts +29 -10
- package/dist/material/material.d.ts.map +1 -1
- package/dist/material/material.js +84 -21
- package/dist/material/material.js.map +1 -1
- package/dist/model/model.d.ts +81 -23
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +312 -78
- package/dist/model/model.js.map +1 -1
- package/dist/model/split-uniforms-and-bindings.d.ts +5 -2
- package/dist/model/split-uniforms-and-bindings.d.ts.map +1 -1
- package/dist/model/split-uniforms-and-bindings.js.map +1 -1
- package/dist/models/billboard-texture-model.d.ts +5 -2
- package/dist/models/billboard-texture-model.d.ts.map +1 -1
- package/dist/models/billboard-texture-model.js +28 -10
- package/dist/models/billboard-texture-model.js.map +1 -1
- package/dist/modules/picking/index-color-picking.d.ts +24 -0
- package/dist/modules/picking/index-color-picking.d.ts.map +1 -0
- package/dist/modules/picking/index-color-picking.js +205 -0
- package/dist/modules/picking/index-color-picking.js.map +1 -0
- package/dist/modules/picking/index-picking.d.ts +3 -3
- package/dist/modules/picking/index-picking.d.ts.map +1 -1
- package/dist/modules/picking/index-picking.js +23 -6
- package/dist/modules/picking/index-picking.js.map +1 -1
- package/dist/modules/picking/picking-manager.d.ts +21 -0
- package/dist/modules/picking/picking-manager.d.ts.map +1 -1
- package/dist/modules/picking/picking-manager.js +100 -0
- package/dist/modules/picking/picking-manager.js.map +1 -1
- package/dist/modules/picking/picking-uniforms.d.ts +4 -4
- package/dist/modules/picking/picking-uniforms.d.ts.map +1 -1
- package/dist/modules/picking/picking-uniforms.js +3 -0
- package/dist/modules/picking/picking-uniforms.js.map +1 -1
- package/dist/modules/picking/picking.d.ts +5 -1
- package/dist/modules/picking/picking.d.ts.map +1 -1
- package/dist/modules/picking/picking.js +6 -0
- package/dist/modules/picking/picking.js.map +1 -1
- package/dist/passes/get-fragment-shader.js +4 -4
- package/dist/passes/shader-pass-renderer.d.ts +92 -25
- package/dist/passes/shader-pass-renderer.d.ts.map +1 -1
- package/dist/passes/shader-pass-renderer.js +466 -72
- package/dist/passes/shader-pass-renderer.js.map +1 -1
- package/dist/passes/texture-transform-module.d.ts +10 -0
- package/dist/passes/texture-transform-module.d.ts.map +1 -0
- package/dist/passes/texture-transform-module.js +50 -0
- package/dist/passes/texture-transform-module.js.map +1 -0
- package/dist/shader-inputs.d.ts +33 -16
- package/dist/shader-inputs.d.ts.map +1 -1
- package/dist/shader-inputs.js +42 -12
- package/dist/shader-inputs.js.map +1 -1
- package/dist/utils/buffer-layout-helper.d.ts +0 -1
- package/dist/utils/buffer-layout-helper.d.ts.map +1 -1
- package/dist/utils/buffer-layout-helper.js +2 -11
- package/dist/utils/buffer-layout-helper.js.map +1 -1
- package/dist/utils/buffer-layout-order.d.ts.map +1 -1
- package/dist/utils/buffer-layout-order.js +4 -15
- package/dist/utils/buffer-layout-order.js.map +1 -1
- package/dist/utils/shader-module-utils.d.ts +2 -0
- package/dist/utils/shader-module-utils.d.ts.map +1 -1
- package/dist/utils/shader-module-utils.js +64 -3
- package/dist/utils/shader-module-utils.js.map +1 -1
- package/package.json +2 -2
- package/src/animation/animator.ts +79 -0
- package/src/animation-loop/animation-loop.ts +56 -22
- package/src/animation-loop/animation-props.ts +2 -0
- package/src/animation-loop/make-animation-loop.ts +4 -0
- package/src/application-utils/load-file.ts +38 -5
- package/src/compute/buffer-transform.ts +14 -5
- package/src/compute/computation.ts +53 -21
- package/src/compute/swap.ts +19 -0
- package/src/dynamic-buffer/dynamic-buffer.ts +453 -0
- package/src/dynamic-texture/dynamic-texture.ts +36 -3
- package/src/dynamic-texture/texture-binding-source.ts +94 -0
- package/src/dynamic-texture/texture-data.ts +12 -4
- package/src/dynamic-texture/video-texture.ts +334 -0
- package/src/geometries/cube-geometry.ts +24 -2
- package/src/geometries/plane-geometry.ts +10 -0
- package/src/geometry/geometry-utils.ts +209 -4
- package/src/geometry/geometry.ts +113 -36
- package/src/geometry/gpu-geometry.ts +61 -41
- package/src/index.ts +50 -14
- package/src/material/material-factory.ts +5 -1
- package/src/material/material.ts +123 -27
- package/src/model/model.ts +441 -102
- package/src/model/split-uniforms-and-bindings.ts +7 -3
- package/src/models/billboard-texture-model.ts +33 -12
- package/src/modules/picking/index-color-picking.ts +212 -0
- package/src/modules/picking/index-picking.ts +23 -6
- package/src/modules/picking/picking-manager.ts +141 -0
- package/src/modules/picking/picking-uniforms.ts +7 -4
- package/src/modules/picking/picking.ts +8 -0
- package/src/passes/get-fragment-shader.ts +4 -4
- package/src/passes/shader-pass-renderer.ts +691 -89
- package/src/passes/texture-transform-module.ts +52 -0
- package/src/shader-inputs.ts +65 -17
- package/src/utils/buffer-layout-helper.ts +2 -14
- package/src/utils/buffer-layout-order.ts +14 -24
- package/src/utils/shader-module-utils.ts +109 -3
- package/dist/geometry/gpu-table.d.ts +0 -1
- package/dist/geometry/gpu-table.d.ts.map +0 -1
- package/dist/geometry/gpu-table.js +0 -46
- package/dist/geometry/gpu-table.js.map +0 -1
- package/src/dynamic-texture/texture-data.ts.disabled +0 -296
- package/src/geometry/gpu-table.ts +0 -45
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-utils.js","sourceRoot":"","sources":["../../src/geometry/geometry-utils.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"geometry-utils.js","sourceRoot":"","sources":["../../src/geometry/geometry-utils.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAElD,OAAO,EAAC,QAAQ,EAAE,8BAA8B,EAAyB,sBAAmB;AAuC5F;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAyB,QAAW;IACvE,MAAM,EAAC,OAAO,EAAE,UAAU,EAAC,GAAG,QAAQ,C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D,CAAC;AAED,gFAAgF;AAChF,wDAAwD;AAExD,iDAAiD;AACjD,yEAAyE;AACzE,kEAAkE;AAClE,kEAAkE;AAElE,gEAAgE;AAChE,qCAAqC;AACrC,yCAAyC;AACzC,qCAAqC;AACrC,MAAM;AACN,8DAA8D;AAC9D,IAAI"}
|
|
@@ -1,63 +1,82 @@
|
|
|
1
1
|
import type { TypedArray } from '@math.gl/core';
|
|
2
|
-
import type { PrimitiveTopology } from '@luma.gl/core';
|
|
2
|
+
import type { BufferLayout, PrimitiveTopology } from '@luma.gl/core';
|
|
3
|
+
/** CPU-side attribute data accepted by {@link Geometry}. */
|
|
4
|
+
export type GeometryAttributeInput = GeometryAttribute | TypedArray;
|
|
5
|
+
/** Properties used to create a {@link Geometry}. */
|
|
3
6
|
export type GeometryProps = {
|
|
7
|
+
/** Application-provided identifier. */
|
|
4
8
|
id?: string;
|
|
5
|
-
/** Determines how vertices are
|
|
9
|
+
/** Determines how vertices are assembled into primitives. */
|
|
6
10
|
topology: 'point-list' | 'line-list' | 'line-strip' | 'triangle-list' | 'triangle-strip';
|
|
7
|
-
/** Auto
|
|
11
|
+
/** Draw vertex count. Auto-calculated from attributes or indices when omitted. */
|
|
8
12
|
vertexCount?: number;
|
|
9
|
-
attributes
|
|
13
|
+
/** CPU attributes, keyed by caller-provided names such as glTF mesh attribute semantics. */
|
|
14
|
+
attributes: Record<string, GeometryAttributeInput>;
|
|
15
|
+
/**
|
|
16
|
+
* Maps geometry buffers to shader attributes.
|
|
17
|
+
*
|
|
18
|
+
* If omitted, the constructor creates one shader-facing buffer layout entry for each attribute.
|
|
19
|
+
* Explicit buffer layouts are preserved unchanged.
|
|
20
|
+
*/
|
|
21
|
+
bufferLayout?: BufferLayout[];
|
|
22
|
+
/** Optional index data. Indices are always stored separately from vertex attributes. */
|
|
10
23
|
indices?: GeometryAttribute | TypedArray;
|
|
11
24
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
TEXCOORD_0: GeometryAttribute;
|
|
16
|
-
COLOR_0?: GeometryAttribute;
|
|
25
|
+
/** Attributes returned by {@link Geometry.getAttributes}. */
|
|
26
|
+
export type GeometryAttributes = Record<string, GeometryAttribute | undefined> & {
|
|
27
|
+
/** Optional index attribute, included when the geometry is indexed. */
|
|
17
28
|
indices?: GeometryAttribute & {
|
|
18
29
|
size: 1;
|
|
19
30
|
value: Uint32Array | Uint16Array;
|
|
20
31
|
};
|
|
21
32
|
};
|
|
33
|
+
/** Typed-array backed CPU geometry attribute. */
|
|
22
34
|
export type GeometryAttribute = {
|
|
35
|
+
/** Number of typed-array elements per vertex. */
|
|
23
36
|
size?: number;
|
|
37
|
+
/** Attribute data. */
|
|
24
38
|
value: TypedArray;
|
|
39
|
+
/** Additional attribute metadata consumed by geometry utilities. */
|
|
25
40
|
[key: string]: any;
|
|
26
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* CPU-side geometry container.
|
|
44
|
+
*
|
|
45
|
+
* `Geometry` stores typed-array vertex data, optional index data, and an always-populated
|
|
46
|
+
* `bufferLayout` that describes how its attributes map to shader inputs. CPU attribute names are
|
|
47
|
+
* preserved as supplied; synthesized buffer layouts map supported glTF-style names such as
|
|
48
|
+
* `POSITION` and `TEXCOORD_0` to default shader names such as `positions` and `texCoords`.
|
|
49
|
+
*/
|
|
27
50
|
export declare class Geometry {
|
|
51
|
+
/** Application-provided or generated identifier. */
|
|
28
52
|
readonly id: string;
|
|
29
|
-
/** Determines how vertices are
|
|
53
|
+
/** Determines how vertices are assembled into primitives. */
|
|
30
54
|
readonly topology?: PrimitiveTopology;
|
|
55
|
+
/** Resolved draw vertex count. */
|
|
31
56
|
readonly vertexCount: number;
|
|
57
|
+
/** Optional index attribute. */
|
|
32
58
|
readonly indices?: GeometryAttribute;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[key: string]: GeometryAttribute | undefined;
|
|
39
|
-
};
|
|
59
|
+
/** CPU attributes, keyed by caller-provided source attribute name. */
|
|
60
|
+
readonly attributes: Record<string, GeometryAttribute | undefined>;
|
|
61
|
+
/** Buffer layout matching the geometry attributes. Always populated. */
|
|
62
|
+
readonly bufferLayout: BufferLayout[];
|
|
63
|
+
/** Application-owned metadata. */
|
|
40
64
|
userData: Record<string, unknown>;
|
|
65
|
+
/** Creates a CPU geometry and wraps raw typed arrays into attribute records. */
|
|
41
66
|
constructor(props: GeometryProps);
|
|
67
|
+
/** Returns the resolved draw vertex count. */
|
|
42
68
|
getVertexCount(): number;
|
|
43
|
-
/**
|
|
44
|
-
* Return an object with all attributes plus indices added as a field.
|
|
45
|
-
* TODO Geometry types are a mess
|
|
46
|
-
*/
|
|
69
|
+
/** Returns all attributes, including `indices` when index data is present. */
|
|
47
70
|
getAttributes(): GeometryAttributes;
|
|
48
71
|
_print(attributeName: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* GeometryAttribute
|
|
51
|
-
* value: typed array
|
|
52
|
-
* type: indices, vertices, uvs
|
|
53
|
-
* size: elements per vertex
|
|
54
|
-
* target: WebGL buffer type (string or constant)
|
|
55
|
-
*
|
|
56
|
-
* @param attributes
|
|
57
|
-
* @param indices
|
|
58
|
-
* @returns
|
|
59
|
-
*/
|
|
60
72
|
_setAttributes(attributes: Record<string, GeometryAttribute>, indices: any): this;
|
|
61
|
-
_calculateVertexCount(attributes:
|
|
73
|
+
_calculateVertexCount(attributes: Record<string, GeometryAttribute | undefined>, indices?: GeometryAttribute): number;
|
|
62
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Converts supported geometry semantic names to default shader attribute names.
|
|
77
|
+
*
|
|
78
|
+
* Use this only at render-layout boundaries. CPU `Geometry.attributes` preserves source names.
|
|
79
|
+
* Names that do not have a built-in mapping are returned unchanged.
|
|
80
|
+
*/
|
|
81
|
+
export declare function getGeometryShaderAttributeName(attributeName: string): string;
|
|
63
82
|
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/geometry/geometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/geometry/geometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAInE,4DAA4D;AAC5D,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,UAAU,CAAC;AAEpE,oDAAoD;AACpD,MAAM,MAAM,aAAa,GAAG;IAC1B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,QAAQ,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,gBAAgB,CAAC;IACzF,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACnD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,wFAAwF;IACxF,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAAC;CAC1C,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC,GAAG;IAC/E,uEAAuE;IACvE,OAAO,CAAC,EAAE,iBAAiB,GAAG;QAAC,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAA;KAAC,CAAC;CAC3E,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,iBAAiB,GAAG;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|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { vertexFormatDecoder } from '@luma.gl/core';
|
|
4
5
|
import { uid } from "../utils/uid.js";
|
|
6
|
+
/**
|
|
7
|
+
* CPU-side geometry container.
|
|
8
|
+
*
|
|
9
|
+
* `Geometry` stores typed-array vertex data, optional index data, and an always-populated
|
|
10
|
+
* `bufferLayout` that describes how its attributes map to shader inputs. CPU attribute names are
|
|
11
|
+
* preserved as supplied; synthesized buffer layouts map supported glTF-style names such as
|
|
12
|
+
* `POSITION` and `TEXCOORD_0` to default shader names such as `positions` and `texCoords`.
|
|
13
|
+
*/
|
|
5
14
|
export class Geometry {
|
|
15
|
+
/** Application-provided or generated identifier. */
|
|
6
16
|
id;
|
|
7
|
-
/** Determines how vertices are
|
|
17
|
+
/** Determines how vertices are assembled into primitives. */
|
|
8
18
|
topology;
|
|
19
|
+
/** Resolved draw vertex count. */
|
|
9
20
|
vertexCount;
|
|
21
|
+
/** Optional index attribute. */
|
|
10
22
|
indices;
|
|
23
|
+
/** CPU attributes, keyed by caller-provided source attribute name. */
|
|
11
24
|
attributes;
|
|
25
|
+
/** Buffer layout matching the geometry attributes. Always populated. */
|
|
26
|
+
bufferLayout;
|
|
27
|
+
/** Application-owned metadata. */
|
|
12
28
|
userData = {};
|
|
29
|
+
/** Creates a CPU geometry and wraps raw typed arrays into attribute records. */
|
|
13
30
|
constructor(props) {
|
|
14
31
|
const { attributes = {}, indices = null, vertexCount = null } = props;
|
|
15
32
|
this.id = props.id || uid('geometry');
|
|
@@ -17,7 +34,6 @@ export class Geometry {
|
|
|
17
34
|
if (indices) {
|
|
18
35
|
this.indices = ArrayBuffer.isView(indices) ? { value: indices, size: 1 } : indices;
|
|
19
36
|
}
|
|
20
|
-
// @ts-expect-error
|
|
21
37
|
this.attributes = {};
|
|
22
38
|
for (const [attributeName, attributeValue] of Object.entries(attributes)) {
|
|
23
39
|
// Wrap "unwrapped" arrays and try to autodetect their type
|
|
@@ -38,6 +54,11 @@ export class Geometry {
|
|
|
38
54
|
this.indices = attribute;
|
|
39
55
|
}
|
|
40
56
|
else {
|
|
57
|
+
const shaderAttributeName = getGeometryShaderAttributeName(attributeName);
|
|
58
|
+
const storedAttributeName = Object.keys(this.attributes).find(name => getGeometryShaderAttributeName(name) === shaderAttributeName);
|
|
59
|
+
if (storedAttributeName) {
|
|
60
|
+
delete this.attributes[storedAttributeName];
|
|
61
|
+
}
|
|
41
62
|
this.attributes[attributeName] = attribute;
|
|
42
63
|
}
|
|
43
64
|
}
|
|
@@ -46,33 +67,21 @@ export class Geometry {
|
|
|
46
67
|
delete this.indices['isIndexed'];
|
|
47
68
|
}
|
|
48
69
|
this.vertexCount = vertexCount || this._calculateVertexCount(this.attributes, this.indices);
|
|
70
|
+
this.bufferLayout =
|
|
71
|
+
props.bufferLayout || getBufferLayoutFromGeometryAttributes(this.attributes);
|
|
49
72
|
}
|
|
73
|
+
/** Returns the resolved draw vertex count. */
|
|
50
74
|
getVertexCount() {
|
|
51
75
|
return this.vertexCount;
|
|
52
76
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Return an object with all attributes plus indices added as a field.
|
|
55
|
-
* TODO Geometry types are a mess
|
|
56
|
-
*/
|
|
77
|
+
/** Returns all attributes, including `indices` when index data is present. */
|
|
57
78
|
getAttributes() {
|
|
58
|
-
|
|
59
|
-
return this.indices ? { indices: this.indices, ...this.attributes } : this.attributes;
|
|
79
|
+
return (this.indices ? { indices: this.indices, ...this.attributes } : this.attributes);
|
|
60
80
|
}
|
|
61
81
|
// PRIVATE
|
|
62
82
|
_print(attributeName) {
|
|
63
83
|
return `Geometry ${this.id} attribute ${attributeName}`;
|
|
64
84
|
}
|
|
65
|
-
/**
|
|
66
|
-
* GeometryAttribute
|
|
67
|
-
* value: typed array
|
|
68
|
-
* type: indices, vertices, uvs
|
|
69
|
-
* size: elements per vertex
|
|
70
|
-
* target: WebGL buffer type (string or constant)
|
|
71
|
-
*
|
|
72
|
-
* @param attributes
|
|
73
|
-
* @param indices
|
|
74
|
-
* @returns
|
|
75
|
-
*/
|
|
76
85
|
_setAttributes(attributes, indices) {
|
|
77
86
|
return this;
|
|
78
87
|
}
|
|
@@ -82,6 +91,9 @@ export class Geometry {
|
|
|
82
91
|
}
|
|
83
92
|
let vertexCount = Infinity;
|
|
84
93
|
for (const attribute of Object.values(attributes)) {
|
|
94
|
+
if (!attribute) {
|
|
95
|
+
continue; // eslint-disable-line no-continue
|
|
96
|
+
}
|
|
85
97
|
const { value, size, constant } = attribute;
|
|
86
98
|
if (!constant && value && size !== undefined && size >= 1) {
|
|
87
99
|
vertexCount = Math.min(vertexCount, value.length / size);
|
|
@@ -91,4 +103,43 @@ export class Geometry {
|
|
|
91
103
|
return vertexCount;
|
|
92
104
|
}
|
|
93
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Converts supported geometry semantic names to default shader attribute names.
|
|
108
|
+
*
|
|
109
|
+
* Use this only at render-layout boundaries. CPU `Geometry.attributes` preserves source names.
|
|
110
|
+
* Names that do not have a built-in mapping are returned unchanged.
|
|
111
|
+
*/
|
|
112
|
+
export function getGeometryShaderAttributeName(attributeName) {
|
|
113
|
+
switch (attributeName) {
|
|
114
|
+
case 'POSITION':
|
|
115
|
+
return 'positions';
|
|
116
|
+
case 'NORMAL':
|
|
117
|
+
return 'normals';
|
|
118
|
+
case 'TEXCOORD_0':
|
|
119
|
+
return 'texCoords';
|
|
120
|
+
case 'TEXCOORD_1':
|
|
121
|
+
return 'texCoords1';
|
|
122
|
+
case 'COLOR_0':
|
|
123
|
+
return 'colors';
|
|
124
|
+
default:
|
|
125
|
+
return attributeName;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function getBufferLayoutFromGeometryAttributes(attributes) {
|
|
129
|
+
const bufferLayout = [];
|
|
130
|
+
for (const [attributeName, attribute] of Object.entries(attributes)) {
|
|
131
|
+
if (!attribute) {
|
|
132
|
+
continue; // eslint-disable-line no-continue
|
|
133
|
+
}
|
|
134
|
+
const { value, size, normalized } = attribute;
|
|
135
|
+
if (size === undefined) {
|
|
136
|
+
throw new Error(`Attribute ${attributeName} is missing a size`);
|
|
137
|
+
}
|
|
138
|
+
bufferLayout.push({
|
|
139
|
+
name: getGeometryShaderAttributeName(attributeName),
|
|
140
|
+
format: vertexFormatDecoder.getVertexFormatFromAttribute(value, size, normalized)
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return bufferLayout;
|
|
144
|
+
}
|
|
94
145
|
//# sourceMappingURL=geometry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../src/geometry/geometry.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,GAAG,EAAC,wBAAqB;
|
|
1
|
+
{"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../src/geometry/geometry.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,GAAG,EAAC,wBAAqB;AA0CjC;;;;;;;GAOG;AACH,MAAM,OAAO,QAAQ;IACnB,oDAAoD;IAC3C,EAAE,CAAS;IAEpB,6DAA6D;IACpD,QAAQ,CAAqB;IAEtC,kCAAkC;IACzB,WAAW,CAAS;IAE7B,gCAAgC;IACvB,OAAO,CAAqB;IAErC,sEAAsE;IAC7D,UAAU,CAAgD;IAEnE,wEAAwE;IAC/D,YAAY,CAAiB;IAEtC,kCAAkC;IAClC,QAAQ,GAA4B,EAAE,CAAC;IAEvC,gFAAgF;IAChF,YAAY,KAAoB;QAC9B,MAAM,EAAC,UAAU,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;QAEpE,IAAI,CAAC,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K,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACpE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,SAAS,CAAC,kCAAkC;QAC9C,CAAC;QACD,MAAM,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,SAAS,CAAC;QAC5C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,aAAa,aAAa,oBAAoB,CAAC,CAAC;QAClE,CAAC;QACD,YAAY,CAAC,IAAI,CAAC;YAChB,IAAI,EAAE,8BAA8B,CAAC,aAAa,CAAC;YACnD,MAAM,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC;SAClF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,34 +1,67 @@
|
|
|
1
1
|
import type { PrimitiveTopology, BufferLayout } from '@luma.gl/core';
|
|
2
2
|
import { Device, Buffer } from '@luma.gl/core';
|
|
3
|
-
import type
|
|
3
|
+
import { type Geometry } from "../geometry/geometry.js";
|
|
4
|
+
/** Properties used to create a {@link GPUGeometry}. */
|
|
4
5
|
export type GPUGeometryProps = {
|
|
6
|
+
/** Application-provided identifier. */
|
|
5
7
|
id?: string;
|
|
6
|
-
/** Determines how vertices are
|
|
8
|
+
/** Determines how vertices are assembled into primitives. */
|
|
7
9
|
topology: 'point-list' | 'line-list' | 'line-strip' | 'triangle-list' | 'triangle-strip';
|
|
8
|
-
/**
|
|
10
|
+
/** Draw vertex count. */
|
|
9
11
|
vertexCount: number;
|
|
12
|
+
/** Buffer layout matching the supplied GPU vertex buffers. */
|
|
10
13
|
bufferLayout: BufferLayout[];
|
|
14
|
+
/** Optional GPU index buffer. */
|
|
11
15
|
indices?: Buffer | null;
|
|
16
|
+
/** GPU vertex buffers, keyed by buffer layout name. */
|
|
12
17
|
attributes: Record<string, Buffer>;
|
|
13
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* GPU-backed geometry container.
|
|
21
|
+
*
|
|
22
|
+
* `GPUGeometry` owns already-created vertex and index buffers plus the `bufferLayout` metadata
|
|
23
|
+
* needed to bind those buffers to shader attributes.
|
|
24
|
+
*/
|
|
14
25
|
export declare class GPUGeometry {
|
|
26
|
+
/** Application-provided or generated identifier. */
|
|
15
27
|
readonly id: string;
|
|
28
|
+
/** Application-owned metadata. */
|
|
16
29
|
userData: Record<string, unknown>;
|
|
17
|
-
/** Determines how vertices are
|
|
30
|
+
/** Determines how vertices are assembled into primitives. */
|
|
18
31
|
readonly topology?: PrimitiveTopology;
|
|
32
|
+
/** Buffer layout matching {@link GPUGeometry.attributes}. */
|
|
19
33
|
readonly bufferLayout: BufferLayout[];
|
|
34
|
+
/** Resolved draw vertex count. */
|
|
20
35
|
readonly vertexCount: number;
|
|
36
|
+
/** Optional GPU index buffer. */
|
|
21
37
|
readonly indices?: Buffer | null;
|
|
38
|
+
/** GPU vertex buffers, keyed by buffer layout name. */
|
|
22
39
|
readonly attributes: Record<string, Buffer>;
|
|
40
|
+
/** Creates GPU-backed geometry from existing buffers. */
|
|
23
41
|
constructor(props: GPUGeometryProps);
|
|
42
|
+
/** Destroys the owned index and vertex buffers. */
|
|
24
43
|
destroy(): void;
|
|
44
|
+
/** Returns the draw vertex count. */
|
|
25
45
|
getVertexCount(): number;
|
|
46
|
+
/** Returns the GPU vertex buffers. */
|
|
26
47
|
getAttributes(): Record<string, Buffer>;
|
|
48
|
+
/** Returns the GPU index buffer, or `null` for non-indexed geometry. */
|
|
27
49
|
getIndexes(): Buffer | null;
|
|
28
50
|
_calculateVertexCount(positions: Buffer): number;
|
|
29
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Converts CPU geometry into GPU geometry.
|
|
54
|
+
*
|
|
55
|
+
* CPU `Geometry` input is interleaved before upload so the resulting `GPUGeometry` has one vertex
|
|
56
|
+
* buffer plus an optional index buffer. Passing a `GPUGeometry` returns the original instance.
|
|
57
|
+
*/
|
|
30
58
|
export declare function makeGPUGeometry(device: Device, geometry: Geometry | GPUGeometry): GPUGeometry;
|
|
59
|
+
/** Creates a GPU index buffer from CPU geometry index data, when present. */
|
|
31
60
|
export declare function getIndexBufferFromGeometry(device: Device, geometry: Geometry): Buffer | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Uploads one GPU vertex buffer for each CPU geometry attribute key and preserves its buffer
|
|
63
|
+
* layout metadata.
|
|
64
|
+
*/
|
|
32
65
|
export declare function getAttributeBuffersFromGeometry(device: Device, geometry: Geometry): {
|
|
33
66
|
attributes: Record<string, Buffer>;
|
|
34
67
|
bufferLayout: BufferLayout[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-geometry.d.ts","sourceRoot":"","sources":["../../src/geometry/gpu-geometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"gpu-geometry.d.ts","sourceRoot":"","sources":["../../src/geometry/gpu-geometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,KAAK,QAAQ,EAAiC,gCAA6B;AAInF,uDAAuD;AACvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,6DAA6D;IAC7D,QAAQ,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,gBAAgB,CAAC;IAEzF,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IAEpB,8DAA8D;IAC9D,YAAY,EAAE,YAAY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G;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GACjB;IAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,CAmBzF"}
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { Buffer
|
|
4
|
+
import { Buffer } from '@luma.gl/core';
|
|
5
|
+
import { getGeometryShaderAttributeName } from "../geometry/geometry.js";
|
|
6
|
+
import { makeInterleavedGeometry } from "./geometry-utils.js";
|
|
5
7
|
import { uid } from "../utils/uid.js";
|
|
8
|
+
/**
|
|
9
|
+
* GPU-backed geometry container.
|
|
10
|
+
*
|
|
11
|
+
* `GPUGeometry` owns already-created vertex and index buffers plus the `bufferLayout` metadata
|
|
12
|
+
* needed to bind those buffers to shader attributes.
|
|
13
|
+
*/
|
|
6
14
|
export class GPUGeometry {
|
|
15
|
+
/** Application-provided or generated identifier. */
|
|
7
16
|
id;
|
|
17
|
+
/** Application-owned metadata. */
|
|
8
18
|
userData = {};
|
|
9
|
-
/** Determines how vertices are
|
|
19
|
+
/** Determines how vertices are assembled into primitives. */
|
|
10
20
|
topology;
|
|
21
|
+
/** Buffer layout matching {@link GPUGeometry.attributes}. */
|
|
11
22
|
bufferLayout = [];
|
|
23
|
+
/** Resolved draw vertex count. */
|
|
12
24
|
vertexCount;
|
|
25
|
+
/** Optional GPU index buffer. */
|
|
13
26
|
indices;
|
|
27
|
+
/** GPU vertex buffers, keyed by buffer layout name. */
|
|
14
28
|
attributes;
|
|
29
|
+
/** Creates GPU-backed geometry from existing buffers. */
|
|
15
30
|
constructor(props) {
|
|
16
31
|
this.id = props.id || uid('geometry');
|
|
17
32
|
this.topology = props.topology;
|
|
@@ -25,18 +40,22 @@ export class GPUGeometry {
|
|
|
25
40
|
}
|
|
26
41
|
}
|
|
27
42
|
}
|
|
43
|
+
/** Destroys the owned index and vertex buffers. */
|
|
28
44
|
destroy() {
|
|
29
45
|
this.indices?.destroy();
|
|
30
46
|
for (const attribute of Object.values(this.attributes)) {
|
|
31
47
|
attribute.destroy();
|
|
32
48
|
}
|
|
33
49
|
}
|
|
50
|
+
/** Returns the draw vertex count. */
|
|
34
51
|
getVertexCount() {
|
|
35
52
|
return this.vertexCount;
|
|
36
53
|
}
|
|
54
|
+
/** Returns the GPU vertex buffers. */
|
|
37
55
|
getAttributes() {
|
|
38
56
|
return this.attributes;
|
|
39
57
|
}
|
|
58
|
+
/** Returns the GPU index buffer, or `null` for non-indexed geometry. */
|
|
40
59
|
getIndexes() {
|
|
41
60
|
return this.indices || null;
|
|
42
61
|
}
|
|
@@ -46,20 +65,28 @@ export class GPUGeometry {
|
|
|
46
65
|
return vertexCount;
|
|
47
66
|
}
|
|
48
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Converts CPU geometry into GPU geometry.
|
|
70
|
+
*
|
|
71
|
+
* CPU `Geometry` input is interleaved before upload so the resulting `GPUGeometry` has one vertex
|
|
72
|
+
* buffer plus an optional index buffer. Passing a `GPUGeometry` returns the original instance.
|
|
73
|
+
*/
|
|
49
74
|
export function makeGPUGeometry(device, geometry) {
|
|
50
75
|
if (geometry instanceof GPUGeometry) {
|
|
51
76
|
return geometry;
|
|
52
77
|
}
|
|
53
|
-
const
|
|
54
|
-
const
|
|
78
|
+
const sourceGeometry = makeInterleavedGeometry(geometry);
|
|
79
|
+
const indices = getIndexBufferFromGeometry(device, sourceGeometry);
|
|
80
|
+
const { attributes, bufferLayout } = getAttributeBuffersFromGeometry(device, sourceGeometry);
|
|
55
81
|
return new GPUGeometry({
|
|
56
|
-
topology:
|
|
82
|
+
topology: sourceGeometry.topology || 'triangle-list',
|
|
57
83
|
bufferLayout,
|
|
58
|
-
vertexCount:
|
|
84
|
+
vertexCount: sourceGeometry.vertexCount,
|
|
59
85
|
indices,
|
|
60
86
|
attributes
|
|
61
87
|
});
|
|
62
88
|
}
|
|
89
|
+
/** Creates a GPU index buffer from CPU geometry index data, when present. */
|
|
63
90
|
export function getIndexBufferFromGeometry(device, geometry) {
|
|
64
91
|
if (!geometry.indices) {
|
|
65
92
|
return undefined;
|
|
@@ -67,45 +94,26 @@ export function getIndexBufferFromGeometry(device, geometry) {
|
|
|
67
94
|
const data = geometry.indices.value;
|
|
68
95
|
return device.createBuffer({ usage: Buffer.INDEX, data });
|
|
69
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Uploads one GPU vertex buffer for each CPU geometry attribute key and preserves its buffer
|
|
99
|
+
* layout metadata.
|
|
100
|
+
*/
|
|
70
101
|
export function getAttributeBuffersFromGeometry(device, geometry) {
|
|
71
|
-
const bufferLayout = [];
|
|
72
102
|
const attributes = {};
|
|
73
103
|
for (const [attributeName, attribute] of Object.entries(geometry.attributes)) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
switch (attributeName) {
|
|
77
|
-
case 'POSITION':
|
|
78
|
-
name = 'positions';
|
|
79
|
-
break;
|
|
80
|
-
case 'NORMAL':
|
|
81
|
-
name = 'normals';
|
|
82
|
-
break;
|
|
83
|
-
case 'TEXCOORD_0':
|
|
84
|
-
name = 'texCoords';
|
|
85
|
-
break;
|
|
86
|
-
case 'TEXCOORD_1':
|
|
87
|
-
name = 'texCoords1';
|
|
88
|
-
break;
|
|
89
|
-
case 'COLOR_0':
|
|
90
|
-
name = 'colors';
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
104
|
+
const name = geometry.bufferLayout.find(bufferLayout => bufferLayout.name === attributeName)?.name ||
|
|
105
|
+
getGeometryShaderAttributeName(attributeName);
|
|
93
106
|
if (attribute) {
|
|
94
107
|
attributes[name] = device.createBuffer({
|
|
95
108
|
data: attribute.value,
|
|
96
109
|
id: `${attributeName}-buffer`
|
|
97
110
|
});
|
|
98
|
-
const { value, size, normalized } = attribute;
|
|
99
|
-
if (size === undefined) {
|
|
100
|
-
throw new Error(`Attribute ${attributeName} is missing a size`);
|
|
101
|
-
}
|
|
102
|
-
bufferLayout.push({
|
|
103
|
-
name,
|
|
104
|
-
format: vertexFormatDecoder.getVertexFormatFromAttribute(value, size, normalized)
|
|
105
|
-
});
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
return {
|
|
114
|
+
attributes,
|
|
115
|
+
bufferLayout: geometry.bufferLayout,
|
|
116
|
+
vertexCount: geometry.vertexCount
|
|
117
|
+
};
|
|
110
118
|
}
|
|
111
119
|
//# sourceMappingURL=gpu-geometry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-geometry.js","sourceRoot":"","sources":["../../src/geometry/gpu-geometry.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"gpu-geometry.js","sourceRoot":"","sources":["../../src/geometry/gpu-geometry.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAgB,8BAA8B,EAAC,gCAA6B;AACnF,OAAO,EAAC,uBAAuB,EAAC,4BAAyB;AACzD,OAAO,EAAC,GAAG,EAAC,wBAAqB;AAuBjC;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACtB,oDAAoD;IAC3C,EAAE,CAAS;IAEpB,kCAAkC;IAClC,QAAQ,GAA4B,EAAE,CAAC;IAEvC,6DAA6D;IACpD,QAAQ,CAAqB;IAEtC,6DAA6D;IACpD,YAAY,GAAmB,EAAE,CAAC;IAE3C,kCAAkC;IACzB,WAAW,CAAS;IAE7B,iCAAiC;IACxB,OAAO,CAAiB;IAEjC,uDAAuD;IAC9C,UAAU,C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