@luma.gl/engine 10.0.0-alpha.6 → 10.0.0-alpha.7

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.
Files changed (208) hide show
  1. package/README.md +2 -2
  2. package/dist/arrow/arrow-geometry.cjs +1 -1
  3. package/dist/arrow/arrow-geometry.js +1 -1
  4. package/dist/arrow/arrow-picking.cjs +1 -1
  5. package/dist/arrow/arrow-picking.d.ts +1 -1
  6. package/dist/arrow/arrow-picking.js +1 -1
  7. package/dist/arrow/renderers/path/conversion/arrow-path-gpu-vectors.cjs +5 -5
  8. package/dist/arrow/renderers/path/conversion/arrow-path-gpu-vectors.d.ts +2 -2
  9. package/dist/arrow/renderers/path/conversion/arrow-path-gpu-vectors.js +5 -5
  10. package/dist/arrow/renderers/path/conversion/arrow-path-storage-gpu-vectors.cjs +3 -3
  11. package/dist/arrow/renderers/path/conversion/arrow-path-storage-gpu-vectors.js +3 -3
  12. package/dist/arrow/renderers/path/source/arrow-path-source-mapping.cjs +1 -1
  13. package/dist/arrow/renderers/path/source/arrow-path-source-mapping.js +1 -1
  14. package/dist/arrow/renderers/path/transforms/close-arrow-paths.cjs +5 -5
  15. package/dist/arrow/renderers/path/transforms/close-arrow-paths.d.ts +1 -1
  16. package/dist/arrow/renderers/path/transforms/close-arrow-paths.js +5 -5
  17. package/dist/arrow/renderers/path/transforms/gpu-path-float64-deltas.cjs +3 -3
  18. package/dist/arrow/renderers/path/transforms/gpu-path-float64-deltas.d.ts +1 -1
  19. package/dist/arrow/renderers/path/transforms/gpu-path-float64-deltas.js +3 -3
  20. package/dist/arrow/renderers/path/transforms/path-view-origins.cjs +1 -1
  21. package/dist/arrow/renderers/path/transforms/path-view-origins.d.ts +1 -1
  22. package/dist/arrow/renderers/path/transforms/path-view-origins.js +1 -1
  23. package/dist/arrow/renderers/polygon/conversion/arrow-polygon-gpu-vectors.cjs +1 -1
  24. package/dist/arrow/renderers/polygon/conversion/arrow-polygon-gpu-vectors.d.ts +1 -1
  25. package/dist/arrow/renderers/polygon/conversion/arrow-polygon-gpu-vectors.js +1 -1
  26. package/dist/arrow/renderers/polygon/renderers/arrow-polygon-renderer.cjs +4 -4
  27. package/dist/arrow/renderers/polygon/renderers/arrow-polygon-renderer.js +4 -4
  28. package/dist/arrow/renderers/polygon/source/arrow-polygon-source-mapping.cjs +1 -1
  29. package/dist/arrow/renderers/polygon/source/arrow-polygon-source-mapping.js +1 -1
  30. package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-arrow.cjs +1 -1
  31. package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-arrow.js +1 -1
  32. package/dist/arrow/renderers/text/conversion/convert-arrow-text-to-attribute.cjs +1 -1
  33. package/dist/arrow/renderers/text/conversion/convert-arrow-text-to-attribute.d.ts +1 -1
  34. package/dist/arrow/renderers/text/conversion/convert-arrow-text-to-attribute.js +1 -1
  35. package/dist/arrow/renderers/text/conversion/convert-arrow-text-vectors.cjs +5 -5
  36. package/dist/arrow/renderers/text/conversion/convert-arrow-text-vectors.d.ts +1 -1
  37. package/dist/arrow/renderers/text/conversion/convert-arrow-text-vectors.js +5 -5
  38. package/dist/arrow/renderers/text/conversion/make-gpu-text-data-from-arrow.cjs +1 -1
  39. package/dist/arrow/renderers/text/conversion/make-gpu-text-data-from-arrow.js +1 -1
  40. package/dist/arrow/renderers/text/renderers/arrow-text-picking.cjs +1 -1
  41. package/dist/arrow/renderers/text/renderers/arrow-text-picking.js +1 -1
  42. package/dist/arrow/renderers/text/renderers/arrow-text-renderer.cjs +5 -5
  43. package/dist/arrow/renderers/text/renderers/arrow-text-renderer.js +5 -5
  44. package/dist/arrow/renderers/text/source/arrow-text-source-mapping.cjs +1 -1
  45. package/dist/arrow/renderers/text/source/arrow-text-source-mapping.js +1 -1
  46. package/dist/compute/computation.cjs +2 -2
  47. package/dist/compute/computation.d.ts +1 -1
  48. package/dist/compute/computation.d.ts.map +1 -1
  49. package/dist/compute/computation.js +2 -2
  50. package/dist/compute/computation.js.map +1 -1
  51. package/dist/compute/texture-transform.d.ts +2 -2
  52. package/dist/compute/texture-transform.d.ts.map +1 -1
  53. package/dist/compute/texture-transform.js.map +1 -1
  54. package/dist/dist.dev.js +395 -322
  55. package/dist/dist.min.js +68 -63
  56. package/dist/experimental/materials/emissive-material.cjs +1 -1
  57. package/dist/experimental/materials/emissive-material.d.ts +1 -1
  58. package/dist/experimental/materials/emissive-material.d.ts.map +1 -1
  59. package/dist/experimental/materials/emissive-material.js +1 -1
  60. package/dist/experimental/materials/emissive-material.js.map +1 -1
  61. package/dist/experimental/materials/glass-material.cjs +1 -1
  62. package/dist/experimental/materials/glass-material.d.ts +1 -1
  63. package/dist/experimental/materials/glass-material.d.ts.map +1 -1
  64. package/dist/experimental/materials/glass-material.js +1 -1
  65. package/dist/experimental/materials/glass-material.js.map +1 -1
  66. package/dist/experimental/materials/glass-transmission.cjs +1 -1
  67. package/dist/experimental/materials/glass-transmission.d.ts +1 -1
  68. package/dist/experimental/materials/glass-transmission.d.ts.map +1 -1
  69. package/dist/experimental/materials/glass-transmission.js +1 -1
  70. package/dist/experimental/materials/glass-transmission.js.map +1 -1
  71. package/dist/experimental/materials/index.cjs.map +1 -1
  72. package/dist/experimental/materials/optical-caustics.cjs +1 -1
  73. package/dist/experimental/materials/optical-caustics.d.ts +1 -1
  74. package/dist/experimental/materials/optical-caustics.d.ts.map +1 -1
  75. package/dist/experimental/materials/optical-caustics.js +1 -1
  76. package/dist/experimental/materials/optical-caustics.js.map +1 -1
  77. package/dist/experimental/materials/optical-point-lights.cjs +1 -1
  78. package/dist/experimental/materials/optical-point-lights.d.ts +1 -1
  79. package/dist/experimental/materials/optical-point-lights.d.ts.map +1 -1
  80. package/dist/experimental/materials/optical-point-lights.js +1 -1
  81. package/dist/experimental/materials/optical-point-lights.js.map +1 -1
  82. package/dist/experimental/materials/reflective-material.cjs +1 -1
  83. package/dist/experimental/materials/reflective-material.d.ts +1 -1
  84. package/dist/experimental/materials/reflective-material.d.ts.map +1 -1
  85. package/dist/experimental/materials/reflective-material.js +1 -1
  86. package/dist/experimental/materials/reflective-material.js.map +1 -1
  87. package/dist/geometry/gpu-geometry.cjs +1 -1
  88. package/dist/geometry/gpu-geometry.d.ts.map +1 -1
  89. package/dist/geometry/gpu-geometry.js +1 -1
  90. package/dist/geometry/gpu-geometry.js.map +1 -1
  91. package/dist/gltf/gltf/gltf-lod.cjs +21 -6
  92. package/dist/gltf/gltf/gltf-lod.d.ts.map +1 -1
  93. package/dist/gltf/gltf/gltf-lod.js +20 -4
  94. package/dist/gltf/gltf/gltf-lod.js.map +1 -1
  95. package/dist/gltf/index.cjs.map +1 -1
  96. package/dist/gltf/types/gltf-json-schema.d.ts +37 -37
  97. package/dist/gltf/types/gltf-json-schema.d.ts.map +1 -1
  98. package/dist/gltf/types/gltf-postprocessed-schema.d.ts +28 -28
  99. package/dist/gltf/types/gltf-postprocessed-schema.d.ts.map +1 -1
  100. package/dist/graph/models/index.cjs.map +1 -1
  101. package/dist/graph/models/path/path-attribute-model.cjs +2 -2
  102. package/dist/graph/models/path/path-attribute-model.d.ts +2 -2
  103. package/dist/graph/models/path/path-attribute-model.js +2 -2
  104. package/dist/graph/models/path/path-storage-model.cjs +1 -1
  105. package/dist/graph/models/path/path-storage-model.d.ts +1 -1
  106. package/dist/graph/models/path/path-storage-model.js +1 -1
  107. package/dist/graph/models/path/path-trips-storage-model.d.ts +2 -2
  108. package/dist/graph/models/polygon/polygon-attribute-model.cjs +2 -2
  109. package/dist/graph/models/polygon/polygon-attribute-model.js +2 -2
  110. package/dist/graph/models/polygon/polygon-storage-model.cjs +2 -2
  111. package/dist/graph/models/polygon/polygon-storage-model.js +2 -2
  112. package/dist/graph/tables/gpu-table-model.cjs +1 -1
  113. package/dist/graph/tables/gpu-table-model.js +1 -1
  114. package/dist/graph/tables/gpu-table-transform.cjs +2 -2
  115. package/dist/graph/tables/gpu-table-transform.d.ts +1 -1
  116. package/dist/graph/tables/gpu-table-transform.js +2 -2
  117. package/dist/graph/tables/index.cjs.map +1 -1
  118. package/dist/index.cjs.map +1 -1
  119. package/dist/model/gpu-vector-model.cjs +104 -79
  120. package/dist/model/gpu-vector-model.d.ts +1 -1
  121. package/dist/model/gpu-vector-model.d.ts.map +1 -1
  122. package/dist/model/gpu-vector-model.js +129 -98
  123. package/dist/model/gpu-vector-model.js.map +1 -1
  124. package/dist/splats/splat-data.cjs +1 -1
  125. package/dist/splats/splat-data.d.ts +1 -1
  126. package/dist/splats/splat-data.js +1 -1
  127. package/dist/splats/splat-renderer.cjs +1 -1
  128. package/dist/splats/splat-renderer.js +1 -1
  129. package/dist/text/experimental.cjs +151 -3
  130. package/dist/text/experimental.d.ts +1 -1
  131. package/dist/text/experimental.d.ts.map +1 -1
  132. package/dist/text/experimental.js +1 -1
  133. package/dist/text/experimental.js.map +1 -1
  134. package/dist/text/index.cjs +41 -3
  135. package/dist/text/index.d.ts +1 -1
  136. package/dist/text/index.d.ts.map +1 -1
  137. package/dist/text/index.js +1 -1
  138. package/dist/text/index.js.map +1 -1
  139. package/dist/text/text-2d/experimental.cjs +128 -18
  140. package/dist/text/text-2d/experimental.d.ts +8 -8
  141. package/dist/text/text-2d/experimental.d.ts.map +1 -1
  142. package/dist/text/text-2d/experimental.js +7 -8
  143. package/dist/text/text-2d/experimental.js.map +1 -1
  144. package/dist/text/text-2d/model-utils/text-model-props.d.ts +1 -1
  145. package/dist/text/text-2d/models/text-attribute-model.cjs +1 -1
  146. package/dist/text/text-2d/models/text-attribute-model.js +1 -1
  147. package/dist/utils/deep-equal.cjs +3 -1
  148. package/dist/utils/deep-equal.d.ts +1 -1
  149. package/dist/utils/deep-equal.d.ts.map +1 -1
  150. package/dist/utils/deep-equal.js +3 -1
  151. package/dist/utils/deep-equal.js.map +1 -1
  152. package/dist/utils/get-platform-info.cjs +9 -3
  153. package/dist/utils/get-platform-info.d.ts +1 -1
  154. package/dist/utils/get-platform-info.d.ts.map +1 -1
  155. package/dist/utils/get-platform-info.js +1 -1
  156. package/dist/utils/get-platform-info.js.map +1 -1
  157. package/package.json +6 -7
  158. package/src/arrow/arrow-geometry.ts +1 -1
  159. package/src/arrow/arrow-picking.ts +2 -2
  160. package/src/arrow/renderers/path/conversion/arrow-path-gpu-vectors.ts +9 -9
  161. package/src/arrow/renderers/path/conversion/arrow-path-storage-gpu-vectors.ts +4 -4
  162. package/src/arrow/renderers/path/source/arrow-path-source-mapping.ts +1 -1
  163. package/src/arrow/renderers/path/transforms/close-arrow-paths.ts +5 -5
  164. package/src/arrow/renderers/path/transforms/gpu-path-float64-deltas.ts +3 -3
  165. package/src/arrow/renderers/path/transforms/path-view-origins.ts +2 -2
  166. package/src/arrow/renderers/polygon/conversion/arrow-polygon-gpu-vectors.ts +1 -1
  167. package/src/arrow/renderers/polygon/renderers/arrow-polygon-renderer.ts +4 -4
  168. package/src/arrow/renderers/polygon/source/arrow-polygon-source-mapping.ts +1 -1
  169. package/src/arrow/renderers/splats/conversion/make-gpu-splat-data-from-arrow.ts +1 -1
  170. package/src/arrow/renderers/text/conversion/convert-arrow-text-to-attribute.ts +2 -2
  171. package/src/arrow/renderers/text/conversion/convert-arrow-text-to-storage.ts +1 -1
  172. package/src/arrow/renderers/text/conversion/convert-arrow-text-vectors.ts +6 -6
  173. package/src/arrow/renderers/text/conversion/make-gpu-text-data-from-arrow.ts +1 -1
  174. package/src/arrow/renderers/text/renderers/arrow-text-picking.ts +1 -1
  175. package/src/arrow/renderers/text/renderers/arrow-text-renderer.ts +5 -5
  176. package/src/arrow/renderers/text/source/arrow-text-source-mapping.ts +1 -1
  177. package/src/compute/computation.ts +5 -3
  178. package/src/compute/texture-transform.ts +2 -2
  179. package/src/experimental/materials/emissive-material.ts +1 -1
  180. package/src/experimental/materials/glass-material.ts +1 -1
  181. package/src/experimental/materials/glass-transmission.ts +1 -1
  182. package/src/experimental/materials/optical-caustics.ts +1 -1
  183. package/src/experimental/materials/optical-point-lights.ts +1 -1
  184. package/src/experimental/materials/reflective-material.ts +1 -1
  185. package/src/experimental/textures/rgba-decoder.ts +1 -1
  186. package/src/geometry/gpu-geometry.ts +1 -4
  187. package/src/gltf/gltf/gltf-lod.ts +22 -4
  188. package/src/gltf/physics/README.md +1 -1
  189. package/src/gltf/types/gltf-json-schema.ts +37 -37
  190. package/src/gltf/types/gltf-postprocessed-schema.ts +28 -28
  191. package/src/graph/models/path/path-attribute-model.ts +3 -3
  192. package/src/graph/models/path/path-storage-model.ts +2 -2
  193. package/src/graph/models/path/path-trips-storage-model.ts +2 -2
  194. package/src/graph/models/polygon/polygon-attribute-model.ts +2 -2
  195. package/src/graph/models/polygon/polygon-storage-model.ts +2 -2
  196. package/src/graph/tables/gpu-table-model.ts +1 -1
  197. package/src/graph/tables/gpu-table-transform.ts +3 -3
  198. package/src/model/gpu-vector-model.ts +147 -120
  199. package/src/splats/splat-data.ts +1 -1
  200. package/src/splats/splat-renderer.ts +1 -1
  201. package/src/text/README.md +1 -1
  202. package/src/text/experimental.ts +122 -1
  203. package/src/text/index.ts +40 -1
  204. package/src/text/text-2d/experimental.ts +104 -8
  205. package/src/text/text-2d/model-utils/text-model-props.ts +1 -1
  206. package/src/text/text-2d/models/text-attribute-model.ts +1 -1
  207. package/src/utils/deep-equal.ts +4 -2
  208. package/src/utils/get-platform-info.ts +1 -1
