Showing Posts For mtodor.2356:

JavaScript Lib for Guild Emblem generation

in API Development

Posted by: mtodor.2356

mtodor.2356

Thank you!

Also thank you for info with backgrounds – I updated lib and demo. Also Emblem IDs 44 and 37 are tweaked up.

I’ll add some functionality into Demo page, after I finish some things on library. I made that demo in 20mins – I was lazy to make screenshot of emblem for you and it will be helpfull for others to see what exactly library do.

JavaScript Lib for Guild Emblem generation

in API Development

Posted by: mtodor.2356

mtodor.2356

I can make SVG output or PNG, but I made better solution – Demo Page: http://toro-online.net/gw2emblemdemo/

There is a lot of space for improvement of SVG representations, but that will lead to bigger image definitions in JS → bigger files + longer generation time, etc. I’m making some tweaks (fe. foreground_id=151, there is some kind of color overlapping on quaggan’s belly, also foreground_id=1, there are some shadows on fist). All this can be more detailed, but for initial version I think this works pretty fine.

When I finish loading on-demand (per Emblem foreground/background), then there will be enough space for detailed emblem representations.

JavaScript Lib for Guild Emblem generation

in API Development

Posted by: mtodor.2356

mtodor.2356

I made small library based on Raphaƫl JavaScript library to generate SVG representation of Guild Emblem based on JSON Object from Guild API.

GW2Emblem
GitHub URL: https://github.com/mtodor/gw2emblem
Demo Page: http://toro-online.net/gw2emblemdemo/

Usage: Create div empty with ID [fe. “gw2embelm-div”] in HTML and execute JavaScript code, for example:

gw2emblem.init('gw2embelm-div', 128); // ID, Size
gw2emblem.drawEmblemGw2({
   "background_id":22, 
   "foreground_id":151,
   "flags":[],
   "background_color_id":85,
   "foreground_primary_color_id":142,
   "foreground_secondary_color_id":1242
});

Argument in gw2emblem.drawEmblemGw2 is “emblem” object from Guild API. Emblem is generated as vector, so it doesn’t depend on size – edges will be smooth and nice looking not matter what size of emblem is (64px or 1024px).

This if first version and there will be a lot of changes in future. If you have some suggestions or you find some issues, be free to comment.

(edited by mtodor.2356)

[API Suggestion] World vs World

in API Development

Posted by: mtodor.2356

mtodor.2356

It would be nice to allow multiple Match IDs in match_details.json request. That will reduce number of request – because in most cases all match_ids will be required for one region to generate list.

Hint to all: you can just copy your Win installation

in Account & Technical Support

Posted by: mtodor.2356

mtodor.2356

This is nice. It would be good if ANET confirm that this is correct – that those two .dat files are same on both platforms.

Or maybe someone who have BootCamp installation, but also he/she fully downloaded MacOS version – to check are those two .dat files same. MD5 or some other checksum will work I think. Only that we can be sure that those two files are same on both platforms.