Comments (6)
At the moment this isn't supported.
In order to do that ala mapbox/webgl-wind, you need to render the output to a framebuffer and fade it out progressively over time. This has the following negative consequences in a full featured implementation:
- The output is completely wrong when panning/zooming, so you have to throw it out. This leads to a somewhat disconcerting effect where every time you move the map, all the particle trails disappear only to show up a few seconds later.
- This limits the speed of the particle: it cannot travel more than a single pixel per frame, otherwise the particle trail develops holes, breaking the visual effect.
In the longer term we can develop some solutions to this. My thoughts went something like this:
- choose a number of frames that we will have a particle trail for, call it n.
- allocate n + 1 textures to hold particle positions.
- on a normal frame, compute the current position based on frame n, shift the textures around one position and store it frame n
- on a frame where a zoom/pan has occurred, recompute the position for all n. This will be slow, so this needs to put a limit on the size of n
- When drawing to the screen, draw in line mode, drawing a segment of the line between pairs of frames.
from windgl.
Yes. I'm afraid that to do anything interesting inside this repo fairly decent knowledge of WebGL is required.
from windgl.
At the moment this isn't supported.
In order to do that ala mapbox/webgl-wind, you need to render the output to a framebuffer and fade it out progressively over time. This has the following negative consequences in a full featured implementation:
- The output is completely wrong when panning/zooming, so you have to throw it out. This leads to a somewhat disconcerting effect where every time you move the map, all the particle trails disappear only to show up a few seconds later.
- This limits the speed of the particle: it cannot travel more than a single pixel per frame, otherwise the particle trail develops holes, breaking the visual effect.
In the longer term we can develop some solutions to this. My thoughts went something like this:
choose a number of frames that we will have a particle trail for, call it n.
allocate n + 1 textures to hold particle positions.
on a normal frame, compute the current position based on frame n, shift the textures around one position and store it frame n
- on a frame where a zoom/pan has occurred, recompute the position for all n. This will be slow, so this needs to put a limit on the size of n
When drawing to the screen, draw in line mode, drawing a segment of the line between pairs of frames.
thanks @gampleman for your work up until now on this, one question:
would this feature require to continue with webgl implementation?
from windgl.
would this feature require to continue with webgl implementation?
Not totally sure what you mean by that?
from windgl.
would this feature require to continue with webgl implementation?
Not totally sure what you mean by that?
so, in order to implement the particle trails feature is it needed for one to know more how to work with webgl?
from windgl.
thank you @gampleman - would you be interested to develop this feature forward if sponsored?
from windgl.
Related Issues (19)
- No wrapping of wind data around date line HOT 1
- Buggy on iPhone HOT 5
- No attribution for webgl-wind code
- Changing tiles HOT 3
- SampleFill faulty rendering on different browsers HOT 8
- Handling around poles HOT 1
- How to switch the data source? HOT 6
- Uncaught TypeError: Cannot read property 'uMax' of null HOT 1
- Layer not visible on Map HOT 3
- Implement some sort of tiling
- Unknown interpolation type zoom HOT 4
- Is there any plugin for leaflet like this? HOT 1
- How to have no particles at certain places? HOT 1
- Areas masked out in certain situations HOT 1
- Setup, run locally and contributing to the library
- Can we get rid of metadata JSON? HOT 3
- Question: how did you get particles on world copies to work?
- Integrate with Mapbox expressions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windgl.