@@ -14,16 +14,16 @@ import {
14
14
  } from '@luma.gl/engine/models';
15
15
  import {type PolygonBatchProps} from '@luma.gl/graph/experimental/models';
16
16
  import {DataType, RecordBatch, Table, Uint8, Vector} from 'apache-arrow';
17
- import {canConvertColors} from '@luma.gl/gpgpu/arrow';
18
- import {convertArrowToGPUVector} from '@luma.gl/gpgpu/arrow';
19
- import {readArrowGPUVectorAsync} from '@luma.gl/gpgpu/arrow';
17
+ import {canConvertColors} from '@luma.gl/graph/arrow';
18
+ import {convertArrowToGPUVector} from '@luma.gl/graph/arrow';
19
+ import {readArrowGPUVectorAsync} from '@luma.gl/graph/arrow';
20
20
  import {
21
21
  clearArrowPickingState,
22
22
  createArrowPickingManager,
23
23
  resolveArrowPickInfo,
24
24
  runArrowPickingPass
25
25
  } from '../../../arrow-picking';
26
- import {getArrowVectorByteLength} from '@luma.gl/gpgpu/arrow';
26
+ import {getArrowVectorByteLength} from '@luma.gl/graph/arrow';
27
27
  import {
28
28
  convertArrowPolygonToGPUVectorsAsync,
29
29
  type ArrowPolygonColorType,
@@ -8,7 +8,7 @@ import {
8
8
  type ArrowPolygonInputType,
9
9
  type ArrowPolygonSourceVectors
10
10
  } from '@luma.gl/graph/_internal/arrow';
11
- import {getArrowPaths, getArrowVectorByPath} from '@luma.gl/gpgpu/arrow';
11
+ import {getArrowPaths, getArrowVectorByPath} from '@luma.gl/graph/arrow';
12
12
 
13
13
  /** Raw Arrow table or record batch accepted by polygon source mapping helpers. */
14
14
  export type ArrowPolygonSourceData = Table | RecordBatch;
@@ -20,7 +20,7 @@ import {
20
20
  type Table,
21
21
  type Vector
22
22
  } from 'apache-arrow';
23
- import {getArrowDataBufferSource} from '@luma.gl/gpgpu/_internal/arrow';
23
+ import {getArrowDataBufferSource} from '@luma.gl/graph/_internal/arrow';
24
24
 
25
25
  const SPHERICAL_HARMONIC_DC = 0.28209479177387814;
26
26
  const GAUSSIAN_SPLAT_ENCODING_METADATA_KEY = 'loaders_gl.gaussian_splats.encoding';
@@ -5,9 +5,9 @@
5
5
  // luma.gl
6
6
  // SPDX-License-Identifier: MIT
7
7
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
8
- import {makeGPUVectorFromArrow} from '@luma.gl/gpgpu/arrow';
8
+ import {makeGPUVectorFromArrow} from '@luma.gl/graph/arrow';
9
9
  import type {Device} from '@luma.gl/core';
10
- import type {GPUVector} from '@luma.gl/gpgpu/gpu-data';
10
+ import type {GPUVector} from '@luma.gl/graph/gpu-data';
11
11
  import type {TextAttributeModelProps} from '@luma.gl/engine/text-experimental';
12
12
  import {DataType} from 'apache-arrow';
13
13
  import type {ArrowUtf8TextVector} from './arrow-text';
@@ -3,7 +3,7 @@
3
3
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
4
 
5
5
  import type {Device} from '@luma.gl/core';
6
- import type {GPUVector} from '@luma.gl/gpgpu/gpu-data';
6
+ import type {GPUVector} from '@luma.gl/graph/gpu-data';
7
7
  import {DataType} from 'apache-arrow';
8
8
  import {
9
9
  supportsGpuUtf8TextExpansion,
@@ -3,15 +3,15 @@
3
3
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
4
 
5
5
  import {Buffer, type BufferLayout, type Device, type ShaderLayout} from '@luma.gl/core';
6
- import {GPUVector, type GPUData} from '@luma.gl/gpgpu/gpu-data';
6
+ import {GPUVector, type GPUData} from '@luma.gl/graph/gpu-data';
7
7
  import {planGeneratedBufferBatches, type GeneratedBufferBatch} from '@luma.gl/graph/gpu-tables';
8
8
  import {type GPUTableModelProps} from '@luma.gl/engine/tables';
9
- import {expandArrowVector} from '@luma.gl/gpgpu/arrow';
10
- import {getArrowVectorBufferSource, makeArrowFixedSizeListVector} from '@luma.gl/gpgpu/arrow';
9
+ import {expandArrowVector} from '@luma.gl/graph/arrow';
10
+ import {getArrowVectorBufferSource, makeArrowFixedSizeListVector} from '@luma.gl/graph/arrow';
11
11
  import {makeGPUTableFromArrowTable} from '@luma.gl/graph/arrow';
12
- import {makeGPUVectorFromArrow} from '@luma.gl/gpgpu/arrow';
13
- import {getRequiredArrowGPUVectorDataType} from '@luma.gl/gpgpu/_internal/arrow';
14
- import {isNumericArrowType, type NumericArrowType} from '@luma.gl/gpgpu/arrow';
12
+ import {makeGPUVectorFromArrow} from '@luma.gl/graph/arrow';
13
+ import {getRequiredArrowGPUVectorDataType} from '@luma.gl/graph/_internal/arrow';
14
+ import {isNumericArrowType, type NumericArrowType} from '@luma.gl/graph/arrow';
15
15
  import {DynamicBuffer, DynamicTexture} from '@luma.gl/core/dynamic';
16
16
  import {
17
17
  Data,
@@ -5,7 +5,7 @@
5
5
  import type {Device} from '@luma.gl/core';
6
6
  import type {GPUTextData, GPUTextResources, GPUTextStrategy} from '@luma.gl/engine/text';
7
7
  import {createGPUTextData, supportsGpuTextExpansion} from '@luma.gl/engine/text-experimental';
8
- import {GPUVector} from '@luma.gl/gpgpu/gpu-data';
8
+ import {GPUVector} from '@luma.gl/graph/gpu-data';
9
9
  import {DataType, Vector} from 'apache-arrow';
10
10
  import {supportsVertexStorageBuffers} from '../../arrow-renderer-utils';
11
11
  import type {
@@ -9,7 +9,7 @@ import {
9
9
  supportsArrowIndexPicking
10
10
  } from '../../../arrow-picking';
11
11
  import {indexPicking, Model, type PickingManager, type ShaderInputs} from '@luma.gl/engine';
12
- import {getGPUDataBuffersForLayout} from '@luma.gl/gpgpu/gpu-data';
12
+ import {getGPUDataBuffersForLayout} from '@luma.gl/graph/gpu-data';
13
13
  import {type GPUTable} from '@luma.gl/graph/gpu-tables';
14
14
  import {
15
15
  TextAttributeModel,
@@ -4,16 +4,16 @@
4
4
 
5
5
  import {type CommandEncoder, type Device, type ShaderLayout} from '@luma.gl/core';
6
6
  import {getArrowPickingModules, makeArrowRecordBatchSourceInfo} from '../../../arrow-picking';
7
- import {getArrowVectorByteLength} from '@luma.gl/gpgpu/arrow';
7
+ import {getArrowVectorByteLength} from '@luma.gl/graph/arrow';
8
8
  import {
9
9
  makeGPURecordBatchFromArrowRecordBatch,
10
10
  makeGPUTableFromArrowTable
11
11
  } from '@luma.gl/graph/arrow';
12
- import {readArrowGPUVectorAsync} from '@luma.gl/gpgpu/arrow';
13
- import {convertArrowToGPUVector} from '@luma.gl/gpgpu/arrow';
12
+ import {readArrowGPUVectorAsync} from '@luma.gl/graph/arrow';
13
+ import {convertArrowToGPUVector} from '@luma.gl/graph/arrow';
14
14
  import {type ModelProps} from '@luma.gl/engine';
15
15
  import {GLSLShaderAssembler, WGSLShaderAssembler} from '@luma.gl/shaders';
16
- import {GPUVector, getRequiredGPUVector} from '@luma.gl/gpgpu/gpu-data';
16
+ import {GPUVector, getRequiredGPUVector} from '@luma.gl/graph/gpu-data';
17
17
  import {GPURenderable, GPUTable} from '@luma.gl/graph/gpu-tables';
18
18
  import {
19
19
  GPUTextResources,
@@ -21,7 +21,7 @@ import {
21
21
  type FontAtlas,
22
22
  type GPUTextData
23
23
  } from '@luma.gl/engine/text';
24
- import {canConvertColors} from '@luma.gl/gpgpu/arrow';
24
+ import {canConvertColors} from '@luma.gl/graph/arrow';
25
25
  import {
26
26
  TextAttributeModel,
27
27
  TextDictionaryModel,
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {RecordBatch, Table, Vector} from 'apache-arrow';
6
6
  import {isArrowUtf8TextInputVector, type ArrowUtf8TextInputVector} from '../conversion/arrow-text';
7
- import {getArrowPaths, getArrowVectorByPath} from '@luma.gl/gpgpu/arrow';
7
+ import {getArrowPaths, getArrowVectorByPath} from '@luma.gl/graph/arrow';
8
8
 
9
9
  /** Raw Arrow table or record batch accepted by text source mapping helpers. */
10
10
  export type ArrowTextSourceData = Table | RecordBatch;
@@ -137,7 +137,7 @@ export class Computation {
137
137
  readonly pipelineFactory: PipelineFactory;
138
138
  readonly shaderFactory: ShaderFactory;
139
139
 
140
- userData: {[key: string]: any} = {};
140
+ userData: {[key: string]: unknown} = {};
141
141
 
142
142
  /** Bindings (textures, samplers, uniform buffers) */
143
143
  bindings: Record<string, Binding> = {};
@@ -187,9 +187,11 @@ export class Computation {
187
187
  const resolvedPlugins = resolveShaderPlugins(this.props.plugins, platformInfo.shaderLanguage);
188
188
  if (
189
189
  Object.keys(resolvedPlugins.vertexInputs).length > 0 ||
190
- Object.keys(resolvedPlugins.varyings).length > 0
190
+ Object.keys(resolvedPlugins.interStageVariables).length > 0
191
191
  ) {
192
- throw new Error('Computation does not support ShaderPlugin vertex inputs or varyings');
192
+ throw new Error(
193
+ 'Computation does not support ShaderPlugin vertex inputs or interStageVariables'
194
+ );
193
195
  }
194
196
 
195
197
  // Setup shader module inputs
@@ -50,9 +50,9 @@ export class TextureTransform {
50
50
  readonly sampler: Sampler;
51
51
 
52
52
  currentIndex = 0;
53
- samplerTextureMap: Record<string, any> | null = null;
53
+ samplerTextureMap: Record<string, unknown> | null = null;
54
54
  bindings: TextureBinding[] = []; // each element is an object : {sourceTextures, targetTexture, framebuffer}
55
- resources: Record<string, any> = {}; // resources to be deleted
55
+ resources: Record<string, unknown> = {}; // resources to be deleted
56
56
 
57
57
  constructor(device: Device, props: TextureTransformProps) {
58
58
  this.device = device;
@@ -116,5 +116,5 @@ export const emissiveMaterial = {
116
116
  /** Installs portable emissive shading and shared optical-lighting helpers. */
117
117
  export const emissiveMaterialPlugin = {
118
118
  name: 'emissiveMaterial',
119
- modules: [emissiveMaterial as ShaderModule]
119
+ module: emissiveMaterial as ShaderModule
120
120
  } as const satisfies ShaderPlugin;
@@ -603,5 +603,5 @@ export const glassMaterial = {
603
603
  /** Installs the portable glass material and its shared optical-lighting dependency. */
604
604
  export const glassMaterialPlugin = {
605
605
  name: 'glassMaterial',
606
- modules: [glassMaterial as ShaderModule]
606
+ module: glassMaterial as ShaderModule
607
607
  } as const satisfies ShaderPlugin;
@@ -1019,5 +1019,5 @@ export const glassTransmission = {
1019
1019
  /** Installs the optional rasterized transmission extension and its glass-material dependency. */
1020
1020
  export const glassTransmissionPlugin = {
1021
1021
  name: 'glassTransmission',
1022
- modules: [glassTransmission as ShaderModule]
1022
+ module: glassTransmission as ShaderModule
1023
1023
  } as const satisfies ShaderPlugin;
@@ -230,5 +230,5 @@ export const opticalCaustics = {
230
230
  /** Explicitly installs bounded focusing lenses for nearby reflective receiver surfaces. */
231
231
  export const opticalCausticsPlugin = {
232
232
  name: 'opticalCaustics',
233
- modules: [opticalCaustics as ShaderModule]
233
+ module: opticalCaustics as ShaderModule
234
234
  } as const satisfies ShaderPlugin;
@@ -284,5 +284,5 @@ export const opticalPointLights = {
284
284
  /** Explicitly installs bounded point lights and enables illuminated material helpers. */
285
285
  export const opticalPointLightsPlugin = {
286
286
  name: 'opticalPointLights',
287
- modules: [opticalPointLights as ShaderModule]
287
+ module: opticalPointLights as ShaderModule
288
288
  } as const satisfies ShaderPlugin;
@@ -210,5 +210,5 @@ export const reflectiveMaterial = {
210
210
  /** Installs portable reflective surface shading and shared optical-lighting helpers. */
211
211
  export const reflectiveMaterialPlugin = {
212
212
  name: 'reflectiveMaterial',
213
- modules: [reflectiveMaterial as ShaderModule]
213
+ module: reflectiveMaterial as ShaderModule
214
214
  } as const satisfies ShaderPlugin;
@@ -3,7 +3,7 @@
3
3
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
4
 
5
5
  /** @todo - import from texture-types */
6
- // import { type TextureFormatPacked } from "../../../../engine/src/experimental/textures/texture-format-types";
6
+ // import { type TextureFormatPacked } from "./texture-format-types";
7
7
  export type TextureFormatPacked =
8
8
  | 'rgba4unorm-webgl'
9
9
  | 'rgb565unorm-webgl'
@@ -5,10 +5,7 @@
5
5
  import type {PrimitiveTopology, BufferLayout} from '@luma.gl/core';
6
6
  import {Device, Buffer} from '@luma.gl/core';
7
7
  import type {Geometry} from '@math.gl/geometry';
8
- import {
9
- getBufferLayoutFromGeometryAttributes,
10
- getGeometryShaderAttributeName
11
- } from '../geometry/geometry';
8
+ import {getBufferLayoutFromGeometryAttributes, getGeometryShaderAttributeName} from './geometry';
12
9
  import {makeInterleavedGeometry} from './geometry-utils';
13
10
  import {uid} from '../utils/uid';
14
11
 
@@ -72,7 +72,8 @@ export function getGLTFNodeLODs(
72
72
  uniqueNodeIndices.add(nodeIndex);
73
73
  }
74
74
 
75
- const authoredCoverage = sourceNode.extras?.['MSFT_screencoverage'];
75
+ const sourceExtras = getExtrasObject(sourceNode.extras);
76
+ const authoredCoverage = sourceExtras?.['MSFT_screencoverage'];
76
77
  const screenCoverage = resolveScreenCoverage(
77
78
  nodeIndices.length,
78
79
  Array.isArray(authoredCoverage) ? authoredCoverage : undefined
@@ -150,6 +151,7 @@ export function generateGLTFLODLevels(
150
151
  continue;
151
152
  }
152
153
 
154
+ const simplifiedMeshExtras = getExtrasObject(simplifiedMesh.extras);
153
155
  meshes.push(simplifiedMesh);
154
156
  const alternativeNodeIndex = nodes.length;
155
157
  alternativeNodeIndices.push(alternativeNodeIndex);
@@ -160,7 +162,9 @@ export function generateGLTFLODLevels(
160
162
  mesh: simplifiedMesh,
161
163
  children: undefined,
162
164
  extensions: undefined,
163
- extras: {geometricError: simplifiedMesh.extras?.['geometricError']}
165
+ extras: {
166
+ geometricError: simplifiedMeshExtras?.['geometricError']
167
+ }
164
168
  });
165
169
  }
166
170
 
@@ -170,8 +174,9 @@ export function generateGLTFLODLevels(
170
174
  ...sourceNode.extensions,
171
175
  [LOD_EXTENSION_NAME]: {ids: alternativeNodeIndices}
172
176
  };
177
+ const sourceExtras = getExtrasObject(sourceNode.extras);
173
178
  sourceNode.extras = {
174
- ...sourceNode.extras,
179
+ ...sourceExtras,
175
180
  MSFT_screencoverage: resolveScreenCoverage(
176
181
  alternativeNodeIndices.length + 1,
177
182
  options.screenCoverage
@@ -295,15 +300,28 @@ function simplifyGLTFMesh(
295
300
  return null;
296
301
  }
297
302
 
303
+ const sourceExtras = getExtrasObject(sourceMesh.extras);
298
304
  return {
299
305
  ...sourceMesh,
300
306
  id: `${sourceMesh.id}-lod-${suffix}`,
301
307
  name: `${sourceMesh.name || sourceMesh.id} LOD ${suffix}`,
302
308
  primitives,
303
- extras: {...sourceMesh.extras, geometricError}
309
+ extras: {...sourceExtras, geometricError}
304
310
  };
305
311
  }
306
312
 
313
+ /** Preserve object-spread behavior for arbitrary glTF extras. */
314
+ function getExtrasObject(extras: unknown): Record<string, unknown> {
315
+ if (isExtrasObject(extras)) {
316
+ return extras;
317
+ }
318
+ return typeof extras === 'string' ? Object.fromEntries(Object.entries(extras)) : {};
319
+ }
320
+
321
+ function isExtrasObject(extras: unknown): extras is Record<string, unknown> {
322
+ return typeof extras === 'object' && extras !== null;
323
+ }
324
+
307
325
  /** glTF component types are numeric even though loaders.gl's shared table type also includes BigInt. */
308
326
  function getNumericAccessorValues(
309
327
  accessor: GLTFAccessorPostprocessed
@@ -3,7 +3,7 @@
3
3
  `@luma.gl/engine/gltf-physics` is an optional WebGPU physics adapter. It imports **raw glTF
4
4
  JSON**, such as loaders.gl's `loadedAsset.json`, before node references are replaced
5
5
  with postprocessed objects. Normal glTF rendering does not import or start physics.
6
- Install the optional `@luma.gl/gpgpu` peer when using this subpath.
6
+ Install the optional `@luma.gl/graph/gpu-simple-graph` peer when using this subpath.
7
7
 
8
8
  ```typescript
9
9
  import {parseGLTFPhysics, createGLTFPhysicsWorld} from '@luma.gl/engine/gltf-physics';
@@ -25,7 +25,7 @@ export type GLTFAccessorSparseIndices = {
25
25
  */
26
26
  componentType: 5121 | 5123 | 5125 | number;
27
27
  extensions?: Record<string, any>;
28
- extras?: any;
28
+ extras?: unknown;
29
29
  // [k: string]: any;
30
30
  };
31
31
 
@@ -42,7 +42,7 @@ export type GLTFAccessorSparseValues = {
42
42
  */
43
43
  byteOffset?: number;
44
44
  extensions?: Record<string, any>;
45
- extras?: any;
45
+ extras?: unknown;
46
46
  // [k: string]: any;
47
47
  };
48
48
 
@@ -63,7 +63,7 @@ export type GLTFAccessorSparse = {
63
63
  */
64
64
  values: GLTFAccessorSparseValues;
65
65
  extensions?: Record<string, any>;
66
- extras?: any;
66
+ extras?: unknown;
67
67
  // [k: string]: any;
68
68
  };
69
69
 
@@ -121,7 +121,7 @@ export type GLTFAccessor = {
121
121
  sparse?: GLTFAccessorSparse;
122
122
  name?: any;
123
123
  extensions?: Record<string, any>;
124
- extras?: any;
124
+ extras?: unknown;
125
125
  // [k: string]: any;
126
126
  };
127
127
 
@@ -138,7 +138,7 @@ export type GLTFAnimationChannelTarget = {
138
138
  */
139
139
  path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
140
140
  extensions?: Record<string, any>;
141
- extras?: any;
141
+ extras?: unknown;
142
142
  // [k: string]: any;
143
143
  };
144
144
 
@@ -155,7 +155,7 @@ export type GLTFAnimationChannel = {
155
155
  */
156
156
  target: GLTFAnimationChannelTarget;
157
157
  extensions?: Record<string, any>;
158
- extras?: any;
158
+ extras?: unknown;
159
159
  // [k: string]: any;
160
160
  };
161
161
 
@@ -176,7 +176,7 @@ export type GLTFAnimationSampler = {
176
176
  */
177
177
  output: GLTFId;
178
178
  extensions?: Record<string, any>;
179
- extras?: any;
179
+ extras?: unknown;
180
180
  // [k: string]: any;
181
181
  };
182
182
 
@@ -194,7 +194,7 @@ export type GLTFAnimation = {
194
194
  samplers: GLTFAnimationSampler[];
195
195
  name?: any;
196
196
  extensions?: Record<string, any>;
197
- extras?: any;
197
+ extras?: unknown;
198
198
  // [k: string]: any;
199
199
  };
200
200
 
@@ -224,7 +224,7 @@ export type GLTFAsset = {
224
224
  */
225
225
  thumbnail?: GLTFId;
226
226
  extensions?: Record<string, any>;
227
- extras?: any;
227
+ extras?: unknown;
228
228
  // [k: string]: any;
229
229
  };
230
230
 
@@ -247,7 +247,7 @@ export type GLTFBuffer = {
247
247
  byteLength: number;
248
248
  name?: any;
249
249
  extensions?: Record<string, any>;
250
- extras?: any;
250
+ extras?: unknown;
251
251
  // [k: string]: any;
252
252
  };
253
253
 
@@ -277,7 +277,7 @@ export type GLTFBufferView = {
277
277
  target?: 34962 | 34963 | number;
278
278
  name?: any;
279
279
  extensions?: Record<string, any>;
280
- extras?: any;
280
+ extras?: unknown;
281
281
  // [k: string]: any;
282
282
  };
283
283
 
@@ -302,7 +302,7 @@ export type GLTFCameraOrthographic = {
302
302
  */
303
303
  znear: number;
304
304
  extensions?: Record<string, any>;
305
- extras?: any;
305
+ extras?: unknown;
306
306
  // [k: string]: any;
307
307
  };
308
308
 
@@ -327,7 +327,7 @@ export type GLTFCameraPerspective = {
327
327
  */
328
328
  znear: number;
329
329
  extensions?: Record<string, any>;
330
- extras?: any;
330
+ extras?: unknown;
331
331
  // [k: string]: any;
332
332
  };
333
333
 
@@ -349,7 +349,7 @@ export type GLTFCamera = {
349
349
  type: 'perspective' | 'orthographic' | string;
350
350
  name?: any;
351
351
  extensions?: Record<string, any>;
352
- extras?: any;
352
+ extras?: unknown;
353
353
  // [k: string]: any;
354
354
  };
355
355
 
@@ -371,7 +371,7 @@ export type GLTFImage = {
371
371
  bufferView?: GLTFId;
372
372
  name?: any;
373
373
  extensions?: Record<string, any>;
374
- extras?: any;
374
+ extras?: unknown;
375
375
  // [k: string]: any;
376
376
  };
377
377
 
@@ -388,7 +388,7 @@ export type GLTFFile = {
388
388
  /** Name used to resolve references from embedded packaged assets. */
389
389
  name?: string;
390
390
  extensions?: Record<string, any>;
391
- extras?: any;
391
+ extras?: unknown;
392
392
  };
393
393
 
394
394
  /**
@@ -400,7 +400,7 @@ export type GLTFExternalAsset = {
400
400
  /** Optional application-facing name for this external asset. */
401
401
  name?: string;
402
402
  extensions?: Record<string, any>;
403
- extras?: any;
403
+ extras?: unknown;
404
404
  };
405
405
 
406
406
  /**
@@ -418,7 +418,7 @@ export type GLTFTextureInfo = {
418
418
  */
419
419
  texCoord?: number;
420
420
  extensions?: Record<string, any>;
421
- extras?: any;
421
+ extras?: unknown;
422
422
  // [k: string]: any;
423
423
  };
424
424
 
@@ -463,7 +463,7 @@ export type GLTFMaterialPbrMetallicRoughness = {
463
463
  */
464
464
  metallicRoughnessTexture?: GLTFTextureInfo;
465
465
  extensions?: Record<string, any>;
466
- extras?: any;
466
+ extras?: unknown;
467
467
  // [k: string]: any;
468
468
  };
469
469
  export type GLTFMaterialNormalTextureInfo = {
@@ -474,7 +474,7 @@ export type GLTFMaterialNormalTextureInfo = {
474
474
  */
475
475
  scale?: number;
476
476
  extensions?: Record<string, any>;
477
- extras?: any;
477
+ extras?: unknown;
478
478
  // [k: string]: any;
479
479
  };
480
480
  export type GLTFMaterialOcclusionTextureInfo = {
@@ -485,7 +485,7 @@ export type GLTFMaterialOcclusionTextureInfo = {
485
485
  */
486
486
  strength?: number;
487
487
  extensions?: Record<string, any>;
488
- extras?: any;
488
+ extras?: unknown;
489
489
  // [k: string]: any;
490
490
  };
491
491
 
@@ -495,7 +495,7 @@ export type GLTFMaterialOcclusionTextureInfo = {
495
495
  export type GLTFMaterial = {
496
496
  name?: any;
497
497
  extensions?: Record<string, any>;
498
- extras?: any;
498
+ extras?: unknown;
499
499
  /**
500
500
  * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of `pbrMetallicRoughness` apply.
501
501
  */
@@ -560,7 +560,7 @@ export type GLTFMeshPrimitive = {
560
560
  [k: string]: GLTFId;
561
561
  }[];
562
562
  extensions?: Record<string, unknown>;
563
- extras?: any;
563
+ extras?: unknown;
564
564
  /** Loader-derived primitive-restart topology. This property is not serialized by glTF. */
565
565
  primitiveRestart?: import('./gltf-types').GLTFPrimitiveRestartData;
566
566
  // [k: string]: any;
@@ -582,7 +582,7 @@ export type GLTFMesh = {
582
582
  weights?: number[];
583
583
  name?: any;
584
584
  extensions?: Record<string, any>;
585
- extras?: any;
585
+ extras?: unknown;
586
586
  // [k: string]: any;
587
587
  };
588
588
 
@@ -632,7 +632,7 @@ export type GLTFNode = {
632
632
  weights?: number[];
633
633
  name?: any;
634
634
  extensions?: Record<string, any>;
635
- extras?: any;
635
+ extras?: unknown;
636
636
  // [k: string]: any;
637
637
  };
638
638
 
@@ -658,7 +658,7 @@ export type GLTFSampler = {
658
658
  wrapT?: 33071 | 33648 | 10497 | number;
659
659
  name?: any;
660
660
  extensions?: Record<string, any>;
661
- extras?: any;
661
+ extras?: unknown;
662
662
  // [k: string]: any;
663
663
  };
664
664
 
@@ -672,7 +672,7 @@ export type GLTFScene = {
672
672
  nodes?: GLTFId[];
673
673
  name?: any;
674
674
  extensions?: Record<string, any>;
675
- extras?: any;
675
+ extras?: unknown;
676
676
  // [k: string]: any;
677
677
  };
678
678
 
@@ -693,7 +693,7 @@ export type GLTFSkin = {
693
693
  joints: GLTFId[];
694
694
  name?: any;
695
695
  extensions?: Record<string, any>;
696
- extras?: any;
696
+ extras?: unknown;
697
697
  // [k: string]: any;
698
698
  };
699
699
 
@@ -707,7 +707,7 @@ export type GLTFTexture = {
707
707
  source?: GLTFId;
708
708
  name?: any;
709
709
  extensions?: Record<string, any>;
710
- extras?: any;
710
+ extras?: unknown;
711
711
  // [k: string]: any;
712
712
  };
713
713
 
@@ -827,7 +827,7 @@ export type GLTF_KHR_binary_glTF = {
827
827
  mimeType?: string;
828
828
  height?: number;
829
829
  width?: number;
830
- extras?: any;
830
+ extras?: unknown;
831
831
  };
832
832
 
833
833
  /**
@@ -836,7 +836,7 @@ export type GLTF_KHR_binary_glTF = {
836
836
  export type GLTF_KHR_draco_mesh_compression = {
837
837
  bufferView: GLTFId;
838
838
  attributes: {[name: string]: number};
839
- extras?: any;
839
+ extras?: unknown;
840
840
  };
841
841
 
842
842
  /**
@@ -844,7 +844,7 @@ export type GLTF_KHR_draco_mesh_compression = {
844
844
  */
845
845
  export type GLTF_KHR_texture_basisu = {
846
846
  source: GLTFId;
847
- extras?: any;
847
+ extras?: unknown;
848
848
  };
849
849
 
850
850
  /**
@@ -871,7 +871,7 @@ export type GLTF_EXT_meshopt_compression = {
871
871
  /** EXT post-decode filter; defaults to `NONE` and is valid only for `ATTRIBUTES` mode. */
872
872
  filter?: 'NONE' | 'OCTAHEDRAL' | 'QUATERNION' | 'EXPONENTIAL';
873
873
  /** Application-specific extension data. */
874
- extras?: any;
874
+ extras?: unknown;
875
875
  };
876
876
 
877
877
  /**
@@ -900,7 +900,7 @@ export type GLTF_KHR_meshopt_compression = {
900
900
  /** KHR post-decode filter; defaults to `NONE` and is valid only for `ATTRIBUTES` mode. */
901
901
  filter?: 'NONE' | 'OCTAHEDRAL' | 'QUATERNION' | 'EXPONENTIAL' | 'COLOR';
902
902
  /** Application-specific extension data. */
903
- extras?: any;
903
+ extras?: unknown;
904
904
  };
905
905
 
906
906
  /**
@@ -908,7 +908,7 @@ export type GLTF_KHR_meshopt_compression = {
908
908
  */
909
909
  export type GLTF_EXT_texture_webp = {
910
910
  source: GLTFId;
911
- extras?: any;
911
+ extras?: unknown;
912
912
  };
913
913
 
914
914
  /**
@@ -918,7 +918,7 @@ export type GLTF_EXT_texture_avif = {
918
918
  /** Index of the AVIF image used in place of the ordinary texture source. */
919
919
  source: GLTFId;
920
920
  /** Application-specific extension data. */
921
- extras?: any;
921
+ extras?: unknown;
922
922
  };
923
923
 
924
924
  /**
@@ -926,5 +926,5 @@ export type GLTF_EXT_texture_avif = {
926
926
  */
927
927
  export type GLTF_MSFT_texture_dds = {
928
928
  source: GLTFId;
929
- extras?: any;
929
+ extras?: unknown;
930
930
  };