Skip to content

Commit

Permalink
feat: auto canvas scaler
Browse files Browse the repository at this point in the history
  • Loading branch information
xpadev-net committed Dec 6, 2023
1 parent 35a8323 commit 39522ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ class NiconiComments {

this.renderer = renderer;
this.renderer.setLineWidth(getConfig(config.contextLineWidth, false));
const rendererSize = this.renderer.getSize();
this.renderer.setScale(
rendererSize.width / config.canvasWidth,
rendererSize.height / config.canvasHeight,
);

let formatType = options.format;

//Deprecated Warning
Expand Down

0 comments on commit 39522ed

Please sign in to comment.