From 03b7e2d4cb001cef990efef61d9ce499c8e4f878 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 28 Jul 2022 22:27:39 -0400 Subject: Fix button input, add rotation and scale to decks --- scripts/cards/deck.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/cards/deck.js') 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); -- cgit v1.2.3