Closed icithis closed 6 years ago
I did some testing yesterday and some reflexion is needed on this to improve the API but you can try something like:
...
pixiLayer.addTo(map);
var ticker = new PIXI.ticker.Ticker();
ticker.add(function(delta) {
markerSprites.forEach(function(markerSprite) {
markerSprite.rotation -= 0.03 * delta;
});
pixiLayer.redraw();
});
ticker.start();
Anyway, can you provide a basic JSFiddle describing your usercase? That would really help me to clarify my thoughts.
The redraw functionality is sufficient, thanks for the clarification.
I have released leaflet-pixi-overlay@1.4.2 with improvement for your usercase. You can have a look at: simple-animated-markers and animated-markers for usage examples.
I noticed there are methods for getContainer, getRenderer, etc. However if I want to animate something without map interaction (like the change in weather over time) there's no getTicker. Is there a way to add this to the project, instead of using the renderer on a loop?