Skip to content

feat(mesh-layers): honor Deck normalized colors - #11162

Merged
ibgreen merged 4 commits into
masterfrom
codex/normalized-mesh-colors
Nov 18, 2026
Merged

ibgreen merged 4 commits into
masterfrom
codex/normalized-mesh-colors

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

For #11146

Background

SimpleMeshLayer and ScenegraphLayer now accept 0–1 plain-array instance colors when Deck enables normalizedColors.

Change List

  • Apply the Deck convention to attributes and Arrow fallbacks
  • Preserve the byte default for each mesh layer
  • Document normalized instance colors

Verified with yarn lint and four Scenegraph column tests.


Note

Low Risk
Low risk; extends existing color normalization conventions to mesh layers without changing default behavior or affecting critical infrastructure.

Overview
Enables SimpleMeshLayer and ScenegraphLayer to honor Deck's normalizedColors setting, allowing getColor accessors and plain-array instance colors to be interpreted as 0–1 channels while preserving byte defaults for unauthored colors.

In both layers, tags the instanceColors attribute with semanticType: 'color' and forwards normalizedColors through the LayerColumns update pipeline for Arrow column fallbacks. Also updates the corresponding API reference documentation and adds unit test coverage for color normalization and fallback behavior.

Reviewed by Cursor Bugbot for commit b43431f. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T20:49:38.647467Z 1e07c63 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibgreen ibgreen mentioned this pull request Nov 17, 2026
22 of 52 tasks
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no new blocking issues were found.

Summary

SimpleMeshLayer and ScenegraphLayer now honor Deck’s normalizedColors option for plain-array instance colors while keeping their byte defaults.

  • Mesh layers read plain-array colors using Deck’s normalizedColors setting.

Reviews (3) · Last reviewed commit: "Merge branch 'master' of github.com:visg..." · Reviewed by Greptile

@coveralls

coveralls commented Nov 17, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.727%. remained the same — codex/normalized-mesh-colors into master

@ibgreen
ibgreen merged commit e2a7257 into master Nov 18, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/normalized-mesh-colors branch November 18, 2026 00:04

@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 b43431f after merge; follow-ups below. One P1: the ScenegraphLayer getColor default is documented as black. 3b0be38 added mesh tests for both layers and the deck.md line.

Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.


Generated by Claude Code


#### `getColor` (constant | Accessor | arrow.Vector, optional) ![transition-enabled](https://img.shields.io/badge/transition-enabled-green.svg?style=flat-square") {#getcolor}

- Default: `[0, 0, 0, 255]`

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.

P1: The documented default is black. ScenegraphLayer defaults to white (DEFAULT_COLOR at scenegraph-layer.ts:56). This is older than this PR. Could we fix it?

Suggested change
- Default: `[0, 0, 0, 255]`
- Default: `[255, 255, 255, 255]`

Generated by Claude Code

An Arrow vector supplies one value per object. See [position columns](../../developer-guide/using-with-arrow.md#positions-and-other-vectors) for requirements.


Deck’s [`normalizedColors`](../core/deck.md#normalizedcolors) lets top-level layers accept 0–1 plain-array instance colors. Byte defaults, typed arrays, and binary inputs retain their encoding.

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: This paragraph repeats the getColor text below, and it renders at the end of getPosition. Could we delete it here and in scenegraph-layer.md?

Suggested change
Deck’s [`normalizedColors`](../core/deck.md#normalizedcolors) lets top-level layers accept 0–1 plain-array instance colors. Byte defaults, typed arrays, and binary inputs retain their encoding.

Generated by Claude Code

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

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