wesleytabaka-rpi-led-matrix
Version:
Fork of alexeden/rpi-led-matrix. Node.js/Typescript bindings for hzeller/rpi-rgb-led-matrix
21 lines (20 loc) • 857 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LedMatrixUtils = void 0;
const types_1 = require("./types");
class LedMatrixUtils {
static encodeMappers(...mappers) {
return mappers
.map(mapper => {
switch (mapper.type) {
case types_1.PixelMapperType.Chainlink: return types_1.PixelMapperType.Chainlink;
case types_1.PixelMapperType.Rotate: return [types_1.PixelMapperType.Rotate, mapper.angle].join(':');
case types_1.PixelMapperType.U: return types_1.PixelMapperType.U;
case types_1.PixelMapperType.V: return types_1.PixelMapperType.V;
case types_1.PixelMapperType.VZ: return types_1.PixelMapperType.VZ;
}
})
.join(';');
}
}
exports.LedMatrixUtils = LedMatrixUtils;