Giter Club home page Giter Club logo

gw2emblem's Introduction

GW2Emblem: JavaScript Library used to generate SVG representation of Guild Wars 2 - Guild Emblem

This library it not maintained.

Requirements

Raphaël - JavaScript library is used for drawing SVG image.

How to use!

Include following files into HTML:

    raphael-min.js
    gw2emblem-defs.js
    gw2emblem.js

Init gw2emblem in empty div with [ID = 'gw2embelm-div']:

    // 'gw2embelm-div' is div ID and 256 is size of emblem in pixels
    gw2emblem.init('gw2embelm-div', 256);

Display GW2 Emblem with object fatched from GW2 API Docs:

    gw2emblem.drawEmblemGw2({
    	"background_id":2,
    	"foreground_id":103,
    	"flags":[],
    	"background_color_id":673,
    	"foreground_primary_color_id":443,
    	"foreground_secondary_color_id":473
    });

Notes:

It's possible to use background color (instead of default image) - it's sent as 3rd argument for init function call, fe:

gw2emblem.init('gw2embelm-div', 128, 'transparent');

or

gw2emblem.init('gw2embelm-div', 128, '#3682a0');

Future:

  • tweak emblems
  • generate less detailed emblems (as option for smaller emblem defintion file)
  • add on-demand loading of emblem defintions to reduce initial loading time

Author

Mladen Todorovic [email protected]

gw2emblem's People

Contributors

mtodor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gw2emblem's Issues

License?

Under what license is this released?

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.