GithubHelp home page GithubHelp logo

kevingrillet / afkarena-labhelper Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 12.65 MB

Little UI to draw the labyrinth.

Home Page: https://kevingrillet.github.io/AFKArena-LabHelper/

License: GNU General Public License v3.0

Shell 2.65% HTML 65.78% CSS 11.76% JavaScript 19.80%

afkarena-labhelper's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar kevingrillet avatar zebiano avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

zebiano

afkarena-labhelper's Issues

Exporting arcane labyrinth as png does not render the hard floor

Describe the bug
Clicking on "Export as PNG" when on the Arcane Labyrinth does not export a correct image. The Hard Floor is completely ignored.

To Reproduce
Steps to reproduce the behaviour:

  1. Make sure to be in Arcane Labyrinth
  2. Click on "Export as PNG"

Expected behaviour
The whole map should get exported, along with the legend.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome (Firefox as well apparently)

Font not loading properly on mac

Looks like it's not working on mac...
Or my fonts are not loading properly...
And I need to remove useless fonts, but I don't understand how it's working, so meh

Refacto everything

Since I'm not a web developer, so my way of doing it is ugly and I think someone knowing how it's working could help :)

Use fontawesome instead of SVG/Images

Dismal luck images

With asset mining, it should be possible to extract high quality images to replace the one that we got from the screenshot.

Use in-game images instead of colors

Instead of using colors, maybe use the tiles from the game, will require some help to extract thems from the game.

Will require refacto:

  • replacing span with images
  • css
  • context menu
  • drag&drop
  • load/save

Add cookies

Save color & legend in cookies + auto load after.

Start to automate things

  • Date
    const _MS_PER_DAY = 1000 * 60 * 60 * 24;
    const _DATE_FIX = new Date('2021-09-18');
    const _DATE_TODAY = new Date();
    
    function dateDiffInDays(a, b) {
      const utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
      const utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());
    
      return Math.floor((utc2 - utc1) / _MS_PER_DAY);
    }
    
    var dateModulo = dateDiffInDays(_DATE_FIX, _DATE_TODAY) % 2;
    
    var d = new Date();
    d.setDate(d.getDate() - dateModulo );
    d.toLocaleDateString()

Work on image output

Better image output to be ready to push on Reddit ;)

  • Title
  • Date
  • Tags (reddit/github)
  • Bigger legend
  • White mode
  • Toogle legend
  • Original colors

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.