mirror of
https://github.com/Blockzilla101/citation.git
synced 2025-04-18 18:34:41 -04:00
encode progress
This commit is contained in:
parent
7206a21b78
commit
5d1081ba4f
1 changed files with 4 additions and 0 deletions
|
@ -114,6 +114,8 @@ module.exports.Citation = class Citation {
|
|||
/** @type {number|null} */
|
||||
#penaltySpacingFromBottom = null;
|
||||
|
||||
log = msg => {}
|
||||
|
||||
/**
|
||||
* @param {string} outputFile
|
||||
* @param {number} [width=366]
|
||||
|
@ -263,8 +265,10 @@ module.exports.Citation = class Citation {
|
|||
encoder.start();
|
||||
for (let i = 0; i < animation.length; i++) {
|
||||
moveBy(this.#height - animation[i], this.#canvas);
|
||||
this.log(`\rEncoding frame ${i+1} of ${animation.length}`)
|
||||
}
|
||||
encoder.finish();
|
||||
this.log('\nEncoding Finished\n')
|
||||
|
||||
fs.writeFileSync(this.#outputFile, encoder.out.getData())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue