Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Style

on:
pull_request:
branches:
- master

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 26
cache: npm
- run: make style
- run: git diff --exit-code
2 changes: 1 addition & 1 deletion examples/basic.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<meta charset="UTF-8" />
<html>
<head>
Expand Down
2 changes: 1 addition & 1 deletion examples/requirejs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<meta charset="UTF-8" />
<html>
<head>
Expand Down
12 changes: 6 additions & 6 deletions live/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand Down Expand Up @@ -841,7 +841,7 @@
taps: 2,
interval: 1500,
posThresholdL: 50,
})
}),
);
mc.on("doubletap", binding.value);
}
Expand Down Expand Up @@ -983,7 +983,7 @@
});

var stream = new URLSearchParams(document.location.search).get(
"stream"
"stream",
);
if (stream) {
console.log(`loading stream from ${stream}`);
Expand All @@ -1001,7 +1001,7 @@
}

var experimental = new URLSearchParams(document.location.search).get(
"experimental"
"experimental",
);
if (experimental) {
this.experimentalMode = true;
Expand Down Expand Up @@ -1034,7 +1034,7 @@
event.keyCode,
event.ctrlKey,
event.shiftKey,
event.altKey
event.altKey,
);
}
});
Expand All @@ -1050,7 +1050,7 @@
event.keyCode + offset,
event.ctrlKey,
event.shiftKey,
event.altKey
event.altKey,
);
}
});
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
window.crypto.getRandomValues(arr);
return arr.reduce(
(cur, next) => cur + next.toString(36).padStart(2, "0"),
""
"",
);
}

Expand Down Expand Up @@ -69,7 +69,7 @@
`style.width=${this.canvas_.style.width}, ` +
`style.height=${this.canvas_.style.height}, ` +
`width=${this.canvas_.width}, ` +
`height=${this.canvas_.height}`
`height=${this.canvas_.height}`,
);
}

Expand Down Expand Up @@ -158,7 +158,7 @@
data,
false,
this.logical_width_,
this.logical_height_
this.logical_height_,
);

this.new_stream_callbacks.forEach((f) => f(this));
Expand Down Expand Up @@ -216,7 +216,7 @@
async loadStream(e) {
const file = e.target.files[0];
const data = await new Response(file).text();
const extension = file.name.split('.').pop();
const extension = file.name.split(".").pop();
if (["mesh", "vtk", "msh"].includes(extension)) {
await this.display("mesh\n" + data);
} else {
Expand Down Expand Up @@ -267,7 +267,7 @@
return btoa(
data.reduce(function (data, byte) {
return data + String.fromCharCode(byte);
}, "")
}, ""),
);
}

Expand Down