Skip to content

Commit

Permalink
fix: enable preserveDrawingBuffer to allow for image export
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink committed Aug 16, 2023
1 parent e7cf327 commit 9d2ee2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/renderer/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export class Renderer extends EventTarget {

this.container = container || document.body;

const renderer = new WebGLRenderer({antialias: true});
const renderer = new WebGLRenderer({
antialias: true,
alpha: true,
preserveDrawingBuffer: true
});
renderer.setClearColor(0xffffff, 0);
renderer.setAnimationLoop(this.animationLoopUpdate.bind(this));
this.webglRenderer = renderer;
Expand Down

0 comments on commit 9d2ee2f

Please sign in to comment.