-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for updating point metadata without recreating coordinate index #174
Comments
This is a great idea and certainly a feature I'd be happy to add. Technically I think there are a few ways to achieve this and they might all be useful to have on their own:
What about the following non-breaking API changes to type Draw = (
data:
| number[][]
| Partial<{ x: number[] | Float32Array, y: number: [] | Float32Array, ... }>
| Partial<DrawData>,
options: Partial<{
showPointConnectionsOnce: boolean,
transition: boolean,
transitionDuration: number,
transitionEasing: string,
preventFilterReset: boolean,
hover: number,
select: number[],
filter: number[],
zDataType: 'continuous' | 'categorical',
wDataType: 'continuous' | 'categorical',
// NEW
kdbushIndex: ArrayBuffer
}>
) => Promise<void>;
interface DrawData {
points: Partial<Points> | Float32Array,
connections: number[][],
}
interface Points {
x: number[] | Float32Array,
x: number[] | Float32Array,
z: number[] | Float32Array,
w: number[] | Float32Array,
} |
In terms of API changes, your I especially like option |
@TheStanian It took a bit but I finally managed to support skipping the spatial index computation. See #178 for an example. While I haven't had time to implement drawing of partial data, you can now precompute the spatial index (in a worker or main thread) and pass that index in with the draw call: I'm still planning to add drawing of partial data (e.g., |
Right now, the only way of updating the point metadata (valueA and valueB, or whichever alias you prefer) is to do a full draw call including coordinate data. I have a specific application in which only the color indices for the points would change, leading to the rebuilding of the KDBush, which is in this case a major unnecessary slowdown (10m+ points). I would like to see a way to change only the point metadata, so the rebuild doesn't need to occur. This could for example take the form of taking the existing state texture management as used in setPoints and exposing that on its own, using the currently available points. Doing so would not break backwards compatibility with anything whatsoever.
Thank you for your consideration and with kind regards,
Stan
The text was updated successfully, but these errors were encountered: