UNPKG

blinkstick-ts

Version:
24 lines (23 loc) 687 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimulatedLed = void 0; const chalk_1 = __importDefault(require("chalk")); const color_1 = require("../color"); class SimulatedLed { constructor() { this.color = color_1.Colors.black; } setColor(color) { this.color = color; } getColor() { return this.color; } toString() { return chalk_1.default.rgb(this.color.red, this.color.green, this.color.blue)("█"); } } exports.SimulatedLed = SimulatedLed;