blinkstick-ts
Version:
BlinkStick TypeScript implementation
22 lines (21 loc) • 1.31 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const animation_1 = require("./animation");
const color_1 = require("./color");
const funktional_1 = require("./de/funktional");
(() => __awaiter(void 0, void 0, void 0, function* () {
(0, funktional_1.setzeFarbe)(0, color_1.Colors.blue);
console.log((0, funktional_1.liefereFarben)(2));
const led = funktional_1.blinkStick === null || funktional_1.blinkStick === void 0 ? void 0 : funktional_1.blinkStick.getChannel(0).getLed(0);
const animator = new animation_1.MorphAnimator(led, color_1.Colors.red);
animator.animate();
}))();