mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 01:37:47 +01:00
Update html/poketube.ejs
This commit is contained in:
parent
b828caa86e
commit
fb9f5a5cd4
1 changed files with 4 additions and 3 deletions
|
@ -2132,12 +2132,12 @@ const drawFrame = (workerId) => {
|
||||||
|
|
||||||
const transitionToOddCanvas = (workerId) => {
|
const transitionToOddCanvas = (workerId) => {
|
||||||
workers[workerId].canvas.style.opacity = canvasOpacity
|
workers[workerId].canvas.style.opacity = canvasOpacity
|
||||||
workers[workerId === 0 ? numWorkers - 1 : workerId - 1].canvas.style.opacity = "0"
|
workers[(workerId + 1) % numWorkers].canvas.style.opacity = "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
const transitionToEvenCanvas = (workerId) => {
|
const transitionToEvenCanvas = (workerId) => {
|
||||||
workers[workerId].canvas.style.opacity = canvasOpacity
|
workers[workerId].canvas.style.opacity = canvasOpacity
|
||||||
workers[workerId === numWorkers - 1 ? 0 : workerId + 1].canvas.style.opacity = "0"
|
workers[(workerId - 1 + numWorkers) % numWorkers].canvas.style.opacity = "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
const drawStart = () => {
|
const drawStart = () => {
|
||||||
|
@ -2147,7 +2147,8 @@ const drawStart = () => {
|
||||||
ctx: i % 2 === 0 ? oddCtx : evenCtx,
|
ctx: i % 2 === 0 ? oddCtx : evenCtx,
|
||||||
oddFrame: i % 2 === 0
|
oddFrame: i % 2 === 0
|
||||||
}
|
}
|
||||||
workers[i].canvas.style.transition = `opacity ${frameIntervalMs / numWorkers}ms` intervalId = window.setInterval(() => drawFrame(i), frameIntervalMs / numWorkers)
|
workers[i].canvas.style.transition = `opacity ${frameIntervalMs / numWorkers}ms`
|
||||||
|
intervalId = window.setInterval(() => drawFrame(i), frameIntervalMs / numWorkers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue