deck.gl
deck.gl copied to clipboard
feat(core): Explicitly set stepMode in Attribute layout
Closes #8849
This proposed fix adds a stepMode attribute setting. If set to dynamic, it will be resolved to one of vertex and instance based on whether the target model is instanced. With this change I'm able to remove much redundancy from layers/extensions where the same buffer is shared between instanced and non-instanced models.
Change List
- Remove
divisorfrom attribute and shader attribute settings. While this is a breaking change,- Setting it does nothing as of v9.0
- Moving forward, we won't be able to make it work exactly like v8, due to luma API changes
- Most custom layers use
AttributeManager.addandAttributeManager.addInstancedinstead of explicitly settingdivisor, so the impact will be low
- Add
stepModeto attribute settings - SolidPolygonLayer
- BrushingExtension
- DataFilterExtension
- CollisionFilterExtension
- FillStyleExtension
- Unit tests
- Documentation and upgrade guide
coverage: 89.806% (-0.02%) from 89.826% when pulling 86b688b23527686c03d3eabb78e6e956b5bdfdcf on x/instanced-attribute into fd3aa4c16d4b73e23c87ff46385bfd88c7312f3e on master.
Happy to see the number of #ifdefs dropping in the shaders as a result