Compare commits

...

2 Commits

Author SHA1 Message Date
SArpnt 1b17664f21
change to typescript, fix drawing regression 2023-12-27 22:38:15 -05:00
SArpnt aa6565e94c
reorder head tags 2023-12-27 22:37:48 -05:00
4 changed files with 6 additions and 4 deletions

View File

@ -15,9 +15,9 @@ module.exports = config => {
esbuild.build({
entryPoints: [
`${input}/style.css`,
`${input}/bytebeat.js`,
`${input}/bytebeat.ts`,
`${input}/audio-worklet.ts`,
`${input}/embed.ts`,
`${input}/audio-worklet.js`,
],
outdir: output,
format: "esm",

View File

@ -545,7 +545,9 @@ const bytebeat = Object.seal({
imagePos,
width,
);
initCallback(startX);
if (initCallback) {
initCallback(startX);
}
for (let xPos = startX; xPos !== endX; xPos = this.fmod(xPos + 1, width)) {
callback(xPos, false);
}

View File

@ -8,8 +8,8 @@ html(lang="en")
title Bytebeat composer
link(href="/favicon.png" rel="shortcut icon")
link(href="/style.css" type="text/css" rel="stylesheet")
link(rel="modulepreload" as="audioworklet" href="/audio-worklet.js")
script(src="/bytebeat.js" async type="module")
link(rel="modulepreload" as="audioworklet" href="/audio-worklet.js")
body
main#content
section.container-fixed