shardofhonor / dominion-card-generator Goto Github PK
View Code? Open in Web Editor NEWa web-app to generate mockups of fan-cards for the card game dominion easily
Home Page: https://shardofhonor.github.io/dominion-card-generator/
a web-app to generate mockups of fan-cards for the card game dominion easily
Home Page: https://shardofhonor.github.io/dominion-card-generator/
Change table design of parameter input area into a responsive version that can be shown below the card preview on smaller screens like smartphones.
Especially for numbers greater than 9
Usage of local image files instead of URL will create a fully capable offline app.
Might use
Problem: Links are not share- and saveable any more...
For Example Coffers/Villagers-Mats
Adobe has officially retired Trajan Pro and replaced it with Trajan Pro 3. It's quite similar to the older font, with added glyphs, but it's probably better to use as a fallback for users who don't have access to the older font. The new family has several new weights. TrajanPro3-Semibold is closest to TrajanPro-Bold.
Add Support for Base Cards like Treasure-Curse.
Requires new splitted Base Card template file.
https://dominion.games/images/cards/templates/treasure-curse-basic.png
Currently using +$1
in the description will not display the treasure icon but a literal $. The same applies for all other kind of icon (like potion or victory point).
To circumvent it, you can add a space between the +
and the icon, like in + $1
, but then a space will render between the +
and the icon.
It looks like toDataURL() is too big for Chrome to handle
Remove the need for invisible characters as a workaround, to trick the regex into displaying symbols as single big lines. For example +3$ should be shown small, but 3$ alone in a single line shown big. Should work for all symbols, including -1VP for curses...
Most likely, the issue is somewhere in the Regex in the variable iconWithNumbersPatternSingle.
Any ideas appreciated.
Cards like village green have 3 types, and the color of the description is Action (grey), while the border is Reaction/Duration (blue/orange). It’s currently not possible to reproduce it.
I’m not sure if a third category of color is needed (more flexible, but weights down the interface), or if a new type of split (always grey) would be enough.
First of all: good work!
Getting an error when providing an external url for icons like: http://example.com/icon.png
I think you are aware of that because JS console says "CORS loading of external resources deactivated".
It would be a nice feature though.
A workaround for this problem could be:
Instead of loading the image directrly into the canvas (via JS), you could use some server side scripting to get rid of the Cross Origin problem:
-Send the imgage url "http://example.com/icon.png" to a serverside script (i use PHP for example)
-Let PHP download the image
-Return a base64 string of the image
-Use this response for your img.src
I know github.io doesnt support php, but i maybe youll find a way.
I used this code for a very similar project (yugioh card creator):
It's not possible to add (This is not in the Supply.) like in the official cards, because the line gets cut off. This also causes the word "Supply" to not be in italic, which is probably a bug?
One thing to note is that it stays in a single line if you don't add the italic mark. The italic doesn't seem to add much width to the text, so it looks like maybe the [i] is taken into account as 3 extra characters when deciding to add a line break.
It works fine it you write "supply" instead of "Supply" and there's even a special string for that in the code, it just bugs me that it doesn't exactly match the official cards 😅
Text in each image:
[i](This is not in the Supply.)
(This is not in the Supply.)
Please add a license declaration (e.g. MIT) so it's clear how it can be used:
I very frequently get this js exception, resulting in an "infinite loading spin" and the editor crashing.
Reloading the page sometimes works, sometimes doesn't.
Browser: Chrome 78.0.3904.97 (newest to date)
OS: Win 10
main.js:86 Uncaught TypeError: Cannot read property 'value' of null
at rebuildBoldLinePatternWords (main.js:86)
at initCardImageGenerator (main.js:91)
at initialize (?title=Test&description=&type=&credit=&creator=&price=&preview=&type2=&color2split=1&boldkeys=&picture-x=0&picture-y=0&picture-zoom=1&picture=http%3A%2F%2Fwiki.dominionstrategy.com%2Fimages%2F0%2F08%2FRemodelArt.jpg&expansion=&custom-icon=&color0=0&color1=0&size=0:38)
at HTMLScriptElement.onload (?title=Test&description=&type=&credit=&creator=&price=&preview=&type2=&color2split=1&boldkeys=&picture-x=0&picture-y=0&picture-zoom=1&picture=http%3A%2F%2Fwiki.dominionstrategy.com%2Fimages%2F0%2F08%2FRemodelArt.jpg&expansion=&custom-icon=&color0=0&color1=0&size=0:43)
Reduce Network Requests, so the cors-anywhere free server capacity lasts longer.
Heirloom text input doesn't appear in the UI when using the base card template (the third one), but if you set it on the first template it will render on the third template.
Maybe heirloom input should be available for base cards?
Assuming you can get permission to do so, it would be great to allow a dropdown of the set icons for the original sets.
For context, I'd like to use the tool to generate art to cut and paste out for dividers I want to make for a custom storage solution, rather than custom cards. It would be great if I could have the set icon the cards game from without having to try and get high-res scans of all of the set icons.
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.