Control Scenegraph position interpolation with a time controller #9031
Replies: 3 comments 2 replies
-
I'm working on the same problem right now. For now, I'm just trying to see if I can use a similar method to the For now, I have something like this: export type MyCustomLayerProps<DataT> = {
currentTime?: number;
getPosition?: Accessor<object: DataT, Position>;
} & ScenegraphLayerProps<DataT>; However, the
I think the accessor should be configurable to inject more than one object (the data). The |
Beta Was this translation helpful? Give feedback.
-
https://codesandbox.io/p/sandbox/wandering-fire-vmy8ft Here is a codesandbox to show exactly the behavior I am describing. This solution does work, as the number of objects increase the performance decreases. All of the interpolation happens on the cpu and I would like for this to happen on the gpu. I am inexperienced with shader injection, and would like some assistance. |
Beta Was this translation helpful? Give feedback.
-
@mobhuiyan98 do you have any progress? |
Beta Was this translation helpful? Give feedback.
-
I am currently at my wits end with this. I want to be able to load time-series, with a [x,y,z] position into the scenegraph layer, and be able control the position with a time controller. Current I am using a useEffect that triggers the time and calls a function to manually calculate interpolation of the position which then updates the state of the data. However, this seems to be intensive for large amounts of data and inefficient. How can I have the interpolation done on the GPU while still controlling the time. This should be able to be done with layer prop transitions, but I am unable to get it working correctly. Is this possible with the Data Filter Extension or hubble.gl? If someone could show me an example it would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions