@luma.gl/engine 9.3.6 → 9.4.0-alpha.2
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 +4190 -2014
- 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 +4045 -1975
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +22 -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 +467 -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/scenegraph/group-node.d.ts +17 -1
- package/dist/scenegraph/group-node.d.ts.map +1 -1
- package/dist/scenegraph/group-node.js +29 -23
- package/dist/scenegraph/group-node.js.map +1 -1
- package/dist/scenegraph/model-node.d.ts +8 -2
- package/dist/scenegraph/model-node.d.ts.map +1 -1
- package/dist/scenegraph/model-node.js +15 -1
- package/dist/scenegraph/model-node.js.map +1 -1
- package/dist/scenegraph/scenegraph-bounds.d.ts +7 -0
- package/dist/scenegraph/scenegraph-bounds.d.ts.map +1 -0
- package/dist/scenegraph/scenegraph-bounds.js +25 -0
- package/dist/scenegraph/scenegraph-bounds.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 +4 -4
- 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 +56 -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 +692 -89
- package/src/passes/texture-transform-module.ts +52 -0
- package/src/scenegraph/group-node.ts +63 -26
- package/src/scenegraph/model-node.ts +32 -3
- package/src/scenegraph/scenegraph-bounds.ts +48 -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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {ShaderModule} from '@luma.gl/shadertools';
|
|
6
|
+
|
|
7
|
+
export const textureTransform = {
|
|
8
|
+
name: 'textureTransform',
|
|
9
|
+
source: /* wgsl */ `
|
|
10
|
+
struct textureTransformUniforms {
|
|
11
|
+
scale: vec2<f32>,
|
|
12
|
+
flipY: i32,
|
|
13
|
+
};
|
|
14
|
+
@group(0) @binding(auto) var<uniform> textureTransform: textureTransformUniforms;
|
|
15
|
+
|
|
16
|
+
fn shaderPassRenderer_getTextureUV(uv: vec2f) -> vec2f {
|
|
17
|
+
var position = (uv - vec2f(0.5, 0.5)) / textureTransform.scale + vec2f(0.5, 0.5);
|
|
18
|
+
if (textureTransform.flipY != 0) {
|
|
19
|
+
position.y = 1.0 - position.y;
|
|
20
|
+
}
|
|
21
|
+
return position;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
fn shaderPassRenderer_getRenderTargetUV(textureUV: vec2f) -> vec2f {
|
|
25
|
+
let unscaledCoord = (textureUV - vec2f(0.5, 0.5)) * textureTransform.scale + vec2f(0.5, 0.5);
|
|
26
|
+
return select(vec2f(unscaledCoord.x, 1.0 - unscaledCoord.y), unscaledCoord, textureTransform.flipY != 0);
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
fs: /* glsl */ `
|
|
30
|
+
layout(std140) uniform textureTransformUniforms {
|
|
31
|
+
vec2 scale;
|
|
32
|
+
int flipY;
|
|
33
|
+
} textureTransform;
|
|
34
|
+
|
|
35
|
+
vec2 shaderPassRenderer_getTextureUV(vec2 coord) {
|
|
36
|
+
vec2 position = (coord - 0.5) / textureTransform.scale + 0.5;
|
|
37
|
+
if (textureTransform.flipY != 0) {
|
|
38
|
+
position.y = 1.0 - position.y;
|
|
39
|
+
}
|
|
40
|
+
return position;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
vec2 shaderPassRenderer_getRenderTargetUV(vec2 textureUV) {
|
|
44
|
+
vec2 unscaledCoord = (textureUV - 0.5) * textureTransform.scale + 0.5;
|
|
45
|
+
return textureTransform.flipY != 0 ? unscaledCoord : vec2(unscaledCoord.x, 1.0 - unscaledCoord.y);
|
|
46
|
+
}
|
|
47
|
+
`,
|
|
48
|
+
uniformTypes: {
|
|
49
|
+
scale: 'vec2<f32>',
|
|
50
|
+
flipY: 'i32'
|
|
51
|
+
}
|
|
52
|
+
} as const satisfies ShaderModule<{}, {scale: [number, number]; flipY: number}>;
|
|
@@ -3,13 +3,34 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {Matrix4, Vector3} from '@math.gl/core';
|
|
6
|
+
import type {NumericArray} from '@math.gl/core';
|
|
6
7
|
import {log} from '@luma.gl/core';
|
|
7
8
|
import {ScenegraphNode, ScenegraphNodeProps} from './scenegraph-node';
|
|
9
|
+
import {
|
|
10
|
+
areScenegraphBoundsDefined,
|
|
11
|
+
expandScenegraphBounds,
|
|
12
|
+
makeEmptyScenegraphBounds
|
|
13
|
+
} from './scenegraph-bounds';
|
|
14
|
+
import type {ScenegraphBounds} from './scenegraph-bounds';
|
|
8
15
|
|
|
9
16
|
export type GroupNodeProps = ScenegraphNodeProps & {
|
|
10
17
|
children?: ScenegraphNode[];
|
|
11
18
|
};
|
|
12
19
|
|
|
20
|
+
/** Camera-relative ordering options for a flattened scenegraph traversal. */
|
|
21
|
+
export type DepthSortedTraversalOptions = {
|
|
22
|
+
viewMatrix: NumericArray;
|
|
23
|
+
worldMatrix?: NumericArray;
|
|
24
|
+
order?: 'back-to-front' | 'front-to-back';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** Model transform, local aggregate bounds, and positive camera depth for one visited node. */
|
|
28
|
+
export type DepthSortedTraversalContext = {
|
|
29
|
+
worldMatrix: Matrix4;
|
|
30
|
+
bounds: [number[], number[]] | null;
|
|
31
|
+
depth: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
13
34
|
export class GroupNode extends ScenegraphNode {
|
|
14
35
|
children: ScenegraphNode[];
|
|
15
36
|
|
|
@@ -27,39 +48,18 @@ export class GroupNode extends ScenegraphNode {
|
|
|
27
48
|
this.children = children;
|
|
28
49
|
}
|
|
29
50
|
|
|
30
|
-
override getBounds():
|
|
31
|
-
const result
|
|
32
|
-
[Infinity, Infinity, Infinity],
|
|
33
|
-
[-Infinity, -Infinity, -Infinity]
|
|
34
|
-
];
|
|
51
|
+
override getBounds(): ScenegraphBounds | null {
|
|
52
|
+
const result = makeEmptyScenegraphBounds();
|
|
35
53
|
|
|
36
54
|
this.traverse((node, {worldMatrix}) => {
|
|
37
55
|
const bounds = node.getBounds();
|
|
38
56
|
if (!bounds) {
|
|
39
57
|
return;
|
|
40
58
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
worldMatrix.transformAsPoint(center, center);
|
|
44
|
-
const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
|
|
45
|
-
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
46
|
-
|
|
47
|
-
for (let v = 0; v < 8; v++) {
|
|
48
|
-
// Test all 8 corners of the box
|
|
49
|
-
const position = new Vector3(v & 0b001 ? -1 : 1, v & 0b010 ? -1 : 1, v & 0b100 ? -1 : 1)
|
|
50
|
-
.multiply(halfSize)
|
|
51
|
-
.add(center);
|
|
52
|
-
|
|
53
|
-
for (let i = 0; i < 3; i++) {
|
|
54
|
-
result[0][i] = Math.min(result[0][i], position[i]);
|
|
55
|
-
result[1][i] = Math.max(result[1][i], position[i]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
59
|
+
const nodeWorldMatrix = new Matrix4(worldMatrix).multiplyRight(node.matrix);
|
|
60
|
+
expandScenegraphBounds(result, bounds, nodeWorldMatrix);
|
|
58
61
|
});
|
|
59
|
-
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
62
|
+
return areScenegraphBoundsDefined(result) ? result : null;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
override destroy(): void {
|
|
@@ -109,6 +109,43 @@ export class GroupNode extends ScenegraphNode {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/** Visits leaf nodes ordered by the camera-space centers of their aggregate bounds. */
|
|
113
|
+
traverseDepthSorted(
|
|
114
|
+
visitor: (node: ScenegraphNode, context: DepthSortedTraversalContext) => void,
|
|
115
|
+
{viewMatrix, worldMatrix = new Matrix4(), order = 'back-to-front'}: DepthSortedTraversalOptions
|
|
116
|
+
): void {
|
|
117
|
+
const cameraMatrix = new Matrix4(viewMatrix);
|
|
118
|
+
const nodes: {node: ScenegraphNode; context: DepthSortedTraversalContext; index: number}[] = [];
|
|
119
|
+
|
|
120
|
+
this.traverse(
|
|
121
|
+
(node, context) => {
|
|
122
|
+
const bounds = node.getBounds();
|
|
123
|
+
const center = bounds
|
|
124
|
+
? new Vector3(bounds[0]).add(bounds[1]).divide([2, 2, 2])
|
|
125
|
+
: new Vector3();
|
|
126
|
+
const nodeWorldMatrix = new Matrix4(context.worldMatrix).multiplyRight(node.matrix);
|
|
127
|
+
nodeWorldMatrix.transformAsPoint(center, center);
|
|
128
|
+
cameraMatrix.transformAsPoint(center, center);
|
|
129
|
+
nodes.push({
|
|
130
|
+
node,
|
|
131
|
+
context: {worldMatrix: nodeWorldMatrix, bounds, depth: -center[2]},
|
|
132
|
+
index: nodes.length
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
{worldMatrix: new Matrix4(worldMatrix)}
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const direction = order === 'back-to-front' ? -1 : 1;
|
|
139
|
+
nodes.sort(
|
|
140
|
+
(first, second) =>
|
|
141
|
+
direction * (first.context.depth - second.context.depth) || first.index - second.index
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
for (const {node, context} of nodes) {
|
|
145
|
+
visitor(node, context);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
112
149
|
preorderTraversal(
|
|
113
150
|
visitor: (node: ScenegraphNode, context: {worldMatrix: Matrix4}) => void,
|
|
114
151
|
{worldMatrix = new Matrix4()} = {}
|
|
@@ -3,18 +3,29 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {RenderPass} from '@luma.gl/core';
|
|
6
|
+
import type {NumericArray} from '@math.gl/core';
|
|
6
7
|
import {ScenegraphNode, ScenegraphNodeProps} from './scenegraph-node';
|
|
8
|
+
import {
|
|
9
|
+
areScenegraphBoundsDefined,
|
|
10
|
+
expandScenegraphBounds,
|
|
11
|
+
makeEmptyScenegraphBounds
|
|
12
|
+
} from './scenegraph-bounds';
|
|
13
|
+
import type {ScenegraphBounds} from './scenegraph-bounds';
|
|
7
14
|
import {Model} from '../model/model';
|
|
8
15
|
|
|
9
16
|
export type ModelNodeProps = ScenegraphNodeProps & {
|
|
10
17
|
model: Model;
|
|
11
18
|
managedResources?: any[];
|
|
12
|
-
|
|
19
|
+
/** Bounds of one model instance before instance and node transforms. */
|
|
20
|
+
bounds?: ScenegraphBounds;
|
|
21
|
+
/** Optional per-instance transforms used to calculate aggregate local bounds. */
|
|
22
|
+
instanceMatrices?: readonly NumericArray[];
|
|
13
23
|
};
|
|
14
24
|
|
|
15
25
|
export class ModelNode extends ScenegraphNode {
|
|
16
26
|
readonly model: Model;
|
|
17
|
-
|
|
27
|
+
readonly instanceMatrices: readonly NumericArray[] | null;
|
|
28
|
+
bounds: ScenegraphBounds | null = null;
|
|
18
29
|
managedResources: any[];
|
|
19
30
|
|
|
20
31
|
// TODO - is this used? override callbacks to make sure we call them with this
|
|
@@ -28,7 +39,12 @@ export class ModelNode extends ScenegraphNode {
|
|
|
28
39
|
// Create new Model or used supplied Model
|
|
29
40
|
this.model = props.model;
|
|
30
41
|
this.managedResources = props.managedResources || [];
|
|
31
|
-
this.
|
|
42
|
+
this.instanceMatrices = props.instanceMatrices || null;
|
|
43
|
+
this.bounds = props.bounds
|
|
44
|
+
? this.instanceMatrices
|
|
45
|
+
? getInstancedScenegraphBounds(props.bounds, this.instanceMatrices)
|
|
46
|
+
: props.bounds
|
|
47
|
+
: null;
|
|
32
48
|
this.setProps(props);
|
|
33
49
|
}
|
|
34
50
|
|
|
@@ -52,3 +68,16 @@ export class ModelNode extends ScenegraphNode {
|
|
|
52
68
|
return this.model.draw(renderPass);
|
|
53
69
|
}
|
|
54
70
|
}
|
|
71
|
+
|
|
72
|
+
function getInstancedScenegraphBounds(
|
|
73
|
+
bounds: ScenegraphBounds,
|
|
74
|
+
instanceMatrices: readonly NumericArray[]
|
|
75
|
+
): ScenegraphBounds | null {
|
|
76
|
+
const instancedBounds = makeEmptyScenegraphBounds();
|
|
77
|
+
|
|
78
|
+
for (const instanceMatrix of instanceMatrices) {
|
|
79
|
+
expandScenegraphBounds(instancedBounds, bounds, instanceMatrix);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return areScenegraphBoundsDefined(instancedBounds) ? instancedBounds : null;
|
|
83
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import {Matrix4, Vector3} from '@math.gl/core';
|
|
6
|
+
import type {NumericArray} from '@math.gl/core';
|
|
7
|
+
|
|
8
|
+
/** Axis-aligned bounds in a scenegraph node's local coordinate system. */
|
|
9
|
+
export type ScenegraphBounds = [[number, number, number], [number, number, number]];
|
|
10
|
+
|
|
11
|
+
export function makeEmptyScenegraphBounds(): ScenegraphBounds {
|
|
12
|
+
return [
|
|
13
|
+
[Infinity, Infinity, Infinity],
|
|
14
|
+
[-Infinity, -Infinity, -Infinity]
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function expandScenegraphBounds(
|
|
19
|
+
targetBounds: ScenegraphBounds,
|
|
20
|
+
sourceBounds: [number[], number[]],
|
|
21
|
+
transform: NumericArray
|
|
22
|
+
): void {
|
|
23
|
+
const transformMatrix = new Matrix4(transform);
|
|
24
|
+
|
|
25
|
+
for (let cornerIndex = 0; cornerIndex < 8; cornerIndex++) {
|
|
26
|
+
const corner = new Vector3(
|
|
27
|
+
sourceBounds[cornerIndex & 0b001 ? 1 : 0][0],
|
|
28
|
+
sourceBounds[cornerIndex & 0b010 ? 1 : 0][1],
|
|
29
|
+
sourceBounds[cornerIndex & 0b100 ? 1 : 0][2]
|
|
30
|
+
);
|
|
31
|
+
transformMatrix.transformAsPoint(corner, corner);
|
|
32
|
+
|
|
33
|
+
for (let componentIndex = 0; componentIndex < 3; componentIndex++) {
|
|
34
|
+
targetBounds[0][componentIndex] = Math.min(
|
|
35
|
+
targetBounds[0][componentIndex],
|
|
36
|
+
corner[componentIndex]
|
|
37
|
+
);
|
|
38
|
+
targetBounds[1][componentIndex] = Math.max(
|
|
39
|
+
targetBounds[1][componentIndex],
|
|
40
|
+
corner[componentIndex]
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function areScenegraphBoundsDefined(bounds: ScenegraphBounds): boolean {
|
|
47
|
+
return Number.isFinite(bounds[0][0]);
|
|
48
|
+
}
|
package/src/shader-inputs.ts
CHANGED
|
@@ -11,11 +11,22 @@ import {
|
|
|
11
11
|
ShaderModuleUniformValue
|
|
12
12
|
} from '@luma.gl/shadertools';
|
|
13
13
|
import {splitUniformsAndBindings} from './model/split-uniforms-and-bindings';
|
|
14
|
+
import type {TextureBindingSource} from './dynamic-texture/texture-binding-source';
|
|
15
|
+
|
|
16
|
+
/** Shader binding accepted by ShaderInputs, including deferred texture binding sources. */
|
|
17
|
+
export type ShaderInputBinding = Binding | TextureBindingSource;
|
|
14
18
|
|
|
15
19
|
export type ShaderInputsOptions = {
|
|
16
20
|
disableWarnings?: boolean;
|
|
17
21
|
};
|
|
18
22
|
|
|
23
|
+
export type ShaderInputsProps<
|
|
24
|
+
ShaderPropsT extends Partial<Record<string, Record<string, unknown>>>
|
|
25
|
+
> = Partial<{[P in keyof ShaderPropsT]?: Partial<ShaderPropsT[P]>}> & {
|
|
26
|
+
/** Shader resource bindings that are not owned by a shader module. */
|
|
27
|
+
bindings?: Record<string, ShaderInputBinding>;
|
|
28
|
+
};
|
|
29
|
+
|
|
19
30
|
type ShaderInputsModule = Pick<
|
|
20
31
|
ShaderModule<any, any, any>,
|
|
21
32
|
'bindingLayout' | 'defaultUniforms' | 'dependencies' | 'getUniforms' | 'name' | 'uniformTypes'
|
|
@@ -37,23 +48,23 @@ export class ShaderInputs<
|
|
|
37
48
|
disableWarnings: false
|
|
38
49
|
};
|
|
39
50
|
|
|
40
|
-
/**
|
|
41
|
-
* The map of modules
|
|
42
|
-
* @todo should should this include the resolved dependencies?
|
|
43
|
-
*/
|
|
51
|
+
/** Registered shader modules, including resolved dependencies. */
|
|
44
52
|
// @ts-ignore Fix typings
|
|
45
53
|
modules: Readonly<{[P in keyof ShaderPropsT]: ShaderInputsModule}>;
|
|
46
54
|
|
|
47
55
|
/** Stores the uniform values for each module */
|
|
48
56
|
moduleUniforms: Record<keyof ShaderPropsT, Record<string, ShaderModuleUniformValue>>;
|
|
49
|
-
/** Stores
|
|
50
|
-
moduleBindings: Record<keyof ShaderPropsT, Record<string,
|
|
57
|
+
/** Stores resource bindings for each module. */
|
|
58
|
+
moduleBindings: Record<keyof ShaderPropsT, Record<string, ShaderInputBinding>>;
|
|
59
|
+
/** Stores shader resource bindings that are not owned by a shader module. */
|
|
60
|
+
directBindings: Record<string, ShaderInputBinding> = {};
|
|
51
61
|
/** Tracks if uniforms have changed */
|
|
52
62
|
// moduleUniformsChanged: Record<keyof ShaderPropsT, false | string>;
|
|
53
63
|
|
|
54
64
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @param modules
|
|
65
|
+
* Creates shader input storage for one or more shader modules.
|
|
66
|
+
* @param modules Initial shader modules keyed by module name.
|
|
67
|
+
* @param options Shader input behavior options.
|
|
57
68
|
*/
|
|
58
69
|
constructor(
|
|
59
70
|
// @ts-ignore Fix typings
|
|
@@ -80,7 +91,7 @@ export class ShaderInputs<
|
|
|
80
91
|
keyof ShaderPropsT,
|
|
81
92
|
Record<string, ShaderModuleUniformValue>
|
|
82
93
|
>;
|
|
83
|
-
this.moduleBindings = {} as Record<keyof ShaderPropsT, Record<string,
|
|
94
|
+
this.moduleBindings = {} as Record<keyof ShaderPropsT, Record<string, ShaderInputBinding>>;
|
|
84
95
|
|
|
85
96
|
// Initialize the modules
|
|
86
97
|
for (const [name, module] of Object.entries(modules)) {
|
|
@@ -99,8 +110,16 @@ export class ShaderInputs<
|
|
|
99
110
|
/**
|
|
100
111
|
* Set module props
|
|
101
112
|
*/
|
|
102
|
-
setProps(props:
|
|
113
|
+
setProps(props: ShaderInputsProps<ShaderPropsT>): void {
|
|
114
|
+
if (props.bindings) {
|
|
115
|
+
Object.assign(this.directBindings, props.bindings);
|
|
116
|
+
}
|
|
117
|
+
|
|
103
118
|
for (const name of Object.keys(props)) {
|
|
119
|
+
if (name === 'bindings') {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
|
|
104
123
|
const moduleName = name as keyof ShaderPropsT;
|
|
105
124
|
const moduleProps = props[moduleName] || {};
|
|
106
125
|
const module = this.modules[moduleName];
|
|
@@ -132,14 +151,29 @@ export class ShaderInputs<
|
|
|
132
151
|
}
|
|
133
152
|
}
|
|
134
153
|
|
|
135
|
-
/**
|
|
136
|
-
* Return the map of modules
|
|
137
|
-
* @todo should should this include the resolved dependencies?
|
|
138
|
-
*/
|
|
154
|
+
/** Returns registered shader modules, including resolved dependencies. */
|
|
139
155
|
getModules(): ShaderModule[] {
|
|
140
156
|
return Object.values(this.modules) as ShaderModule[];
|
|
141
157
|
}
|
|
142
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Adds shader modules that should participate in subsequent uniform and binding updates.
|
|
161
|
+
* Module dependencies are resolved before new module state is initialized.
|
|
162
|
+
* @param modules Shader modules to register after construction.
|
|
163
|
+
*/
|
|
164
|
+
addModules(modules: ShaderInputsModule[]): void {
|
|
165
|
+
const modulesToAdd = getShaderModuleDependencies(modules);
|
|
166
|
+
|
|
167
|
+
for (const module of modulesToAdd) {
|
|
168
|
+
const moduleName = module.name as keyof ShaderPropsT;
|
|
169
|
+
if (!this.modules[moduleName]) {
|
|
170
|
+
// @ts-ignore The ShaderInputs module registry is intentionally extended at runtime.
|
|
171
|
+
this.modules[moduleName] = module;
|
|
172
|
+
this._addModule(module);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
143
177
|
/** Get all uniform values for all modules */
|
|
144
178
|
getUniformValues(): Partial<
|
|
145
179
|
Record<keyof ShaderPropsT, Record<string, ShaderModuleUniformValue>>
|
|
@@ -147,15 +181,29 @@ export class ShaderInputs<
|
|
|
147
181
|
return this.moduleUniforms;
|
|
148
182
|
}
|
|
149
183
|
|
|
150
|
-
/** Merges
|
|
151
|
-
getBindingValues(): Record<string,
|
|
152
|
-
const bindings = {} as Record<string,
|
|
184
|
+
/** Merges concrete and deferred bindings for the shader from the registered modules. */
|
|
185
|
+
getBindingValues(): Record<string, ShaderInputBinding> {
|
|
186
|
+
const bindings = {} as Record<string, ShaderInputBinding>;
|
|
153
187
|
for (const moduleBindings of Object.values(this.moduleBindings)) {
|
|
154
188
|
Object.assign(bindings, moduleBindings);
|
|
155
189
|
}
|
|
190
|
+
Object.assign(bindings, this.directBindings);
|
|
156
191
|
return bindings;
|
|
157
192
|
}
|
|
158
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Gets binding values for a single shader module without flattening them into the full shader map.
|
|
196
|
+
*
|
|
197
|
+
* This is used by systems such as {@link ShaderPassRenderer} that execute one shader module at a
|
|
198
|
+
* time and need the defaults for just that module.
|
|
199
|
+
*/
|
|
200
|
+
getModuleBindingValues(
|
|
201
|
+
moduleName: keyof ShaderPropsT | string
|
|
202
|
+
): Record<string, ShaderInputBinding> {
|
|
203
|
+
const moduleBindings = this.moduleBindings[moduleName as keyof ShaderPropsT];
|
|
204
|
+
return moduleBindings ? {...moduleBindings} : {};
|
|
205
|
+
}
|
|
206
|
+
|
|
159
207
|
// INTERNAL
|
|
160
208
|
|
|
161
209
|
/** Return a debug table that can be used for console.table() or log.table() */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {getBufferLayoutAttributeNames, type BufferLayout} from '@luma.gl/core';
|
|
6
6
|
|
|
7
7
|
/** BufferLayoutHelper is a helper class that should not be used directly by applications */
|
|
8
8
|
export class BufferLayoutHelper {
|
|
@@ -18,9 +18,7 @@ export class BufferLayoutHelper {
|
|
|
18
18
|
|
|
19
19
|
/** Get attribute names from a BufferLayout */
|
|
20
20
|
getAttributeNamesForBuffer(bufferLayout: BufferLayout): string[] {
|
|
21
|
-
return bufferLayout
|
|
22
|
-
? bufferLayout.attributes?.map(layout => layout.attribute)
|
|
23
|
-
: [bufferLayout.name];
|
|
21
|
+
return getBufferLayoutAttributeNames(bufferLayout);
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
mergeBufferLayouts(
|
|
@@ -38,14 +36,4 @@ export class BufferLayoutHelper {
|
|
|
38
36
|
}
|
|
39
37
|
return mergedLayouts;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
getBufferIndex(bufferName: string): number {
|
|
43
|
-
const bufferIndex = this.bufferLayouts.findIndex(layout => layout.name === bufferName);
|
|
44
|
-
|
|
45
|
-
if (bufferIndex === -1) {
|
|
46
|
-
log.warn(`BufferLayout: Missing buffer for "${bufferName}".`)();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return bufferIndex;
|
|
50
|
-
}
|
|
51
39
|
}
|
|
@@ -2,38 +2,28 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
for (const name of attributeNames) {
|
|
14
|
-
const location = shaderLayoutMap[name];
|
|
15
|
-
if (location !== undefined) {
|
|
16
|
-
minLocation = Math.min(minLocation, location);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return minLocation;
|
|
21
|
-
}
|
|
5
|
+
import {
|
|
6
|
+
getBufferLayoutAttributeNames,
|
|
7
|
+
getMinimumAttributeLocation,
|
|
8
|
+
getShaderAttributeLocationMap,
|
|
9
|
+
type BufferLayout,
|
|
10
|
+
type ShaderLayout
|
|
11
|
+
} from '@luma.gl/core';
|
|
22
12
|
|
|
23
13
|
export function sortedBufferLayoutByShaderSourceLocations(
|
|
24
14
|
shaderLayout: ShaderLayout,
|
|
25
15
|
bufferLayout: BufferLayout[]
|
|
26
16
|
): BufferLayout[] {
|
|
27
|
-
const shaderLayoutMap =
|
|
28
|
-
shaderLayout.attributes.map(attr => [attr.name, attr.location])
|
|
29
|
-
);
|
|
17
|
+
const shaderLayoutMap = getShaderAttributeLocationMap(shaderLayout);
|
|
30
18
|
|
|
31
19
|
const sortedLayout = bufferLayout.slice();
|
|
32
20
|
sortedLayout.sort((a, b) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const minLocationB =
|
|
21
|
+
const minLocationA = getMinimumAttributeLocation(
|
|
22
|
+
getBufferLayoutAttributeNames(a).map(attributeName => shaderLayoutMap[attributeName])
|
|
23
|
+
);
|
|
24
|
+
const minLocationB = getMinimumAttributeLocation(
|
|
25
|
+
getBufferLayoutAttributeNames(b).map(attributeName => shaderLayoutMap[attributeName])
|
|
26
|
+
);
|
|
37
27
|
|
|
38
28
|
return minLocationA - minLocationB;
|
|
39
29
|
});
|
|
@@ -33,6 +33,9 @@ export function mergeShaderModuleBindingsIntoLayout<TShaderLayout extends AnySha
|
|
|
33
33
|
if (binding?.group === 0) {
|
|
34
34
|
binding.group = bindingLayout.group;
|
|
35
35
|
}
|
|
36
|
+
if (binding && bindingLayout.visibility !== undefined) {
|
|
37
|
+
binding.visibility = bindingLayout.visibility;
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
}
|
|
@@ -40,10 +43,53 @@ export function mergeShaderModuleBindingsIntoLayout<TShaderLayout extends AnySha
|
|
|
40
43
|
return mergedLayout;
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
export function mergeInferredShaderLayout(
|
|
47
|
+
shaderLayout: ShaderLayout | null | undefined,
|
|
48
|
+
inferredShaderLayout: ShaderLayout | null | undefined,
|
|
49
|
+
inferredAttributeNames: readonly string[] = []
|
|
50
|
+
): ShaderLayout | null | undefined {
|
|
51
|
+
if (!shaderLayout) {
|
|
52
|
+
return inferredShaderLayout;
|
|
53
|
+
}
|
|
54
|
+
if (!inferredShaderLayout) {
|
|
55
|
+
return shaderLayout;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
...shaderLayout,
|
|
60
|
+
attributes: shaderLayout.attributes.length
|
|
61
|
+
? mergeAttributeLayouts(
|
|
62
|
+
shaderLayout.attributes,
|
|
63
|
+
inferredShaderLayout.attributes.filter(attribute =>
|
|
64
|
+
inferredAttributeNames.includes(attribute.name)
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
: inferredShaderLayout.attributes,
|
|
68
|
+
bindings: mergeBindingLayouts(shaderLayout.bindings, inferredShaderLayout.bindings)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
43
72
|
export function shaderModuleHasUniforms(module: ShaderModule): boolean {
|
|
44
73
|
return Boolean(module.uniformTypes && !isObjectEmpty(module.uniformTypes));
|
|
45
74
|
}
|
|
46
75
|
|
|
76
|
+
export function mergeShaderModules(
|
|
77
|
+
explicitModules: ShaderModule[] | undefined,
|
|
78
|
+
shaderInputModules: ShaderModule[] | undefined
|
|
79
|
+
): ShaderModule[] {
|
|
80
|
+
const modules: ShaderModule[] = [];
|
|
81
|
+
const moduleNames = new Set<string>();
|
|
82
|
+
|
|
83
|
+
for (const module of [...(explicitModules || []), ...(shaderInputModules || [])]) {
|
|
84
|
+
if (!moduleNames.has(module.name)) {
|
|
85
|
+
moduleNames.add(module.name);
|
|
86
|
+
modules.push(module);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return modules;
|
|
91
|
+
}
|
|
92
|
+
|
|
47
93
|
/** Returns binding-name aliases that should share the module-declared bind group. */
|
|
48
94
|
function getRelatedBindingNames(bindingName: string): string[] {
|
|
49
95
|
const bindingNames = new Set<string>([bindingName, `${bindingName}Uniforms`]);
|
|
@@ -56,10 +102,70 @@ function getRelatedBindingNames(bindingName: string): string[] {
|
|
|
56
102
|
}
|
|
57
103
|
|
|
58
104
|
function isObjectEmpty(obj: object): boolean {
|
|
59
|
-
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
61
|
-
for (const key in obj) {
|
|
105
|
+
for (const _key in obj) {
|
|
62
106
|
return false;
|
|
63
107
|
}
|
|
64
108
|
return true;
|
|
65
109
|
}
|
|
110
|
+
|
|
111
|
+
function mergeBindingLayouts<TBindingLayout extends ShaderLayout['bindings'][number]>(
|
|
112
|
+
explicitBindings: TBindingLayout[],
|
|
113
|
+
inferredBindings: TBindingLayout[]
|
|
114
|
+
): TBindingLayout[] {
|
|
115
|
+
const mergedBindings = explicitBindings.map(binding => ({...binding}));
|
|
116
|
+
const explicitBindingNames = new Set(explicitBindings.map(binding => binding.name));
|
|
117
|
+
const explicitBindingLocations = new Set(
|
|
118
|
+
explicitBindings.map(binding => `${binding.group}:${binding.location}`)
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
for (const inferredBinding of inferredBindings) {
|
|
122
|
+
const inferredBindingLocation = `${inferredBinding.group}:${inferredBinding.location}`;
|
|
123
|
+
if (
|
|
124
|
+
!explicitBindingNames.has(inferredBinding.name) &&
|
|
125
|
+
!explicitBindingLocations.has(inferredBindingLocation)
|
|
126
|
+
) {
|
|
127
|
+
mergedBindings.push({...inferredBinding});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return mergedBindings;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function mergeAttributeLayouts(
|
|
135
|
+
explicitAttributes: ShaderLayout['attributes'],
|
|
136
|
+
inferredAttributes: ShaderLayout['attributes']
|
|
137
|
+
): ShaderLayout['attributes'] {
|
|
138
|
+
const mergedAttributes = explicitAttributes.map(attribute => ({...attribute}));
|
|
139
|
+
const explicitAttributesByName = new Map(
|
|
140
|
+
explicitAttributes.map(attribute => [attribute.name, attribute])
|
|
141
|
+
);
|
|
142
|
+
const explicitAttributesByLocation = new Map(
|
|
143
|
+
explicitAttributes.map(attribute => [attribute.location, attribute])
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
for (const inferredAttribute of inferredAttributes) {
|
|
147
|
+
const explicitByName = explicitAttributesByName.get(inferredAttribute.name);
|
|
148
|
+
if (explicitByName) {
|
|
149
|
+
if (
|
|
150
|
+
explicitByName.type !== inferredAttribute.type ||
|
|
151
|
+
explicitByName.location !== inferredAttribute.location
|
|
152
|
+
) {
|
|
153
|
+
throw new Error(
|
|
154
|
+
`Shader attribute "${inferredAttribute.name}" conflicts with its inferred type or location`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const explicitByLocation = explicitAttributesByLocation.get(inferredAttribute.location);
|
|
161
|
+
if (explicitByLocation) {
|
|
162
|
+
throw new Error(
|
|
163
|
+
`Shader attributes "${explicitByLocation.name}" and "${inferredAttribute.name}" both use location ${inferredAttribute.location}`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
mergedAttributes.push({...inferredAttribute});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return mergedAttributes;
|
|
171
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=gpu-table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-table.d.ts","sourceRoot":"","sources":["../../src/geometry/gpu-table.ts"],"names":[],"mappings":""}
|