-
Couldn't load subscription status.
- Fork 2.2k
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.