mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 04:33:42 +08:00
fix: realtime animation dpi
This commit is contained in:
@@ -228,8 +228,9 @@ export function OpenAIVoiceVisualizer({
|
|||||||
const initializeWebGL = useCallback(() => {
|
const initializeWebGL = useCallback(() => {
|
||||||
if (!canvasRef.current) return;
|
if (!canvasRef.current) return;
|
||||||
|
|
||||||
canvasRef.current.width = CANVAS_SIZE;
|
const dpi = window.devicePixelRatio || 1;
|
||||||
canvasRef.current.height = CANVAS_SIZE;
|
canvasRef.current.width = CANVAS_SIZE * dpi;
|
||||||
|
canvasRef.current.height = CANVAS_SIZE * dpi;
|
||||||
|
|
||||||
const { gl, program } = initWebGL(
|
const { gl, program } = initWebGL(
|
||||||
canvasRef.current,
|
canvasRef.current,
|
||||||
|
|||||||
Reference in New Issue
Block a user