Skip to content

RFC: propose @deck.gl-community/cosmos-layers - #704

Draft
ibgreen wants to merge 1 commit into
masterfrom
agent/cosmos-layers-rfc
Draft

RFC: propose @deck.gl-community/cosmos-layers#704
ibgreen wants to merge 1 commit into
masterfrom
agent/cosmos-layers-rfc

Conversation

@ibgreen

@ibgreen ibgreen commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • adds an RFC for a new opt-in @deck.gl-community/cosmos-layers package backed by @cosmos.gl/graph
  • evaluates a CPU-readback CosmosLayout prototype and a shared-device, zero-copy CosmosGraphLayer
  • recommends the shared-device design as the production architecture
  • documents lifecycle, coordinate-system, testing, benchmark, release, and maintenance requirements
  • adds the RFC to the documentation sidebar

Motivation

cosmos.gl provides a compelling GPU force simulation, but its current high-level Graph API owns the canvas, render loop, render passes, interactions, and synchronous position readback. Wrapping that API directly would either create a second-canvas overlay that is not a true deck.gl layer or lose the main performance benefit through per-tick GPU-to-CPU copies.

The RFC establishes a package boundary and a phased path before implementation begins.

Proposed direction

  1. Keep the dependency isolated in a separate cosmos-layers package.
  2. Use an experimental, throttled readback adapter only for semantic validation and benchmarks.
  3. Require shared-device, externally scheduled, zero-copy operation for a production CosmosGraphLayer.
  4. Coordinate upstream cosmos.gl improvements, including a simulation-only API, optional DOM/canvas ownership, external scheduling, read-only GPU position resources, host render-pass support, efficient snapshots, indexed point pinning, luma.gl dependency alignment, and backend capability reporting.

Impact

This PR is documentation-only. It does not add dependencies, runtime code, or a published package. The open questions in the RFC are intended to guide deck.gl-community and cosmos.gl maintainer discussion.

Validation

  • yarn lint
  • yarn test-node — 168 files passed, 1,417 tests passed, 9 skipped
  • cd website && yarn build

The website build completed successfully with existing dependency-age and CSS-minifier warnings.

@github-actions

Copy link
Copy Markdown

Coverage

Stmts: 51.01% | Branch: 42.11% | Funcs: 49.15% | Lines: 51.12%

Test Files 168 passed (168)

@ibgreen

ibgreen commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

@rokotyan @Stukova

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.

1 participant