UNPKG

@elgato-stream-deck/core

Version:

An npm module for interfacing with the Elgato Stream Deck

54 lines 1.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamDeckNeoFactory = StreamDeckNeoFactory; const base_js_1 = require("./base.js"); const id_js_1 = require("../id.js"); const generic_gen2_js_1 = require("./generic-gen2.js"); const controlsGenerator_js_1 = require("../controlsGenerator.js"); const neo_js_1 = require("../services/lcdSegmentDisplay/neo.js"); const neoControls = (0, controlsGenerator_js_1.generateButtonsGrid)(4, 2, { width: 96, height: 96 }); neoControls.push({ type: 'button', row: 2, column: 0, index: 8, hidIndex: 8, feedbackType: 'rgb', }, { type: 'lcd-segment', row: 2, column: 1, columnSpan: 2, rowSpan: 1, id: 0, pixelSize: { width: 248, height: 58, }, drawRegions: false, }, { type: 'button', row: 2, column: 3, index: 9, hidIndex: 9, feedbackType: 'rgb', }); const neoProperties = { MODEL: id_js_1.DeviceModelId.NEO, PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.NEO], CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(neoControls), KEY_SPACING_HORIZONTAL: 30, KEY_SPACING_VERTICAL: 30, FULLSCREEN_PANELS: 0, HAS_NFC_READER: false, SUPPORTS_CHILD_DEVICES: false, SUPPORTS_RGB_KEY_FILL: true, }; const lcdSegmentControls = neoProperties.CONTROLS.filter((control) => control.type === 'lcd-segment'); function StreamDeckNeoFactory(device, options) { const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, neoProperties, null); services.lcdSegmentDisplay = new neo_js_1.StreamDeckNeoLcdService(options.encodeJPEG, device, lcdSegmentControls); return new base_js_1.StreamDeckBase(device, options, services); } //# sourceMappingURL=neo.js.map