Skip to content

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

@xiaomo1q

Description

@xiaomo1q

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions