Skip to content

feat(mesh-layers): accept Scenegraph Arrow and GPUVector columns - #11059

Merged
ibgreen merged 9 commits into
masterfrom
codex/arrow-scenegraph
Nov 7, 2026
Merged

ibgreen merged 9 commits into
masterfrom
codex/arrow-scenegraph

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Background

ScenegraphLayer requires instance accessors. It now accepts positions and colors columns while preserving glTF models, materials, and animation.

Change List

  • Add Scenegraph instance columns and chunk picking offsets
  • Share transform preparation with SimpleMeshLayer
  • Borrow compatible GPUVectors through shared column handling
  • Cover transform precedence, lifecycle, picking, and borrowed buffer ownership
  • Reuse the suite WebGL device in backend tests
  • Documentation

Focused Node, WebGL, WebGPU tests and lint passed. Local package build passed through mesh-layers; full build failed on Jupyter dependency type portability.

@ibgreen
ibgreen force-pushed the codex/arrow-scenegraph branch from 23a71b8 to 8d43f21 Compare November 7, 2026 18:26
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues.

Summary

ScenegraphLayer accepts Arrow and borrowed GPUVector position and color columns while keeping existing models, materials, and animations.

  • Scenegraph instances can use Arrow columns or GPU vectors for positions and colors.
  • Shared column inputs can now use compatible GPU vectors.

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.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Arrow columns] --> C[LayerColumns]
  B[Borrowed GPUVectors] --> C
  D[Accessors and binary transforms] --> E[Shared mesh transform preparation]
  E --> C
  C --> F[Aligned instance batches]
  G[Existing glTF models and materials] --> H[Scenegraph draw]
  F --> H
  H --> I[Picking with global row offsets]
Loading

Reviews (6) · Last reviewed commit: "Clarify shared mesh column documentation" · Reviewed by Greptile

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

@ibgreen
ibgreen force-pushed the codex/arrow-scenegraph branch from 3746a0a to 3464f9c Compare November 7, 2026 18:52
@coveralls

coveralls commented Nov 7, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 84.683% (+0.01%) from 84.671% — codex/arrow-scenegraph into master

@ibgreen
ibgreen merged commit dc9dae5 into master Nov 7, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/arrow-scenegraph branch November 7, 2026 19:18

@chrisgervang chrisgervang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +320 to +330
### 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 108 to 113
/** 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>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: The new lines landed between getPosition and its comment, so getPosition has no TSDoc now. Could the order and wording match SimpleMeshLayer?

Suggested change
/** 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>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants