I want to render flying particle on the map which move along a 3D trajectory (such as arcs). In my understanding, the trip-layer is build on path-layer and render segements' color. So I'm thinking to create 3D path (lat, log, altitude) and create particle effects.
How can I deal with that? I tryed to modify shaders vertex.glsl but failed. Who can give some advice? Thanks.
One possible look is:
https://armsglobe.chromeexperiments.com/
you can take a look at our ArcLayer as a start
The PathLayer is already 3D.
For the particle effect, creating your own custom layer is the way to go. If you share your custom shader we may be able to help you troubleshoot.
related: https://github.com/uber/deck.gl/issues/2857#issue-426897218
The PathLayer is already 3D.
For the particle effect, creating your own custom layer is the way to go. If you share your custom shader we may be able to help you troubleshoot.
In my understaning, the Trip-layer is (x, y, time) version of Path-layer (x, y, height). The thrid dimension of path-layer is replaced by time in trip-layer. I hope to create a (x, y, height, time) trip-layer. Is that possible?
@YuhangGu You will need to extend the PathLayer, not the TripLayer. See developer guide regarding custom layers.
I tryed to modify shaders vertex.glsl but failed.
Without you providing your code sample, all we can give you is abstract advice.
Would I be right in assuming one would also need to extend the Tesselator layer so the position values can accept 4 values?
@SymbolixAU I would suggest adding a new attribute. This is not hard to do from where I stand - the main reason it was not implemented was backward compatibility. Maybe in 7.1 we can add a new prop getTimestamps to this layer:
TripLayer({
getPath: ... // returns array of [x, y, z]
getTimestamps: ... // returns array of timestamps
});
And if getTimestamps is not provided, we interpret the results from getPath as [x, y, timestamp].
Is there any chance this could be implemented any time soon? It would be an extremely useful feature
@harisbal We are working on releasing 7.1.0 this week which will include https://github.com/uber/deck.gl/pull/3140, a prerequisite for rendering arbitrary 3D paths. We will be able to work on this feature after the release.
@Pessimistress - thanks for https://github.com/uber/deck.gl/pull/3192 - this is a great feature
The getTimestamps API is now available in TripsLayer as of 7.1.1
@Pessimistress thank you so much :)
@Pessimistress thank you so much for the efforts!
Most helpful comment
@SymbolixAU I would suggest adding a new attribute. This is not hard to do from where I stand - the main reason it was not implemented was backward compatibility. Maybe in 7.1 we can add a new prop
getTimestampsto this layer:And if
getTimestampsis not provided, we interpret the results fromgetPathas [x, y, timestamp].