|
|
|
@ -3,7 +3,7 @@ const express = require('express')
|
|
|
|
|
const tmi = require('tmi.js');
|
|
|
|
|
const { init, translate, circle, rectangle, to, label } = require("./hpgl.js");
|
|
|
|
|
|
|
|
|
|
const distance = 3;
|
|
|
|
|
let distance = 3;
|
|
|
|
|
const app = express()
|
|
|
|
|
|
|
|
|
|
const client = new tmi.Client({
|
|
|
|
@ -61,12 +61,18 @@ app.listen(3001, () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const parseMessage = (message) => {
|
|
|
|
|
message = message.trim();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (message.toLowerCase().startsWith("lb")) {
|
|
|
|
|
var words = message.toLowerCase().replace("lb", "");
|
|
|
|
|
toPlotter(label(words));
|
|
|
|
|
} else if (message.toLowerCase().startsWith("distance")) {
|
|
|
|
|
console.log("do: ", message);
|
|
|
|
|
var value = Number(message.replace("distance ", ""));
|
|
|
|
|
|
|
|
|
|
console.log("do the value of ", value);
|
|
|
|
|
distance = value;
|
|
|
|
|
} else {
|
|
|
|
|
switch (message.toLowerCase()) {
|
|
|
|
|
case 'init':
|
|
|
|
|