Gw2emblem
JavaScript Library used to generate SVG representation of GW2 Guild Emblem
Install / Use
/learn @mtodor/Gw2emblemREADME
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 mtodor@gmail.com
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
