summaryrefslogtreecommitdiff
path: root/src/UI.js
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-02-18 18:40:38 -0500
committerLLLL Colonq <llll@colonq>2025-02-18 18:40:38 -0500
commitbaa7193345e9f0e9085bcb557e8e976d2d270867 (patch)
treede922e51ef577b317c970facb6d4ae445a80c1de /src/UI.js
parent34b49df0ab7336789e79590e51d4456f92024408 (diff)
Support shader upload
Diffstat (limited to 'src/UI.js')
-rw-r--r--src/UI.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/UI.js b/src/UI.js
index a6dd0fa..eb10598 100644
--- a/src/UI.js
+++ b/src/UI.js
@@ -26,3 +26,13 @@ export const _submitRedeem = (url) => (el) => () => {
export const _setShader = (shader) => () => {
window.wasmBindings.set_shader(shader);
};
+
+export const _submitShader = (url) => (shader) => () => {
+ const data = new FormData();
+ data.append("name", "throw shade");
+ data.append("input", shader);
+ fetch(url, {
+ method: "post",
+ body: data,
+ });
+};