GithubHelp home page GithubHelp logo

Map generation from Json about diablo2 HOT 5 CLOSED

blacha avatar blacha commented on May 13, 2024
Map generation from Json

from diablo2.

Comments (5)

mgalos999 avatar mgalos999 commented on May 13, 2024 2

@Wasorma So I went and created this https://github.com/mgalos999/d2-mapper

from diablo2.

blacha avatar blacha commented on May 13, 2024 1

@mgalos999 this is cool, I think we should just add this directly into the map server? would be super simple to create a .svg endpoint rather than .json!

from diablo2.

mgalos999 avatar mgalos999 commented on May 13, 2024 1

Yeah I was thinking I'll make it a package, where you send it JSON blob and a location to dump the SVGs. Then just add it as a dependency to your map server and add a new endpoint to trigger it.

from diablo2.

blacha avatar blacha commented on May 13, 2024

I have built two options for map visualisations from this JSON map object.

  1. Web based using maplibre/HTML canvas https://github.com/blacha/diablo2/blob/master/packages/memory/src/session.ts#L62
  2. Older versions using nodejs canvas object to render to a PNG This is from my old pimap repo that I haven't ported across to the new code base yet. https://github.com/blacha/pimap/blob/0588544b9e37f49bbd7ae7e7d4e436599c5e498a/src/mapserver/map.image.ts

from diablo2.

Wasorma avatar Wasorma commented on May 13, 2024

Thanks for the response

Regarding method #1, I see maplibre code in the map package, do you mind giving an example of how to view it?

from diablo2.

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.