#
luxiaotao1123
2024-04-24 ef1c6cacf5aa4b2bcce35eb3b7bae2db95692edd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { useRef } from 'react'
import { Canvas, useFrame } from '@react-three/fiber'
import { useGLTF, Stage, Grid, OrbitControls, Environment } from '@react-three/drei'
import { EffectComposer, Bloom, ToneMapping } from '@react-three/postprocessing'
import { easing } from 'maath'
 
export default function Text() {
    return (
        <Canvas flat shadows camera={{ position: [-15, 0, 10] }}>
            <fog attach="fog" args={['black', 15, 22.5]} />
            <Stage intensity={0.5} environment="city" shadows={{ type: 'accumulative', bias: -0.001, intensity: Math.PI }} adjustCamera={false}>
            </Stage>
            <Grid renderOrder={-1} position={[0, -1.85, 0]} infiniteGrid cellSize={0.6} cellThickness={0.6} sectionSize={3.3} sectionThickness={1.5} sectionColor={[0.5, 0.5, 10]} fadeDistance={30} />
            <OrbitControls autoRotate autoRotateSpeed={0.05} enableZoom={false} makeDefault minPolarAngle={Math.PI / 2} maxPolarAngle={Math.PI / 2} />
            <EffectComposer disableNormalPass>
            </EffectComposer>
            <Environment background preset="warehouse" />
        </Canvas>
    )
}