visgl / visgl/deck.gl

[Feat]: Allow modelMatrix in SolidPolygonLayer to be data-driven like getPolygon

Open
#9,828 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

When rendering multiple dynamic geometries (e.g., polygons, extruded buildings, cubes), each instance may have its own rotation, translation, or scaling.
Currently, this often requires creating multiple layers with different modelMatrix values, which increases memory usage and render overhead.
By allowing modelMatrix to be data-driven—similar to how getPolygon, getOrientation, works—each instance can define its own transformation within a single layer.

Proposal

Add a new accessor such as getModelMatrix to SolidPolygonLayer, SimpleMeshLayer, PathLayer, and other layers that support transformations:
new SolidPolygonLayer({ data, getPolygon: d => d.polygon, getOrientation: d=> [0, d.yaw,0] getModelMatrix: d => d.modelMatrix })
This change would make it easier to render many instances with independent transformations within a single layer, improving both performance and API consistency.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing SolidPolygonLayer, SimpleMeshLayer, and PathLayer, focusing on how their existing getPolygon and getOrientation accessors handle transformations. Determine the intended getModelMatrix API and which transformation-capable layers belong in scope; done means per-instance model matrices work in a single layer with appropriate coverage and regression tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.