itsdouges / armory-embeds Goto Github PK
View Code? Open in Web Editor NEW🛡 Embed Guild Wars 2 widgets on your site!
Home Page: https://madou.github.io/armory-embeds
License: BSD 3-Clause Clear License
🛡 Embed Guild Wars 2 widgets on your site!
Home Page: https://madou.github.io/armory-embeds
License: BSD 3-Clause Clear License
Adding
<script>
document.GW2A_EMBED_OPTIONS = {
lang: "fr"
};
</script>
is not working for inline text and tooltip.
However it seems to work for wiki base url
We will have to extract common logic from the app into armory-component-ui
first, then add the logic here.
I'm honestly not sure if this is even possible. But would it be doable to do weapon skills in an easy to use fashion? My hope is that we could pass the 1 or 2 weapon IDs to you along with the profession and get the skills returned.
data-armory-weapon-ids="78182,78686" data-armory-profession="Revenant"
or
data-armory-weapon-ids="78182,78686" data-armory-profession="Elementalist" data-armory-attunement="Water"
Since these are both swords it would convert that data to the Revenant sword skills.
28964
29233
26699
28472
28625
The only reason I ask is due to limitations in the API. In order to get this data with the API as it is, I would have to fetch and store every weapon item my users have in order to know the weapon type. From there I could easily determine the skills (even the thief combos or ele attunements). But storing all those items would be insane.
If this is not possible I understand. Just really hopeful it's doable with the data you already store.
Thanks!
Currently an embed can have the following states:
We should add a third state
Maybe rename/split up the data-armory-inline-text attribute so it can be used on div-icons without a text next to it (cf. #9)
From the description:
data-armory-inline-text | string | no | Optional inline text that will be displayed to the right of the icon. You can pass in wiki to use a gw2 wiki URL, or pass in any other text that will be used as the link
one would probably expect it to change the visible text, not the link
Polymer, skate, or something else?
Skate has a react rendering layer: https://github.com/skatejs/renderer-react would make interop easy.
transform
[&AgEBAAAA]
-> <div data-armory-embed="items" data-armory-ids=""1></div>
Hi,
first off thanks for providing this, appreciated!
The stats for f.e. Bifrost won't show on my tests. Here's the HTML I generated.
<div data-armory-embed="items" data-armory-size="48" data-armory-ids="30698" data-armory-30698-upgrades="24615,24554" data-armory-30698-upgrade-count='{"24615": 1,"24554": 1}' data-armory-30698-infusions="39336,39336" data-armory-30698-stat="161"></div>
Can you point me to what might be causing this?
Could be a bug/unintended behavior. See this example (yellow represents whitespace, it doesn't blend nicely with border styling).
To solve this myself I set line-height to 0 for all main container classes.
I know the project isn't getting anymore updates, Maybe someone's already solved it and can point me to what to change in a local version.
Using itemstats to get Celestial stats on a item (such as stat selectable LW trinkets) since Expertise and Concentration stats were added to the stat results in gw2armory rendering '[404] Item name' with no stats listed.
I've looked into working out why, as far as I can tell, its getting stats name properly, but can't find where its trying to reference it to the call or how its piping the attributes in either.
Thanks
This would prompt some investigation. Right now you display them as they're pulled from the API, but that's not correct because in-game they seem to have a different prioritization. From this example you can see taunt at the end and some other things not correctly ordered.
My guess is that they start with damage, then immediately go to boons/conditions, then movement-affecting facts, then size facts, then the rest, but that's a wild guess. I have asked this to be fixed on their side too.
Possibly a bug/unintended behavior. See this example.
Like "Berserker Sword" instead of "Zojja's Blade" as the visible text, but keep the original tooltip & possible (wiki-)link (both pointing to Zojja's Blade)
Hello Madou,
I am using your JS on my site (https://mists.cn, which old one is mists.co) throught this way:
<script async src="https://unpkg.com/armory-embeds@^0.x.x/armory-embeds.js"></script>
I am a new player with nodejs, can you tell me how to build armory-embeds.js by myself? I want to make the armory-embeds.js for my wordpress server with Docker.
Thank you!
Hi,
I'm working on a guild armory which is at this point only missing popups for skills and armor. The problem is - everything gets generated asynchronously with Vue.js so just including a link to your .js file doesn't do anything since none of the divs are there at page load.
Is there a way of calling for embeds manually?
They should only load if they're in the viewport
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.