UNPKG

aura-sdk

Version:
52 lines 2.12 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = __importDefault(require("path")); const asus_aura_sdk_1 = require("../../build/Release/asus-aura-sdk"); const controller_1 = require("./controller"); var controller_2 = require("./controller"); exports.Controller = controller_2.Controller; class AuraSDK { constructor() { if (process.arch !== 'ia32') { throw new Error("Only 32 bit nodejs binary is supported"); } const dllPath = path_1.default.resolve(__dirname, '../../build/Release'); this.auraSDKInterface = new asus_aura_sdk_1.AuraSDKInterface(dllPath); } /** * Creates an instance of the motherboard controller */ createMbController() { return new controller_1.Controller('motherboard', { setup: () => this.auraSDKInterface.setupMb(), setcolor: (i, r, g, b) => this.auraSDKInterface.setMbcolor(i, r, g, b), updateColor: () => this.auraSDKInterface.updateMbColor() }); } /** * Creates an instance of the GPU controller */ createGPUController() { return new controller_1.Controller('GPU', { setup: () => this.auraSDKInterface.setupGPU(), setcolor: (i, r, g, b) => this.auraSDKInterface.setGPUcolor(i, r, g, b), updateColor: () => this.auraSDKInterface.updateGPUColor() }); } /** * Creates an instance of the DRAM controller */ createDramController() { console.warn("DRAM controller isn't supported"); return new controller_1.Controller('DRAM', { setup: () => this.auraSDKInterface.setupDram(), setcolor: (i, r, g, b) => this.auraSDKInterface.setDramcolor(i, r, g, b), updateColor: () => this.auraSDKInterface.updateDramColor() }); } } exports.AuraSDK = AuraSDK; //# sourceMappingURL=aura-sdk.js.map