1- import { OrbitControls } from '@react-three/drei'
2- import { Perf } from 'r3f-perf'
3- import { DepthOfField , Bloom , Noise , Glitch , ToneMapping , Vignette , EffectComposer } from '@react-three/postprocessing'
4- import { GlitchMode , BlendFunction } from 'postprocessing'
5- import Drunk from './Drunk.jsx'
6- import { useRef } from 'react'
7- import { useControls } from 'leva'
1+ import {
2+ Text ,
3+ Html ,
4+ ContactShadows ,
5+ PresentationControls ,
6+ Float ,
7+ Environment ,
8+ useGLTF
9+ } from '@react-three/drei' ;
810
9- export default function Experience ( )
10- {
11- const drunkRef = useRef ( )
11+ export default function Experience ( ) {
12+ const computer = useGLTF (
13+ 'https://vazxmixjsiawhamofees.supabase.co/storage/v1/object/public/models/macbook/model.gltf'
14+ ) ;
1215
13- const drunkProps = useControls ( 'Drunk Effect' , {
14- frequency : { value : 2 , min : 1 , max : 20 } ,
15- amplitude : { value : 0.1 , min : 0 , max : 1 }
16- } )
16+ return (
17+ < >
18+ < color args = { [ '#241a1a' ] } attach = "background" />
1719
18- return < >
19- < color args = { [ '#ffffff' ] } attach = "background" />
20+ < Environment preset = "city" />
2021
21- < EffectComposer disableNormalPass >
22- { /* <Vignette
23- offset={ 0.3 }
24- darkness={ 0.9 }
25- blendFunction={ BlendFunction.NORMAL }
26- />
27- <Glitch
28- delay={ [ 0.5, 1 ] }
29- duration={ [ 0.1, 0.3 ] }
30- strength={ [ 0.2, 0.4 ] }
31- mode={ GlitchMode.CONSTANT_MILD }
32- />
33- <Noise
34- premultiply
35- blendFunction={ BlendFunction.SOFT_LIGHT }
36- />
37- <Bloom
38- mipmapBlur
39- intensity={ 0.5 }
40- luminanceThreshold={ 0 }
41- />
42- <DepthOfField
43- focusDistance={ 0.025 }
44- focalLength={ 0.025 }
45- bokehScale={ 6 }
46- /> */ }
47- < Drunk
48- ref = { drunkRef }
49- { ...drunkProps }
50- blendFunction = { BlendFunction . DARKEN }
51- />
52- < ToneMapping />
53- </ EffectComposer >
22+ < PresentationControls
23+ global
24+ rotation = { [ 0.13 , 0.1 , 0 ] }
25+ polar = { [ - 0.4 , 0.2 ] }
26+ azimuth = { [ - 1 , 0.75 ] }
27+ config = { { mass : 2 , tension : 400 } }
28+ snap = { { mass : 4 , tension : 400 } }
29+ >
30+ < Float rotationIntensity = { 0.4 } >
31+ < rectAreaLight
32+ width = { 2.5 }
33+ height = { 1.65 }
34+ intensity = { 65 }
35+ color = { '#ff6900' }
36+ rotation = { [ - 0.1 , Math . PI , 0 ] }
37+ position = { [ 0 , 0.55 , - 1.15 ] }
38+ />
5439
55- < Perf position = "top-left" />
40+ < primitive
41+ object = { computer . scene }
42+ position-y = { - 1.2 }
43+ // rotation-x={ 0.13 }
44+ >
45+ < Html
46+ transform
47+ wrapperClass = "htmlScreen"
48+ distanceFactor = { 1.17 }
49+ position = { [ 0 , 1.56 , - 1.4 ] }
50+ rotation-x = { - 0.256 }
51+ >
52+ < iframe src = "https://bruno-simon.com/html/" />
53+ </ Html >
54+ </ primitive >
5655
57- < OrbitControls makeDefault />
58-
59- < directionalLight castShadow position = { [ 1 , 2 , 3 ] } intensity = { 4.5 } />
60- < ambientLight intensity = { 1.5 } />
61-
62- < mesh castShadow position-x = { - 2 } >
63- < sphereGeometry />
64- < meshStandardMaterial color = "orange" />
65- </ mesh >
66-
67- < mesh castShadow position-x = { 2 } scale = { 1.5 } >
68- < boxGeometry />
69- < meshStandardMaterial color = "mediumpurple" />
70- </ mesh >
71-
72- < mesh receiveShadow position-y = { - 1 } rotation-x = { - Math . PI * 0.5 } scale = { 10 } >
73- < planeGeometry />
74- < meshStandardMaterial color = "greenyellow" />
75- </ mesh >
56+ < Text
57+ font = "./bangers-v20-latin-regular.woff"
58+ fontSize = { 1 }
59+ position = { [ 2 , 0.75 , 0.75 ] }
60+ rotation-y = { - 1.25 }
61+ maxWidth = { 2 }
62+ >
63+ Davide Vignozzi
64+ </ Text >
65+ </ Float >
66+ </ PresentationControls >
7667
68+ < ContactShadows
69+ position-y = { - 1.4 }
70+ opacity = { 0.4 }
71+ scale = { 5 }
72+ blur = { 2.4 }
73+ />
7774 </ >
78- }
75+ ) ;
76+ }
0 commit comments