From 7452bb0b3a08040266f0d90c9f0e5ecfc475f751 Mon Sep 17 00:00:00 2001 From: gxz Date: Wed, 17 Jan 2024 10:30:12 +0800 Subject: [PATCH] fix: set preserveDrawingBuffer true to fix canvas.toDataURL can not work --- ts/Renderer/WebGLRenderer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/Renderer/WebGLRenderer/index.ts b/ts/Renderer/WebGLRenderer/index.ts index 2a54be74b..4c3ccf27b 100644 --- a/ts/Renderer/WebGLRenderer/index.ts +++ b/ts/Renderer/WebGLRenderer/index.ts @@ -463,7 +463,7 @@ export class WebGLRenderer extends IRenderer { alpha: false, antialias: false, premultipliedAlpha: true, - preserveDrawingBuffer: false, + preserveDrawingBuffer: true, powerPreference: 'default', failIfMajorPerformanceCaveat: false, });