Please export `getAccessorFromBuffer`
Target Use case
I am working on a CompositeLayer that needs to iterate though the data in the CPU on updateState before passing to the render method. While it would be technically possible to require the data to be in a particular format, or otherwise handle the processing of that data prior to passing to the layer, I would prefer that the data format be flexible and consistent with other layers that I'm building.
For that reason, I am trying to implement the accessor pattern inside the updateState method, and would like it to be able to accept binary attributes, whether they are as a luma Buffer or a TypedArray, and the various props to handle interleaved data, as well as falling back to the getPosition accessor function that is optionally passed.
I noticed the getAccessorFromBuffer function here:
https://github.com/visgl/deck.gl/blob/8.6-release/modules/core/src/utils/iterable-utils.js
Yet, it is not exported by @deck.gl/core (yet createIterable is).
It would be helpful if either that was exported, or otherwise some general pattern were provided for iterating over an accessor in a CompositeLayer.
It would make it possible to iterate over an accessor in a CompositeLayer, regardless of how the data is passed, allowing for all layers in a project to accept the same inputs.
Proposed feature
Export getAccessorFromBuffer.
To Do List
- [ ] Add label and assign to milestone
- [ ] Coding
- [ ] Doc update
- [ ] What’s new update
- [ ] Test