Giter Club home page Giter Club logo

Comments (3)

erik avatar erik commented on May 17, 2024 1

Oh that animation is very cool!

Let me think about the implementation of this for a bit. I like the idea of APNG, and it might be feasible to support, at least for a very constrained subset of features. If it seems possible to get a barebones version of this working without much effort I'll give that a shot when I get some time.

For now, I had a similar idea a little while back, and ended up rewriting the project as a command line app in Rust. Check it out: https://github.com/erik/derive.rs

Unfortunately it doesn't work with map tiles right now, but theoretically that could be supported.


edit:
This seems like a good option https://github.com/photopea/UPNG.js

Would need to capture the contents of the canvas as an array of pixels (easy enough) every N datapoints / activities (either user defined or scaled to target a certain length, as @C-Makridis suggested). Probably would want control over output size as well.

from derive.

c-harding avatar c-harding commented on May 17, 2024

From a technical point of view, the image could be generated using code such as this: http://javascriptexamples.info/snippet/create-apngjs_qzb_javascript

The time can easily be retrieved from the GPX parser: the code is already there but commented out. However, this is per point: the first point could be taken, but make sure to check for empty paths, which could occur when exporting workouts without location data from Strava.

My concern would be that apngs can be quite huge. A video may be better (but longer to export), with a very low frame rate. I wonder if a timeline/date could be overlaid too? https://github.com/Kagami/webm.js

from derive.

erik avatar erik commented on May 17, 2024

Yeah, I think file size is my main concern. For my derive.rs project, the raw frame data before being converted to a real video format is in the 10s of GB. Using PNG should shrink the file size a bit, but we'd still need to be careful about accidentally blowing up the browser.

For files more than a couple frames, I think you're right about using something like WebM.

@xsanda if you want to take a crack at implementing this, be my guest 🙂

from derive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.