mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-12 20:23:45 +08:00
fix: canvas dpi
This commit is contained in:
@@ -231,6 +231,8 @@ export function OpenAIVoiceVisualizer({
|
|||||||
const dpi = window.devicePixelRatio || 1;
|
const dpi = window.devicePixelRatio || 1;
|
||||||
canvasRef.current.width = CANVAS_SIZE * dpi;
|
canvasRef.current.width = CANVAS_SIZE * dpi;
|
||||||
canvasRef.current.height = CANVAS_SIZE * dpi;
|
canvasRef.current.height = CANVAS_SIZE * dpi;
|
||||||
|
canvasRef.current.style.width = `${CANVAS_SIZE}px`;
|
||||||
|
canvasRef.current.style.height = `${CANVAS_SIZE}px`;
|
||||||
|
|
||||||
const { gl, program } = initWebGL(
|
const { gl, program } = initWebGL(
|
||||||
canvasRef.current,
|
canvasRef.current,
|
||||||
|
|||||||
Reference in New Issue
Block a user