@luma.gl/engine 9.4.0-alpha.1 → 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/index.cjs CHANGED
@@ -5087,44 +5087,53 @@ var ScenegraphNode = class {
5087
5087
  };
5088
5088
 
5089
5089
  // dist/scenegraph/group-node.js
5090
+ var import_core20 = require("@math.gl/core");
5091
+ var import_core21 = require("@luma.gl/core");
5092
+
5093
+ // dist/scenegraph/scenegraph-bounds.js
5090
5094
  var import_core19 = require("@math.gl/core");
5091
- var import_core20 = require("@luma.gl/core");
5095
+ function makeEmptyScenegraphBounds() {
5096
+ return [
5097
+ [Infinity, Infinity, Infinity],
5098
+ [-Infinity, -Infinity, -Infinity]
5099
+ ];
5100
+ }
5101
+ function expandScenegraphBounds(targetBounds, sourceBounds, transform) {
5102
+ const transformMatrix = new import_core19.Matrix4(transform);
5103
+ for (let cornerIndex = 0; cornerIndex < 8; cornerIndex++) {
5104
+ const corner = new import_core19.Vector3(sourceBounds[cornerIndex & 1 ? 1 : 0][0], sourceBounds[cornerIndex & 2 ? 1 : 0][1], sourceBounds[cornerIndex & 4 ? 1 : 0][2]);
5105
+ transformMatrix.transformAsPoint(corner, corner);
5106
+ for (let componentIndex = 0; componentIndex < 3; componentIndex++) {
5107
+ targetBounds[0][componentIndex] = Math.min(targetBounds[0][componentIndex], corner[componentIndex]);
5108
+ targetBounds[1][componentIndex] = Math.max(targetBounds[1][componentIndex], corner[componentIndex]);
5109
+ }
5110
+ }
5111
+ }
5112
+ function areScenegraphBoundsDefined(bounds) {
5113
+ return Number.isFinite(bounds[0][0]);
5114
+ }
5115
+
5116
+ // dist/scenegraph/group-node.js
5092
5117
  var GroupNode = class extends ScenegraphNode {
5093
5118
  children;
5094
5119
  constructor(props = {}) {
5095
5120
  props = Array.isArray(props) ? { children: props } : props;
5096
5121
  const { children = [] } = props;
5097
- import_core20.log.assert(children.every((child) => child instanceof ScenegraphNode), "every child must an instance of ScenegraphNode");
5122
+ import_core21.log.assert(children.every((child) => child instanceof ScenegraphNode), "every child must an instance of ScenegraphNode");
5098
5123
  super(props);
5099
5124
  this.children = children;
5100
5125
  }
5101
5126
  getBounds() {
5102
- const result = [
5103
- [Infinity, Infinity, Infinity],
5104
- [-Infinity, -Infinity, -Infinity]
5105
- ];
5127
+ const result = makeEmptyScenegraphBounds();
5106
5128
  this.traverse((node, { worldMatrix }) => {
5107
5129
  const bounds = node.getBounds();
5108
5130
  if (!bounds) {
5109
5131
  return;
5110
5132
  }
5111
- const [min, max] = bounds;
5112
- const center = new import_core19.Vector3(min).add(max).divide([2, 2, 2]);
5113
- worldMatrix.transformAsPoint(center, center);
5114
- const halfSize = new import_core19.Vector3(max).subtract(min).divide([2, 2, 2]);
5115
- worldMatrix.transformAsVector(halfSize, halfSize);
5116
- for (let v = 0; v < 8; v++) {
5117
- const position = new import_core19.Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center);
5118
- for (let i = 0; i < 3; i++) {
5119
- result[0][i] = Math.min(result[0][i], position[i]);
5120
- result[1][i] = Math.max(result[1][i], position[i]);
5121
- }
5122
- }
5133
+ const nodeWorldMatrix = new import_core20.Matrix4(worldMatrix).multiplyRight(node.matrix);
5134
+ expandScenegraphBounds(result, bounds, nodeWorldMatrix);
5123
5135
  });
5124
- if (!Number.isFinite(result[0][0])) {
5125
- return null;
5126
- }
5127
- return result;
5136
+ return areScenegraphBoundsDefined(result) ? result : null;
5128
5137
  }
