GithubHelp home page GithubHelp logo

Comments (2)

Reckless-Satoshi avatar Reckless-Satoshi commented on June 3, 2024

There is some progress:
Here the robo-identities cargo workspace https://github.com/reckless-satoshi/robo-identities
The robo-identities-wasm is 760KB (Robohash avatar generator only) or 1.1MB robohash and nickname generator.

The robohash generator contains all of the robot parts, so having the .wasm is the only asset needed for the client to generator robots. It can generate up to 1,293,692,400 different robots, which is quite a lot more than the original RoboHash. This is due to the fact that the color is programmatically computed via hue rotation (359 variants), instead of sticking to the same 8 colors of the .png files (was also needed to save of size).

Here the WIP PR to integrate it into RoboSats app #735 . Given that computing an avatar takes ~200ms, computing all avatars in the book is blocking rendering. Therefore, the avatar generation is moved to webworkers. It works like a charm, and avatars can be generated and cached even before the book is opened.

Unfortunately, it does not work on the Android Webview app, I am looking for fixes, but possibly is an issue with the relative paths in Android... might be solved by inlining the webworker and wasm.

from robosats.

secondl1ght avatar secondl1ght commented on June 3, 2024

Great progress, looking forward to trying it out!

from robosats.

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.