diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-07-28 22:27:39 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-07-28 22:27:39 -0400 |
commit | 03b7e2d4cb001cef990efef61d9ce499c8e4f878 (patch) | |
tree | 3e3d2d179c2b95703dda940546d00ac914b33bd8 /scripts/cards/deck.js | |
parent | 81b562233188569b66fc2fb2a7ff952bdae0a4ec (diff) |
Fix button input, add rotation and scale to decks
Diffstat (limited to 'scripts/cards/deck.js')
-rw-r--r-- | scripts/cards/deck.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js index 8c8e3a7..f1e2689 100644 --- a/scripts/cards/deck.js +++ b/scripts/cards/deck.js @@ -13,7 +13,7 @@ class Deck { y = 0; e = null; - constructor(id, options = {mode: "stack", smode: "one", sct: 0, pos: [0, 0]}) + constructor(id, options = {mode: "stack", smode: "one", sct: 0, pos: [0, 0, 0, 1]}) { // View mode // infdraw - infinite draw. always appears as if there are multiple cards @@ -50,6 +50,8 @@ class Deck { // x and y values are on a scale from 0 to 1, 0 being top left, 1 being bottom right. this.e.style.setProperty("--x", options.pos[0]); this.e.style.setProperty("--y", options.pos[1]); + this.e.style.setProperty("--rot", options.pos[2]); + this.e.style.setProperty("--scale", options.pos[3] + "deg"); this.e.setAttribute("mode", options.mode); |