5129
5138
  destroy() {
5130
5139
  this.children.forEach((child) => child.destroy());
@@ -5154,8 +5163,8 @@ var GroupNode = class extends ScenegraphNode {
5154
5163
  this.children = [];
5155
5164
  return this;
5156
5165
  }
5157
- traverse(visitor, { worldMatrix = new import_core19.Matrix4() } = {}) {
5158
- const modelMatrix = new import_core19.Matrix4(worldMatrix).multiplyRight(this.matrix);
5166
+ traverse(visitor, { worldMatrix = new import_core20.Matrix4() } = {}) {
5167
+ const modelMatrix = new import_core20.Matrix4(worldMatrix).multiplyRight(this.matrix);
5159
5168
  for (const child of this.children) {
5160
5169
  if (child instanceof GroupNode) {
5161
5170
  child.traverse(visitor, { worldMatrix: modelMatrix });
@@ -5164,8 +5173,30 @@ var GroupNode = class extends ScenegraphNode {
5164
5173
  }
5165
5174
  }
5166
5175
  }
5167
- preorderTraversal(visitor, { worldMatrix = new import_core19.Matrix4() } = {}) {
5168
- const modelMatrix = new import_core19.Matrix4(worldMatrix).multiplyRight(this.matrix);
5176
+ /** Visits leaf nodes ordered by the camera-space centers of their aggregate bounds. */
5177
+ traverseDepthSorted(visitor, { viewMatrix, worldMatrix = new import_core20.Matrix4(), order = "back-to-front" }) {
5178
+ const cameraMatrix = new import_core20.Matrix4(viewMatrix);
5179
+ const nodes = [];
5180
+ this.traverse((node, context) => {
5181
+ const bounds = node.getBounds();
5182
+ const center = bounds ? new import_core20.Vector3(bounds[0]).add(bounds[1]).divide([2, 2, 2]) : new import_core20.Vector3();
5183
+ const nodeWorldMatrix = new import_core20.Matrix4(context.worldMatrix).multiplyRight(node.matrix);
5184
+ nodeWorldMatrix.transformAsPoint(center, center);
5185
+ cameraMatrix.transformAsPoint(center, center);
5186
+ nodes.push({
5187
+ node,
5188
+ context: { worldMatrix: nodeWorldMatrix, bounds, depth: -center[2] },
5189
+ index: nodes.length
5190
+ });
5191
+ }, { worldMatrix: new import_core20.Matrix4(worldMatrix) });
5192
+ const direction = order === "back-to-front" ? -1 : 1;
5193
+ nodes.sort((first, second) => direction * (first.context.depth - second.context.depth) || first.index - second.index);
5194
+ for (const { node, context } of nodes) {
5195
+ visitor(node, context);
5196
+ }
5197
+ }
5198
+ preorderTraversal(visitor, { worldMatrix = new import_core20.Matrix4() } = {}) {
5199
+ const modelMatrix = new import_core20.Matrix4(worldMatrix).multiplyRight(this.matrix);
5169
5200
  visitor(this, { worldMatrix: modelMatrix });
5170
5201
  for (const child of this.children) {
5171
5202
  if (child instanceof GroupNode) {
@@ -5180,6 +5211,7 @@ var GroupNode = class extends ScenegraphNode {
5180
5211
  // dist/scenegraph/model-node.js
5181
5212
  var ModelNode = class extends ScenegraphNode {
5182
5213
  model;
5214
+ instanceMatrices;
5183
5215
  bounds = null;
5184
5216
  managedResources;
5185
5217
  // TODO - is this used? override callbacks to make sure we call them with this
@@ -5190,7 +5222,8 @@ var ModelNode = class extends ScenegraphNode {
5190
5222
  super(props);
5191
5223
  this.model = props.model;
5192
5224
  this.managedResources = props.managedResources || [];
5193
- this.bounds = props.bounds || null;
5225
+ this.instanceMatrices = props.instanceMatrices || null;
5226
+ this.bounds = props.bounds ? this.instanceMatrices ? getInstancedScenegraphBounds(props.bounds, this.instanceMatrices) : props.bounds : null;
5194
5227
  this.setProps(props);
5195
5228
  }
5196
5229
  destroy() {
@@ -5209,6 +5242,13 @@ var ModelNode = class extends ScenegraphNode {
5209
5242
  return this.model.draw(renderPass);
5210
5243
  }
5211
5244
  };
5245
+ function getInstancedScenegraphBounds(bounds, instanceMatrices) {
5246
+ const instancedBounds = makeEmptyScenegraphBounds();
5247
+ for (const instanceMatrix of instanceMatrices) {
5248
+ expandScenegraphBounds(instancedBounds, bounds, instanceMatrix);
5249
+ }
5250
+ return areScenegraphBoundsDefined(instancedBounds) ? instancedBounds : null;
5251
+ }
5212
5252
 
5213
5253
  // dist/geometries/cube-geometry.js
5214
5254
  var CubeGeometry = class extends Geometry {
@@ -5899,7 +5939,7 @@ var CylinderGeometry = class extends TruncatedConeGeometry {
5899
5939
  };
5900
5940
 
5901
5941
  // dist/geometries/ico-sphere-geometry.js
5902
- var import_core21 = require("@math.gl/core");
5942
+ var import_core22 = require("@math.gl/core");
5903
5943
  var ICO_POSITIONS = [-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0];
5904
5944
  var ICO_INDICES = [3, 4, 5, 3, 5, 1, 3, 1, 0, 3, 0, 4, 4, 0, 2, 4, 2, 5, 2, 0, 1, 5, 2, 1];
5905
5945
  var IcoSphereGeometry = class extends Geometry {
@@ -5999,7 +6039,7 @@ function tesselateIcosaHedron(props) {
5999
6039
  const u3 = 1 - phi3 / PI2;
6000
6040
  const vec1 = [x3 - x2, y3 - y2, z3 - z2];
6001
6041
  const vec2 = [x1 - x2, y1 - y2, z1 - z2];
6002
- const normal = new import_core21.Vector3(vec1).cross(vec2).normalize();
6042
+ const normal = new import_core22.Vector3(vec1).cross(vec2).normalize();
6003
6043
  let newIndex;
6004
6044
  if ((u1 === 0 || u2 === 0 || u3 === 0) && (u1 === 0 || u1 > 0.5) && (u2 === 0 || u2 > 0.5) && (u3 === 0 || u3 > 0.5)) {
6005
6045
  positions.push(positions[in1 + 0], positions[in1 + 1], positions[in1 + 2]);
@@ -6201,7 +6241,7 @@ function isAbsoluteLoadFileUrl(url) {
6201
6241
  }
6202
6242
 
6203
6243
  // dist/dynamic-texture/video-texture.js
6204
- var import_core22 = require("@luma.gl/core");
6244
+ var import_core23 = require("@luma.gl/core");
6205
6245
  var VideoTexture = class {
6206
6246
  /** Device used to create copied and native external texture bindings. */
6207
6247
  device;
@@ -6250,7 +6290,7 @@ var VideoTexture = class {
6250
6290
  * @param props Live video source and copied texture options.
6251
6291
  */
6252
6292
  constructor(device, props) {
6253
- (0, import_core22.assert)(isHTMLVideoElementSource(props == null ? void 0 : props.source) || isVideoFrameSource(props == null ? void 0 : props.source));
6293
+ (0, import_core23.assert)(isHTMLVideoElementSource(props == null ? void 0 : props.source) || isVideoFrameSource(props == null ? void 0 : props.source));
6254
6294
  this.device = device;
6255
6295
  this.id = props.id || uid("video-texture");
6256
6296
  this._source = props.source;
@@ -6264,7 +6304,7 @@ var VideoTexture = class {
6264
6304
  * @param source Next caller-owned video source to follow.
6265
6305
  */
6266
6306
  setSource(source4) {
6267
- (0, import_core22.assert)(isHTMLVideoElementSource(source4) || isVideoFrameSource(source4));
6307
+ (0, import_core23.assert)(isHTMLVideoElementSource(source4) || isVideoFrameSource(source4));
6268
6308
  this._destroyExternalTexture();
6269
6309
  this._source = source4;
6270
6310
  this._sourceVersion++;
@@ -6344,7 +6384,7 @@ var VideoTexture = class {
6344
6384
  width: size.width,
6345
6385
  height: size.height,
6346
6386
  format: "rgba8unorm",
6347
- usage: import_core22.Texture.SAMPLE | import_core22.Texture.COPY_DST,
6387
+ usage: import_core23.Texture.SAMPLE | import_core23.Texture.COPY_DST,
6348
6388
  mipLevels: 1,
6349
6389
  sampler: this._sampler
6350
6390
  });
@@ -6380,7 +6420,7 @@ var VideoTexture = class {
6380
6420
  */
6381
6421
  _getResolvedSize() {
6382
6422
  const size = getVideoTextureSourceSize(this._source);
6383
- (0, import_core22.assert)(size.width > 0 && size.height > 0);
6423
+ (0, import_core23.assert)(size.width > 0 && size.height > 0);
6384
6424
  return size;
6385
6425
  }
6386
6426
  /** Observes current source readiness and frame identity before binding resolution. */
@@ -6445,11 +6485,11 @@ function getVideoTextureSourceFrameToken(source4, sourceVersion) {
6445
6485
  }
6446
6486
 
6447
6487
  // dist/passes/shader-pass-renderer.js
6448
- var import_core24 = require("@luma.gl/core");
6488
+ var import_core25 = require("@luma.gl/core");
6449
6489
  var import_shadertools5 = require("@luma.gl/shadertools");
6450
6490
 
6451
6491
  // dist/compute/swap.js
6452
- var import_core23 = require("@luma.gl/core");
6492
+ var import_core24 = require("@luma.gl/core");
6453
6493
  var Swap = class {
6454
6494
  id;
6455
6495
  /** The current resource - usually the source for renders or computations */
@@ -6482,7 +6522,7 @@ var SwapFramebuffers = class extends Swap {
6482
6522
  let colorAttachments = (_a = props.colorAttachments) == null ? void 0 : _a.map((colorAttachment) => typeof colorAttachment !== "string" ? colorAttachment : device.createTexture({
6483
6523
  id: `${props.id}-texture-0`,
6484
6524
  format: colorAttachment,
6485
- usage: import_core23.Texture.SAMPLE | import_core23.Texture.RENDER | import_core23.Texture.COPY_SRC | import_core23.Texture.COPY_DST,
6525
+ usage: import_core24.Texture.SAMPLE | import_core24.Texture.RENDER | import_core24.Texture.COPY_SRC | import_core24.Texture.COPY_DST,
6486
6526
  width,
6487
6527
  height
6488
6528
  }));
@@ -6490,7 +6530,7 @@ var SwapFramebuffers = class extends Swap {
6490
6530
  colorAttachments = (_b = props.colorAttachments) == null ? void 0 : _b.map((colorAttachment) => typeof colorAttachment !== "string" ? colorAttachment : device.createTexture({
6491
6531
  id: `${props.id}-texture-1`,
6492
6532
  format: colorAttachment,
6493
- usage: import_core23.Texture.SAMPLE | import_core23.Texture.RENDER | import_core23.Texture.COPY_SRC | import_core23.Texture.COPY_DST,
6533
+ usage: import_core24.Texture.SAMPLE | import_core24.Texture.RENDER | import_core24.Texture.COPY_SRC | import_core24.Texture.COPY_DST,
6494
6534
  width,
6495
6535
  height
6496
6536
  }));
@@ -7168,7 +7208,8 @@ function createTargetResources(device, name, spec, targetSize) {
7168
7208
  width: targetSize[0],
7169
7209
  height: targetSize[1],
7170
7210
  format: spec.format || device.preferredColorFormat,
7171
- usage: import_core24.Texture.SAMPLE | import_core24.Texture.RENDER | import_core24.Texture.COPY_SRC | import_core24.Texture.COPY_DST
7211
+ usage: import_core25.Texture.SAMPLE | import_core25.Texture.RENDER | import_core25.Texture.COPY_SRC | import_core25.Texture.COPY_DST,
7212
+ ...spec.sampler ? { sampler: spec.sampler } : {}
7172
7213
  });
7173
7214
  const framebuffer = device.createFramebuffer({
7174
7215
  id: `${name}-framebuffer`,
@@ -7223,7 +7264,7 @@ function calculateTextureScale(sourceTexture, outputTexture) {
7223
7264
  }
7224
7265
 
7225
7266
  // dist/compute/computation.js
7226
- var import_core25 = require("@luma.gl/core");
7267
+ var import_core26 = require("@luma.gl/core");
7227
7268
  var import_shadertools6 = require("@luma.gl/shadertools");
7228
7269
  var import_types2 = require("@math.gl/types");
7229
7270
  var LOG_DRAW_PRIORITY2 = 2;
@@ -7276,8 +7317,8 @@ var _Computation = class {
7276
7317
  const modules = mergeShaderModules(this.props.modules, (_a = this.shaderInputs) == null ? void 0 : _a.getModules());
7277
7318
  const defines = { ...resolvedPlugins.defines, ...this.props.defines };
7278
7319
  this.props.shaderLayout = mergeShaderModuleBindingsIntoLayout(this.props.shaderLayout, modules) || null;
7279
- this.pipelineFactory = props.pipelineFactory || import_core25.PipelineFactory.getDefaultPipelineFactory(this.device);
7280
- this.shaderFactory = props.shaderFactory || import_core25.ShaderFactory.getDefaultShaderFactory(this.device);
7320
+ this.pipelineFactory = props.pipelineFactory || import_core26.PipelineFactory.getDefaultPipelineFactory(this.device);
7321
+ this.shaderFactory = props.shaderFactory || import_core26.ShaderFactory.getDefaultShaderFactory(this.device);
7281
7322
  const { source: source4, getUniforms: getUniforms2 } = this.props.shaderAssembler.assembleWGSLShader({
7282
7323
  platformInfo,
7283
7324
  ...this.props,
@@ -7338,7 +7379,7 @@ var _Computation = class {
7338
7379
  }
7339
7380
  setShaderInputs(shaderInputs) {
7340
7381
  this.shaderInputs = shaderInputs;
7341
- this._uniformStore = new import_core25.UniformStore(this.device, this.shaderInputs.modules);
7382
+ this._uniformStore = new import_core26.UniformStore(this.device, this.shaderInputs.modules);
7342
7383
  for (const [moduleName, module2] of Object.entries(this.shaderInputs.modules)) {
7343
7384
  if (shaderModuleHasUniforms(module2)) {
7344
7385
  const uniformBuffer = this._uniformStore.getManagedUniformBuffer(moduleName);
@@ -7383,7 +7424,7 @@ var _Computation = class {
7383
7424
  if (this._pipelineNeedsUpdate) {
7384
7425
  let prevShader = null;
7385
7426
  if (this.pipeline) {
7386
- import_core25.log.log(1, `Model ${this.id}: Recreating pipeline because "${this._pipelineNeedsUpdate}".`)();
7427
+ import_core26.log.log(1, `Model ${this.id}: Recreating pipeline because "${this._pipelineNeedsUpdate}".`)();
7387
7428
  prevShader = this.shader;
7388
7429
  }
7389
7430
  this._pipelineNeedsUpdate = false;
@@ -7407,33 +7448,33 @@ var _Computation = class {
7407
7448
  _lastLogTime = 0;
7408
7449
  _logOpen = false;
7409
7450
  _logDrawCallStart() {
7410
- const logDrawTimeout = import_core25.log.level > 3 ? 0 : LOG_DRAW_TIMEOUT2;
7411
- if (import_core25.log.level < 2 || Date.now() - this._lastLogTime < logDrawTimeout) {
7451
+ const logDrawTimeout = import_core26.log.level > 3 ? 0 : LOG_DRAW_TIMEOUT2;
7452
+ if (import_core26.log.level < 2 || Date.now() - this._lastLogTime < logDrawTimeout) {
7412
7453
  return;
7413
7454
  }
7414
7455
  this._lastLogTime = Date.now();
7415
7456
  this._logOpen = true;
7416
- import_core25.log.group(LOG_DRAW_PRIORITY2, `>>> DRAWING MODEL ${this.id}`, { collapsed: import_core25.log.level <= 2 })();
7457
+ import_core26.log.group(LOG_DRAW_PRIORITY2, `>>> DRAWING MODEL ${this.id}`, { collapsed: import_core26.log.level <= 2 })();
7417
7458
  }
7418
7459
  _logDrawCallEnd() {
7419
7460
  if (this._logOpen) {
7420
7461
  const uniformTable = this.shaderInputs.getDebugTable();
7421
- import_core25.log.table(LOG_DRAW_PRIORITY2, uniformTable)();
7422
- import_core25.log.groupEnd(LOG_DRAW_PRIORITY2)();
7462
+ import_core26.log.table(LOG_DRAW_PRIORITY2, uniformTable)();
7463
+ import_core26.log.groupEnd(LOG_DRAW_PRIORITY2)();
7423
7464
  this._logOpen = false;
7424
7465
  }
7425
7466
  }
7426
7467
  _drawCount = 0;
7427
7468
  // TODO - fix typing of luma data types
7428
7469
  _getBufferOrConstantValues(attribute, dataType) {
7429
- const TypedArrayConstructor = import_core25.dataTypeDecoder.getTypedArrayConstructor(dataType);
7430
- const typedArray = attribute instanceof import_core25.Buffer ? new TypedArrayConstructor(attribute.debugData) : attribute;
7470
+ const TypedArrayConstructor = import_core26.dataTypeDecoder.getTypedArrayConstructor(dataType);
7471
+ const typedArray = attribute instanceof import_core26.Buffer ? new TypedArrayConstructor(attribute.debugData) : attribute;
7431
7472
  return typedArray.toString();
7432
7473
  }
7433
7474
  };
7434
7475
  var Computation = _Computation;
7435
7476
  __publicField(Computation, "defaultProps", {
7436
- ...import_core25.ComputePipeline.defaultProps,
7477
+ ...import_core26.ComputePipeline.defaultProps,
7437
7478
  id: "unnamed",
7438
7479
  handle: void 0,
7439
7480
  userData: {},
@@ -7461,7 +7502,7 @@ function getPlatformInfo2(device) {
7461
7502
  }
7462
7503
 
7463
7504
  // dist/modules/picking/picking-manager.js
7464
- var import_core26 = require("@luma.gl/core");
7505
+ var import_core27 = require("@luma.gl/core");
7465
7506
 
7466
7507
  // dist/modules/picking/picking-uniforms.js
7467
7508
  var DEFAULT_HIGHLIGHT_COLOR = [0, 1, 1, 1];
@@ -7712,13 +7753,13 @@ var _PickingManager = class {
7712
7753
  format: "rgba8unorm",
7713
7754
  width: 1,
7714
7755
  height: 1,
7715
- usage: import_core26.Texture.RENDER_ATTACHMENT
7756
+ usage: import_core27.Texture.RENDER_ATTACHMENT
7716
7757
  });
7717
7758
  const pickingTexture = this.device.createTexture({
7718
7759
  format: "rg32sint",
7719
7760
  width: 1,
7720
7761
  height: 1,
7721
- usage: import_core26.Texture.RENDER_ATTACHMENT | import_core26.Texture.COPY_SRC
7762
+ usage: import_core27.Texture.RENDER_ATTACHMENT | import_core27.Texture.COPY_SRC
7722
7763
  });
7723
7764
  return this.device.createFramebuffer({
7724
7765
  colorAttachments: [colorTexture, pickingTexture],
@@ -7730,7 +7771,7 @@ var _PickingManager = class {
7730
7771
  format: "rgba8unorm",
7731
7772
  width: 1,
7732
7773
  height: 1,
7733
- usage: import_core26.Texture.RENDER_ATTACHMENT | import_core26.Texture.COPY_SRC
7774
+ usage: import_core27.Texture.RENDER_ATTACHMENT | import_core27.Texture.COPY_SRC
7734
7775
  });
7735
7776
  return this.device.createFramebuffer({
7736
7777
  colorAttachments: [pickingTexture],
@@ -7754,7 +7795,7 @@ var _PickingManager = class {
7754
7795
  const layout = pickTexture.computeMemoryLayout({ width: 1, height: 1 });
7755
7796
  const readBuffer = this.device.createBuffer({
7756
7797
  byteLength: layout.byteLength,
7757
- usage: import_core26.Buffer.COPY_DST | import_core26.Buffer.MAP_READ
7798
+ usage: import_core27.Buffer.COPY_DST | import_core27.Buffer.MAP_READ
7758
7799
  });
7759
7800
  try {
7760
7801
  pickTexture.readBuffer({
@@ -7788,7 +7829,7 @@ var _PickingManager = class {
7788
7829
  const layout = pickTexture.computeMemoryLayout({ width: 1, height: 1 });
7789
7830
  const readBuffer = this.device.createBuffer({
7790
7831
  byteLength: layout.byteLength,
7791
- usage: import_core26.Buffer.COPY_DST | import_core26.Buffer.MAP_READ
7832
+ usage: import_core27.Buffer.COPY_DST | import_core27.Buffer.MAP_READ
7792
7833
  });
7793
7834
  try {
7794
7835
  pickTexture.readBuffer({