Screenshot feature in beta.
Screenshots for the Tarot app are now in BETA... It doesn't quite work with the Celtic Cross spread, but the Three Card and Zodiac work just fine. What I may have to do is what I suspected I should have done all along, and that is to have the spreads contained inside of a canvas element rather than a table. Doing a table was a good proof of concept, but in order to have more realistic spreads I will probably just need to use a canvas. This will mean that I might need to store more precise positioning for the spreads, and re-think some of the other functions... I think it'll make it easier to implement reversals and some other features though.
NOW, that being said, to get the screenshot feature working I'm using tsayen's dom-to-image in the code as a dev dependency. I don't now how dom-to-image handles canvas elements, or even if it can use those elements, so I'll need to do some testing with that, but when I found it, and I was able to integrate it without much difficulty, I was very excited. Unfortunately the traditional way of using it by including either of these lines:
var dom2img = require('dom-to-image');
import dom2img from ('dom-to-image');
Does NOT work... Because I'm strange and wanted to go with a twine/tweego workflow. So, I'm still using npm to keep track of the dom-to-image package, and npm might be useful for any other packages that I might want to use or are currently considering, so I added a compile.sh script that will hold the every increasingly complex tweego command so that I can compile in the minified versions of the development dependency scripts.
To be fair, I've always wanted a reason to learn shell script.
More updates soon.
Files
Get tarotjs - Tarot Deck
tarotjs - Tarot Deck
A virtual tarot deck.
Status | In development |
Author | berkough |
Genre | Card Game |
Tags | Tarot |
Languages | English |
Accessibility | Color-blind friendly |
More posts
- Minor Revisions10 days ago
- Virtually feature complete.85 days ago
Leave a comment
Log in with itch.io to leave a comment.