Feat plugin improves (#214)
This commit is contained in:
@@ -198,7 +198,7 @@
|
||||
if (animated)
|
||||
document.querySelector("svg").classList.add("no-animations")
|
||||
console.debug(`animations are ${animated ? "enabled" : "disabled"}`)
|
||||
await new Promise(solve => setTimeout(solve, 2400)) //eslint-disable-line no-promise-executor-return
|
||||
await new Promise(solve => setTimeout(solve, 2400))
|
||||
//Get bounds and resize
|
||||
let {y:height, width} = document.querySelector("svg #metrics-end").getBoundingClientRect()
|
||||
console.debug(`bounds width=${width}, height=${height}`)
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
/**Wait */
|
||||
export async function wait(seconds) {
|
||||
await new Promise(solve => setTimeout(solve, seconds*1000)) //eslint-disable-line no-promise-executor-return
|
||||
await new Promise(solve => setTimeout(solve, seconds*1000))
|
||||
}
|
||||
|
||||
/**Create record from puppeteer browser */
|
||||
@@ -306,7 +306,7 @@
|
||||
//Register frames
|
||||
for (let i = 0; i < frames; i++) {
|
||||
const buffer = new PNG(await page.screenshot({clip:{width, height, x, y}}))
|
||||
encoder.addFrame(await new Promise(solve => buffer.decode(pixels => solve(pixels)))) //eslint-disable-line no-promise-executor-return
|
||||
encoder.addFrame(await new Promise(solve => buffer.decode(pixels => solve(pixels))))
|
||||
if (frames%10 === 0)
|
||||
console.debug(`metrics/puppeteergif > processed ${i}/${frames} frames`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user