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
// Discord all events! | |
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
// Learn from this, do not just copy it mofo! | |
// | |
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
// Last Updated -> Halloween 2022 | |
/* |
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
import cv2 | |
import os | |
class ImageToParticle: | |
def __init__(self, image_file, resolution=(40, 40), scale=0.25, max_size=5, replace_transparent=[], animation=0, commands=[], show_display=False): | |
self.image_file = image_file # Source file | |
self.resolution = resolution # Shrinks image to fit within x,y dimensions without changing aspect ratio (1 pixel = 1 particle) | |
self.scale = scale # Scale the size of image displayed in game | |
self.max_size = max_size # Maximum particle size, alpha scales this if replace_transparent is not defined | |
self.replace_transparent = replace_transparent # RGB value to replace 0 alpha with |