From 69a3b482be2b66be3fce807e4d252ae6dc34f28e Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Fri, 6 Nov 2020 12:47:26 +0000 Subject: [PATCH] update palette on selection --- script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script.js b/script.js index 401a089..8d5e4b1 100644 --- a/script.js +++ b/script.js @@ -8,6 +8,7 @@ import init, { output, set_brightness, set_dither, + set_palette, set_room_name, } from './pkg/pixsy.js'; @@ -171,6 +172,11 @@ async function run() { buttonImageProceed.addEventListener("click", handleImage); buttonImageProceed.addEventListener("touchend", handleImage); + selectPalette.addEventListener("change", () => { + set_palette(selectPalette.value); + loadPreview(); + }); + checkboxDither.addEventListener("change", () => { set_dither(checkboxDither.checked); loadPreview();