File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export const start = (container = null) => {
11
11
let glitchDelay = 200 ;
12
12
let bypassTime = 0 ;
13
13
let isBypassing = false ;
14
- let renderer ;
15
14
16
15
const loader = new FontLoader ( ) ;
17
16
loader . load ( 'font/helvetiker_regular.typeface.json' , ( font ) => {
@@ -53,19 +52,17 @@ export const start = (container = null) => {
53
52
composer . addPass ( badTVPass ) ;
54
53
composer . addPass ( glitchPass ) ;
55
54
56
- renderer = composer . renderer ;
57
-
58
55
const onWindowResize = ( ) => {
59
56
const width = window . innerWidth ;
60
57
const height = ( width / 16 ) * 9 ;
61
58
62
59
camera . aspect = width / height ;
63
60
camera . updateProjectionMatrix ( ) ;
64
- renderer . setSize ( width , height ) ;
61
+ composer . renderer . setSize ( width , height ) ;
65
62
} ;
66
63
67
64
onWindowResize ( ) ;
68
- container . appendChild ( renderer . domElement ) ;
65
+ container . appendChild ( composer . renderer . domElement ) ;
69
66
window . addEventListener ( 'resize' , onWindowResize ) ;
70
67
71
68
const render = ( time ) => {
You can’t perform that action at this time.
0 commit comments