Removed use of Node Module ESLint, generated files for Express server.

This commit is contained in:
2022-03-20 19:57:48 -05:00
parent 792251dada
commit d53b54fc83
16 changed files with 198 additions and 1641 deletions

View File

@@ -1,6 +1,6 @@
"use strict";
export default function VisualizerCore(mediaSource, fftSize = 1024) {
function VisualizerCore(mediaSource, fftSize = 1024) {
this._stream = mediaSource;
this._analyzing = false;
this._updateListeners = [];
@@ -46,7 +46,6 @@ export default function VisualizerCore(mediaSource, fftSize = 1024) {
this._analyzing = false;
};
this.addUpdateListener = function (listener) {
console.log("added listener.");
this._updateListeners.push(listener);
};
this.getNumberOfBins = function () {

View File

@@ -1,6 +1,6 @@
"use strict";
export default function bindHorizontalBar(canvasElement, visualizerCore) {
function bindHorizontalBar(canvasElement, visualizerCore) {
let _width = canvasElement.width;
let _height = canvasElement.height;
let _canvasCtx = canvasElement.getContext("2d");
@@ -9,7 +9,6 @@ export default function bindHorizontalBar(canvasElement, visualizerCore) {
_canvasCtx.clearRect(0, 0, _width, _height); // clear canvas.
let barWidth = Math.floor(_width / bins.length) - 1; // -1 for 1 pixel gap between bars.
let barIndex = 0;
console.log("updating visuals.." + barWidth);
bins.forEach(bin => {
let normalBin = bin / 255.0;
_canvasCtx.fillStyle = "rgb(" + 0 + "," + bin + "," + bin + ")";