This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is a hacky workaround to make cards display their name when you hover | |
// over them. it requires setting the texture override url fragment to the | |
// card name. | |
import { Card, GameObject, world } from "@tabletop-playground/api"; | |
export function get_name(obj: Card): string { | |
if (obj.getStackSize() !== 1) { | |
return ""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function boosterJson(cards) { | |
let firstCard = cards.pop(); | |
let cardStack = { | |
"objectType": "Card", | |
"transform": { | |
"rotation": | |
{ | |
"x": 0, | |
"y": 0, |