Repository navigation
feat(mesh-layers): accept Scenegraph Arrow and GPUVector columns - #11059
Conversation
23a71b8 to
8d43f21
Compare
[Medium impact] The PR appears safe to merge, with no new actionable issues. Summary
All previous findings were fixed or withdrawn. ibgreen accepted omitting release notes because the maintainer requested no release note for these column ports; usage and limits remain in the API reference.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3746a0a. Configure here.
3746a0a to
3464f9c
Compare
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed fec321d after merge; follow-ups below. No P1s. The new column props need prop entries in the SimpleMeshLayer format.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
| ### Instance columns | ||
|
|
||
| `positions` and `colors` accept Arrow columns or compatible GPUVectors in instance | ||
| order. Positions use three components and GPU colors use `unorm8x4`. Omitted | ||
| columns use the corresponding accessors. Instance transform accessors continue to | ||
| control orientation, scale, translation, and transform matrices. | ||
|
|
||
| Aligned chunks preserve global picking indices. `numInstances` defaults to the | ||
| column length. GPUVectors and their buffers remain caller-owned. GPU-only positions | ||
| cannot be CPU-preprojected and do not provide CPU bounds. Column inputs currently | ||
| require extensions and transitions to be disabled. |
There was a problem hiding this comment.
P2: positions and colors sit as prose under ## Source, with no type or default. #11030 had the same layout and moved to #### entries (thread). Most of the second paragraph repeats Using with Arrow.
Could this match SimpleMeshLayer's ### Arrow Columns block, placed after getTransformMatrix, with the GPU rules as Remarks?
### Arrow Columns
See [Using with Arrow](../../developer-guide/using-with-arrow.md) for shared input requirements and limitations.
#### `positions` (Arrow Vector | GPUVector, optional) {#positions}
* Default: `null`
Numeric XY or XYZ fixed-size lists, or a `float32x3` GPUVector, specifying instance anchors. Overrides [`getPosition`](#getposition).
#### `colors` (Arrow Vector | GPUVector, optional) {#colors}
* Default: `null`
RGB or RGBA fixed-size lists, or a `unorm8x4` GPUVector, specifying instance colors. Overrides [`getColor`](#getcolor).## Remarks
- Keep GPUVector inputs alive while the layer uses them, and release them yourself.
- GPU-only `positions` don't report bounds and can't be used when the layer's source CRS is converted on the CPU.| /** Anchor position accessor. */ | ||
| /** Arrow column or GPUVector of instance positions. */ | ||
| positions?: ColumnSource | null; | ||
| /** Arrow column or GPUVector of instance colors. */ | ||
| colors?: ColumnSource | null; | ||
| getPosition?: Accessor<DataT, Position>; |
There was a problem hiding this comment.
Non-blocking: The new lines landed between getPosition and its comment, so getPosition has no TSDoc now. Could the order and wording match SimpleMeshLayer?
| /** Anchor position accessor. */ | |
| /** Arrow column or GPUVector of instance positions. */ | |
| positions?: ColumnSource | null; | |
| /** Arrow column or GPUVector of instance colors. */ | |
| colors?: ColumnSource | null; | |
| getPosition?: Accessor<DataT, Position>; | |
| /** Arrow XY or XYZ instance anchors, or a `float32x3` GPUVector. Overrides `getPosition`. */ | |
| positions?: ColumnSource | null; | |
| /** Arrow RGB or RGBA instance colors, or a `unorm8x4` GPUVector. Overrides `getColor`. */ | |
| colors?: ColumnSource | null; | |
| /** Anchor position accessor. */ | |
| getPosition?: Accessor<DataT, Position>; |

Background
ScenegraphLayer requires instance accessors. It now accepts
positionsandcolorscolumns while preserving glTF models, materials, and animation.Change List
Focused Node, WebGL, WebGPU tests and lint passed. Local package build passed through mesh-layers; full build failed on Jupyter dependency type portability.