Aplicou onda 1 do perf

X-Lovable-Edit-ID: edt-6241e8b0-1d0a-4655-9655-08f6dba08e57
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-05-15 11:26:14 +00:00
+5 -5
View File
@@ -476,12 +476,12 @@ export function ModelViewerCanvas({ url }: ModelViewerProps) {
<Canvas
camera={{ position: [2, 2, 2], fov: 50, near: 0.001, far: 1000 }}
gl={{ antialias: true, alpha: true, powerPreference: 'high-performance', preserveDrawingBuffer: true }}
frameloop="demand"
frameloop="always"
className="!bg-background"
onCreated={({ gl, invalidate }) => {
gl.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));
const loop = () => { invalidate(); requestAnimationFrame(loop); };
loop();
onCreated={({ gl }) => {
const isApple = /Mac|iPhone|iPad/.test(navigator.platform);
const maxRatio = isApple ? 2 : 1.5;
gl.setPixelRatio(Math.min(window.devicePixelRatio, maxRatio));
}}
>
<ambientLight intensity={0.6} />