@luma.gl/engine 10.0.0-alpha.14 → 10.0.0-alpha.15
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/arrow/index.cjs.map +2 -2
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.cjs +12 -13
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.d.ts.map +1 -1
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.js +22 -17
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.js.map +1 -1
- package/dist/lighting/index.cjs +12 -2
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +4 -0
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js +2 -0
- package/dist/lighting/index.js.map +1 -1
- package/dist/lighting/lightmap-atlas.cjs +246 -0
- package/dist/lighting/lightmap-atlas.d.ts +53 -0
- package/dist/lighting/lightmap-atlas.d.ts.map +1 -0
- package/dist/lighting/lightmap-atlas.js +279 -0
- package/dist/lighting/lightmap-atlas.js.map +1 -0
- package/dist/lighting/reflection-probe.cjs +321 -0
- package/dist/lighting/reflection-probe.d.ts +77 -0
- package/dist/lighting/reflection-probe.d.ts.map +1 -0
- package/dist/lighting/reflection-probe.js +298 -0
- package/dist/lighting/reflection-probe.js.map +1 -0
- package/package.json +8 -8
- package/src/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.ts +23 -19
- package/src/lighting/index.ts +18 -0
- package/src/lighting/lightmap-atlas.ts +348 -0
- package/src/lighting/reflection-probe.ts +360 -0
- package/src/splats/README.md +1 -1
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
3
|
+
import { assert, Buffer, Texture } from '@luma.gl/core';
|
|
4
|
+
import { Matrix4 } from '@math.gl/core';
|
|
5
|
+
import { PBR_ENVIRONMENT_FRAGMENT_WGSL, pbrEnvironmentFilter } from '@luma.gl/shaders';
|
|
6
|
+
import { ClipSpace } from "../models/clip-space.js";
|
|
7
|
+
import { ShaderInputs } from "../shader-inputs.js";
|
|
8
|
+
const FACES = [
|
|
9
|
+
{ direction: [1, 0, 0], up: [0, -1, 0] },
|
|
10
|
+
{ direction: [-1, 0, 0], up: [0, -1, 0] },
|
|
11
|
+
{ direction: [0, 1, 0], up: [0, 0, 1] },
|
|
12
|
+
{ direction: [0, -1, 0], up: [0, 0, -1] },
|
|
13
|
+
{ direction: [0, 0, 1], up: [0, -1, 0] },
|
|
14
|
+
{ direction: [0, 0, -1], up: [0, -1, 0] }
|
|
15
|
+
];
|
|
16
|
+
/** WebGPU capture and specular filtering with a complete, double-buffered publication. */
|
|
17
|
+
export class ReflectionProbe {
|
|
18
|
+
device;
|
|
19
|
+
origin;
|
|
20
|
+
matrixSnapshot;
|
|
21
|
+
capture;
|
|
22
|
+
depth;
|
|
23
|
+
targets;
|
|
24
|
+
views = [];
|
|
25
|
+
framebuffers = [];
|
|
26
|
+
captureTargets = [];
|
|
27
|
+
filterTargets = [];
|
|
28
|
+
filter;
|
|
29
|
+
size;
|
|
30
|
+
sampleCount;
|
|
31
|
+
activeSampleCount;
|
|
32
|
+
budget;
|
|
33
|
+
maximumFaces;
|
|
34
|
+
sameFrame;
|
|
35
|
+
projectionMatrix = new Matrix4([
|
|
36
|
+
1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1
|
|
37
|
+
]).multiplyRight(new Matrix4().perspective({ fovy: Math.PI / 2, aspect: 1, near: 0.05, far: 100 }));
|
|
38
|
+
pendingFaces = new Set();
|
|
39
|
+
captureCount = 0;
|
|
40
|
+
filteredCount = 0;
|
|
41
|
+
front;
|
|
42
|
+
back = 0;
|
|
43
|
+
credit = 0;
|
|
44
|
+
pausedFrames = 0;
|
|
45
|
+
destroyed = false;
|
|
46
|
+
constructor(device, props = {}) {
|
|
47
|
+
assert(device.type === 'webgpu');
|
|
48
|
+
this.device = device;
|
|
49
|
+
this.size = props.size ?? 32;
|
|
50
|
+
this.sampleCount = props.sampleCount ?? 16;
|
|
51
|
+
this.activeSampleCount = this.sampleCount;
|
|
52
|
+
this.budget = props.frameBudgetMilliseconds ?? 1000 / 60;
|
|
53
|
+
this.maximumFaces = props.maximumFacesPerFrame ?? 2;
|
|
54
|
+
this.sameFrame = props.refreshMode === 'same-frame';
|
|
55
|
+
assert(Number.isInteger(this.size) &&
|
|
56
|
+
this.size > 0 &&
|
|
57
|
+
this.size <= device.limits.maxTextureDimension2D);
|
|
58
|
+
assert(Number.isInteger(this.sampleCount) && this.sampleCount > 0 && this.sampleCount <= 1024);
|
|
59
|
+
assert(Number.isFinite(this.budget) && this.budget > 0);
|
|
60
|
+
assert(Number.isInteger(this.maximumFaces) && this.maximumFaces > 0 && this.maximumFaces <= 6);
|
|
61
|
+
const capabilities = device.getTextureFormatCapabilities('rgba16float');
|
|
62
|
+
assert(capabilities.render && capabilities.filter);
|
|
63
|
+
const requestedMipLevels = props.mipLevels ?? 4;
|
|
64
|
+
assert(Number.isSafeInteger(requestedMipLevels) && requestedMipLevels > 0);
|
|
65
|
+
const mipLevels = Math.min(requestedMipLevels, device.getMipLevelCount(this.size, this.size));
|
|
66
|
+
this.origin = device.createBuffer({ byteLength: 16, usage: Buffer.STORAGE | Buffer.COPY_DST });
|
|
67
|
+
this.capture = this.createCube('reflection-capture', 1);
|
|
68
|
+
this.targets = [
|
|
69
|
+
this.createCube('reflection-filter-a', mipLevels),
|
|
70
|
+
this.createCube('reflection-filter-b', mipLevels)
|
|
71
|
+
];
|
|
72
|
+
this.depth = device.createTexture({
|
|
73
|
+
width: this.size,
|
|
74
|
+
height: this.size,
|
|
75
|
+
format: 'depth24plus',
|
|
76
|
+
usage: Texture.RENDER
|
|
77
|
+
});
|
|
78
|
+
for (let face = 0; face < FACES.length; face++)
|
|
79
|
+
this.captureTargets.push(this.createTarget(this.capture, face, 0, this.depth));
|
|
80
|
+
for (const texture of this.targets) {
|
|
81
|
+
this.filterTargets.push(FACES.map((_, face) => Array.from({ length: mipLevels - 1 }, (_, mip) => this.createTarget(texture, face, mip + 1))));
|
|
82
|
+
}
|
|
83
|
+
this.filter = new ClipSpace(device, {
|
|
84
|
+
id: 'reflection-probe-filter',
|
|
85
|
+
source: PBR_ENVIRONMENT_FRAGMENT_WGSL,
|
|
86
|
+
defines: { PBR_ENVIRONMENT_CUBE_SOURCE: true },
|
|
87
|
+
modules: [pbrEnvironmentFilter],
|
|
88
|
+
shaderInputs: new ShaderInputs({ pbrEnvironmentFilter }),
|
|
89
|
+
colorAttachmentFormats: ['rgba16float'],
|
|
90
|
+
parameters: { depthWriteEnabled: false }
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
get texture() {
|
|
94
|
+
return this.front === undefined ? undefined : this.targets[this.front];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Record capture and filtering before the main draw. A budget estimate controls work or quality.
|
|
98
|
+
* Returns the number of face work units recorded. Submit the frame before calling again.
|
|
99
|
+
*/
|
|
100
|
+
update(options) {
|
|
101
|
+
assert(!this.destroyed);
|
|
102
|
+
assert(options.matrices.device === this.device && options.matrices.usage & Buffer.COPY_SRC);
|
|
103
|
+
assert(Number.isSafeInteger(options.matrixIndex) &&
|
|
104
|
+
options.matrixIndex >= 0 &&
|
|
105
|
+
(options.matrixIndex + 1) * 64 <= options.matrices.byteLength);
|
|
106
|
+
if (options.refresh === false && this.front !== undefined && this.captureCount === 0)
|
|
107
|
+
return 0;
|
|
108
|
+
const snapshotChanged = this.matrixSnapshot?.byteLength !== options.matrices.byteLength;
|
|
109
|
+
if (snapshotChanged) {
|
|
110
|
+
this.matrixSnapshot?.destroy();
|
|
111
|
+
this.matrixSnapshot = this.device.createBuffer({
|
|
112
|
+
byteLength: options.matrices.byteLength,
|
|
113
|
+
usage: Buffer.STORAGE | Buffer.COPY_DST | Buffer.COPY_SRC
|
|
114
|
+
});
|
|
115
|
+
this.captureCount = 0;
|
|
116
|
+
this.filteredCount = 0;
|
|
117
|
+
this.pendingFaces.clear();
|
|
118
|
+
}
|
|
119
|
+
const measured = options.frameMilliseconds;
|
|
120
|
+
const headroom = measured !== undefined && Number.isFinite(measured)
|
|
121
|
+
? Math.max(0, Math.min(this.budget, this.budget - measured))
|
|
122
|
+
: this.budget / 4;
|
|
123
|
+
let available;
|
|
124
|
+
if (this.sameFrame) {
|
|
125
|
+
// Keep the probe in step with the scene. Recover quality only with spare
|
|
126
|
+
// headroom so the sample count stays stable near the frame budget.
|
|
127
|
+
if (measured !== undefined && Number.isFinite(measured)) {
|
|
128
|
+
if (measured > this.budget) {
|
|
129
|
+
this.activeSampleCount = Math.max(Math.min(4, this.sampleCount), Math.floor(this.activeSampleCount / 2));
|
|
130
|
+
}
|
|
131
|
+
else if (headroom >= this.budget / 4) {
|
|
132
|
+
this.activeSampleCount = Math.min(this.sampleCount, this.activeSampleCount + 1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
available = FACES.length * 2;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
this.credit = Math.min(this.maximumFaces, this.credit + headroom);
|
|
139
|
+
available = Math.floor(this.credit);
|
|
140
|
+
if (available === 0 && ++this.pausedFrames >= 3)
|
|
141
|
+
available = 1;
|
|
142
|
+
if (available === 0)
|
|
143
|
+
return 0;
|
|
144
|
+
this.credit = Math.max(0, this.credit - available);
|
|
145
|
+
}
|
|
146
|
+
this.pausedFrames = 0;
|
|
147
|
+
if (this.captureCount === 0 && this.filteredCount === 0) {
|
|
148
|
+
this.device.commandEncoder.copyBufferToBuffer({
|
|
149
|
+
sourceBuffer: options.matrices,
|
|
150
|
+
destinationBuffer: this.matrixSnapshot,
|
|
151
|
+
size: options.matrices.byteLength
|
|
152
|
+
});
|
|
153
|
+
this.device.commandEncoder.copyBufferToBuffer({
|
|
154
|
+
sourceBuffer: this.matrixSnapshot,
|
|
155
|
+
sourceOffset: options.matrixIndex * 64 + 48,
|
|
156
|
+
destinationBuffer: this.origin,
|
|
157
|
+
size: 16
|
|
158
|
+
});
|
|
159
|
+
for (let face = 0; face < FACES.length; face++)
|
|
160
|
+
this.pendingFaces.add(face);
|
|
161
|
+
}
|
|
162
|
+
let used = 0;
|
|
163
|
+
while (used < available && this.captureCount < FACES.length) {
|
|
164
|
+
const face = this.nextFace(options.viewDirections ?? []);
|
|
165
|
+
const { direction, up } = FACES[face];
|
|
166
|
+
options.draw({
|
|
167
|
+
face,
|
|
168
|
+
framebuffer: this.captureTargets[face],
|
|
169
|
+
viewMatrix: new Matrix4().lookAt({ eye: [0, 0, 0], center: direction, up }),
|
|
170
|
+
projectionMatrix: this.projectionMatrix,
|
|
171
|
+
matrices: this.matrixSnapshot,
|
|
172
|
+
origin: this.origin
|
|
173
|
+
});
|
|
174
|
+
this.pendingFaces.delete(face);
|
|
175
|
+
this.captureCount++;
|
|
176
|
+
used++;
|
|
177
|
+
}
|
|
178
|
+
while (used < available && this.filteredCount < FACES.length) {
|
|
179
|
+
this.filterFace(this.filteredCount);
|
|
180
|
+
this.filteredCount++;
|
|
181
|
+
used++;
|
|
182
|
+
}
|
|
183
|
+
if (this.filteredCount === FACES.length) {
|
|
184
|
+
this.front = this.back;
|
|
185
|
+
this.back = 1 - this.back;
|
|
186
|
+
this.captureCount = 0;
|
|
187
|
+
this.filteredCount = 0;
|
|
188
|
+
}
|
|
189
|
+
return used;
|
|
190
|
+
}
|
|
191
|
+
destroy() {
|
|
192
|
+
if (this.destroyed)
|
|
193
|
+
return;
|
|
194
|
+
this.destroyed = true;
|
|
195
|
+
this.filter.destroy();
|
|
196
|
+
for (const framebuffer of this.framebuffers)
|
|
197
|
+
framebuffer.destroy();
|
|
198
|
+
for (const view of this.views)
|
|
199
|
+
view.destroy();
|
|
200
|
+
for (const target of this.targets)
|
|
201
|
+
target.destroy();
|
|
202
|
+
this.capture.destroy();
|
|
203
|
+
this.depth.destroy();
|
|
204
|
+
this.origin.destroy();
|
|
205
|
+
this.matrixSnapshot?.destroy();
|
|
206
|
+
}
|
|
207
|
+
nextFace(directions) {
|
|
208
|
+
let bestFace = -1;
|
|
209
|
+
let bestScore = -Infinity;
|
|
210
|
+
for (const face of this.pendingFaces) {
|
|
211
|
+
const normal = FACES[face].direction;
|
|
212
|
+
const score = directions.length
|
|
213
|
+
? Math.max(...directions.map(direction => {
|
|
214
|
+
const length = Math.hypot(...direction);
|
|
215
|
+
return length > 0
|
|
216
|
+
? (normal[0] * direction[0] + normal[1] * direction[1] + normal[2] * direction[2]) /
|
|
217
|
+
length
|
|
218
|
+
: 0;
|
|
219
|
+
}))
|
|
220
|
+
: 0;
|
|
221
|
+
if (score > bestScore) {
|
|
222
|
+
bestScore = score;
|
|
223
|
+
bestFace = face;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return bestFace;
|
|
227
|
+
}
|
|
228
|
+
createCube(id, mipLevels) {
|
|
229
|
+
return this.device.createTexture({
|
|
230
|
+
id,
|
|
231
|
+
dimension: 'cube',
|
|
232
|
+
width: this.size,
|
|
233
|
+
height: this.size,
|
|
234
|
+
depth: 6,
|
|
235
|
+
format: 'rgba16float',
|
|
236
|
+
mipLevels,
|
|
237
|
+
usage: Texture.RENDER | Texture.SAMPLE | Texture.COPY_SRC | Texture.COPY_DST,
|
|
238
|
+
sampler: { minFilter: 'linear', magFilter: 'linear', mipmapFilter: 'linear' }
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
createTarget(texture, face, mip, depth = null) {
|
|
242
|
+
const view = texture.createView({
|
|
243
|
+
dimension: '2d',
|
|
244
|
+
baseArrayLayer: face,
|
|
245
|
+
arrayLayerCount: 1,
|
|
246
|
+
baseMipLevel: mip,
|
|
247
|
+
mipLevelCount: 1
|
|
248
|
+
});
|
|
249
|
+
this.views.push(view);
|
|
250
|
+
const size = Math.max(1, this.size >> mip);
|
|
251
|
+
const framebuffer = this.device.createFramebuffer({
|
|
252
|
+
width: size,
|
|
253
|
+
height: size,
|
|
254
|
+
colorAttachments: [view],
|
|
255
|
+
depthStencilAttachment: depth
|
|
256
|
+
});
|
|
257
|
+
this.framebuffers.push(framebuffer);
|
|
258
|
+
return framebuffer;
|
|
259
|
+
}
|
|
260
|
+
filterFace(face) {
|
|
261
|
+
const targets = this.filterTargets[this.back][face];
|
|
262
|
+
this.device.commandEncoder.copyTextureToTexture({
|
|
263
|
+
sourceTexture: this.capture,
|
|
264
|
+
destinationTexture: this.targets[this.back],
|
|
265
|
+
origin: [0, 0, face],
|
|
266
|
+
destinationOrigin: [0, 0, face],
|
|
267
|
+
width: this.size,
|
|
268
|
+
height: this.size,
|
|
269
|
+
depthOrArrayLayers: 1
|
|
270
|
+
});
|
|
271
|
+
for (const [index, framebuffer] of targets.entries()) {
|
|
272
|
+
const mip = index + 1;
|
|
273
|
+
this.filter.shaderInputs.setProps({
|
|
274
|
+
pbrEnvironmentFilter: {
|
|
275
|
+
face,
|
|
276
|
+
roughness: mip / targets.length,
|
|
277
|
+
mode: 0,
|
|
278
|
+
sampleCount: this.activeSampleCount,
|
|
279
|
+
sourceEncoding: 0,
|
|
280
|
+
pbrEnvironmentSource: this.capture
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
this.filter.predraw(this.device.commandEncoder);
|
|
284
|
+
const pass = this.device.beginRenderPass({
|
|
285
|
+
framebuffer,
|
|
286
|
+
clearColor: [0, 0, 0, 1],
|
|
287
|
+
clearDepth: false
|
|
288
|
+
});
|
|
289
|
+
try {
|
|
290
|
+
this.filter.draw(pass);
|
|
291
|
+
}
|
|
292
|
+
finally {
|
|
293
|
+
pass.end();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=reflection-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflection-probe.js","sourceRoot":"","sources":["../../src/lighting/reflection-probe.ts"],"names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"description": "3D Engine Components for luma.gl",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -128,20 +128,20 @@
|
|
|
128
128
|
"prepublishOnly": "npm run build-minified-bundle && npm run build-dev-bundle"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
|
-
"@luma.gl/core": "~10.0.0-alpha.
|
|
132
|
-
"@luma.gl/shaders": "~10.0.0-alpha.
|
|
131
|
+
"@luma.gl/core": "~10.0.0-alpha.15",
|
|
132
|
+
"@luma.gl/shaders": "~10.0.0-alpha.15",
|
|
133
133
|
"apache-arrow": ">=17.0.0"
|
|
134
134
|
},
|
|
135
135
|
"dependencies": {
|
|
136
|
-
"@luma.gl/graph": "10.0.0-alpha.
|
|
136
|
+
"@luma.gl/graph": "10.0.0-alpha.15",
|
|
137
137
|
"@mapbox/tiny-sdf": "^2.0.7",
|
|
138
|
-
"@math.gl/core": "~5.0.0-beta.
|
|
139
|
-
"@math.gl/geometry": "~5.0.0-beta.
|
|
138
|
+
"@math.gl/core": "~5.0.0-beta.10",
|
|
139
|
+
"@math.gl/geometry": "~5.0.0-beta.10",
|
|
140
140
|
"probe.gl": "^5.0.0"
|
|
141
141
|
},
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "2a5a732d5fab9f90c6d3646f956e1304a6a22c2e",
|
|
143
143
|
"devDependencies": {
|
|
144
|
-
"@luma.gl/anari": "10.0.0-alpha.
|
|
144
|
+
"@luma.gl/anari": "10.0.0-alpha.15"
|
|
145
145
|
},
|
|
146
146
|
"peerDependenciesMeta": {
|
|
147
147
|
"apache-arrow": {
|
|
@@ -65,23 +65,27 @@ export async function makeGPUSplatDataFromGLTFScene(
|
|
|
65
65
|
) {
|
|
66
66
|
throw new Error('Unsupported decoded glTF Gaussian splat primitive');
|
|
67
67
|
}
|
|
68
|
+
const result = descriptor.decoded;
|
|
69
|
+
const table =
|
|
70
|
+
result &&
|
|
71
|
+
typeof result === 'object' &&
|
|
72
|
+
'shape' in result &&
|
|
73
|
+
result.shape === 'arrow-table' &&
|
|
74
|
+
'data' in result
|
|
75
|
+
? result.data
|
|
76
|
+
: result;
|
|
68
77
|
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
!('
|
|
72
|
-
!(
|
|
73
|
-
|
|
78
|
+
!table ||
|
|
79
|
+
typeof table !== 'object' ||
|
|
80
|
+
!('batches' in table) ||
|
|
81
|
+
!Array.isArray(table.batches) ||
|
|
82
|
+
!('getChild' in table) ||
|
|
83
|
+
typeof table.getChild !== 'function'
|
|
74
84
|
) {
|
|
75
85
|
throw new Error('Decoded glTF splats require a Mesh Arrow table');
|
|
76
86
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
data: GPUSplatArrowTableLike;
|
|
80
|
-
};
|
|
81
|
-
if (!decoded.data || !Array.isArray(decoded.data.batches)) {
|
|
82
|
-
throw new Error('Decoded glTF splats require a Mesh Arrow table');
|
|
83
|
-
}
|
|
84
|
-
consumedSourceBatches = decoded.data.batches.length;
|
|
87
|
+
const decoded = table as GPUSplatArrowTableLike;
|
|
88
|
+
consumedSourceBatches = decoded.batches.length;
|
|
85
89
|
const declaredFeature = primitive.extensions?.EXT_mesh_features?.featureIds?.find(
|
|
86
90
|
(feature: {attribute?: number}) => feature.attribute !== undefined
|
|
87
91
|
);
|
|
@@ -102,11 +106,11 @@ export async function makeGPUSplatDataFromGLTFScene(
|
|
|
102
106
|
) {
|
|
103
107
|
throw new Error('glTF Gaussian splat feature IDs must be unsigned integers');
|
|
104
108
|
}
|
|
105
|
-
if (values.length !== decoded.
|
|
109
|
+
if (values.length !== decoded.numRows) {
|
|
106
110
|
throw new Error('glTF Gaussian splat feature-ID count does not match decoded splats');
|
|
107
111
|
}
|
|
108
112
|
let offset = 0;
|
|
109
|
-
const recordBatches = decoded.
|
|
113
|
+
const recordBatches = decoded.batches.map(recordBatch => {
|
|
110
114
|
const ids = values.subarray(offset, offset + recordBatch.numRows);
|
|
111
115
|
offset += recordBatch.numRows;
|
|
112
116
|
const vector = makeVector(ids);
|
|
@@ -118,12 +122,12 @@ export async function makeGPUSplatDataFromGLTFScene(
|
|
|
118
122
|
};
|
|
119
123
|
});
|
|
120
124
|
const table = {
|
|
121
|
-
numRows: decoded.
|
|
122
|
-
schema: decoded.
|
|
125
|
+
numRows: decoded.numRows,
|
|
126
|
+
schema: decoded.schema,
|
|
123
127
|
batches: recordBatches,
|
|
124
|
-
getChild: (name: string) => decoded.
|
|
128
|
+
getChild: (name: string) => decoded.getChild(name)
|
|
125
129
|
};
|
|
126
|
-
source =
|
|
130
|
+
source = table;
|
|
127
131
|
}
|
|
128
132
|
batches = makeGPUSplatDataFromArrow(device, source, {
|
|
129
133
|
sourceBatchIndex,
|
package/src/lighting/index.ts
CHANGED
|
@@ -105,3 +105,21 @@ export {
|
|
|
105
105
|
export type {LightmapData} from './lightmap-data';
|
|
106
106
|
export {sampleLightmapEnvironment} from './lightmap-environment';
|
|
107
107
|
export type {LightmapEnvironment, LightmapEnvironmentSample} from './lightmap-environment';
|
|
108
|
+
|
|
109
|
+
export {ReflectionProbe} from './reflection-probe';
|
|
110
|
+
export type {
|
|
111
|
+
ReflectionProbeProps,
|
|
112
|
+
ReflectionProbeUpdate,
|
|
113
|
+
ReflectionProbeView
|
|
114
|
+
} from './reflection-probe';
|
|
115
|
+
export {
|
|
116
|
+
createLightmapAtlas,
|
|
117
|
+
validateLightmapAtlas,
|
|
118
|
+
getLightmapAtlasDebugData
|
|
119
|
+
} from './lightmap-atlas';
|
|
120
|
+
export type {
|
|
121
|
+
LightmapAtlas,
|
|
122
|
+
LightmapAtlasInput,
|
|
123
|
+
LightmapAtlasOptions,
|
|
124
|
+
LightmapAtlasChart
|
|
125
|
+
} from './lightmap-atlas';
|