perf: compress GLBs 75%, add Draco decoder, loading spinner for attire
This commit is contained in:
@@ -10,8 +10,11 @@ import {
|
||||
Html,
|
||||
} from '@react-three/drei';
|
||||
import { useThree } from '@react-three/fiber';
|
||||
import { useGLTF } from '@react-three/drei';
|
||||
import { RobotModel } from './RobotModel';
|
||||
import { snapshotStore } from '@/store/useSnapshotStore';
|
||||
|
||||
useGLTF.setDecoderPath('/draco/');
|
||||
import type { WebGLRenderer, Scene, Camera } from 'three';
|
||||
|
||||
function Loader() {
|
||||
@@ -132,7 +135,7 @@ export function RobotCanvas() {
|
||||
return (
|
||||
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
|
||||
<Canvas
|
||||
dpr={[1, 2]}
|
||||
dpr={[1, 1.5]}
|
||||
camera={{ position: [0, 1, 5], fov: 50 }}
|
||||
gl={{ antialias: true, powerPreference: 'high-performance' }}
|
||||
style={{ background: 'linear-gradient(180deg, #e8e8e4 0%, #f0f0ec 50%, #e8e8e4 100%)' }}
|
||||
|
||||
Reference in New Issue
Block a user