|
41 | 41 | import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; |
42 | 42 | import { Inspector } from 'three/addons/inspector/Inspector.js'; |
43 | 43 |
|
44 | | - let camera, scene, renderer, postProcessing; |
| 44 | + let camera, scene, renderer, renderPipeline; |
45 | 45 |
|
46 | 46 | let stereo, anaglyph, parallaxBarrier; |
47 | 47 |
|
|
108 | 108 | renderer.inspector = new Inspector(); |
109 | 109 | document.body.appendChild( renderer.domElement ); |
110 | 110 |
|
111 | | - postProcessing = new THREE.PostProcessing( renderer ); |
| 111 | + renderPipeline = new THREE.RenderPipeline( renderer ); |
112 | 112 | stereo = stereoPass( scene, camera ); |
113 | 113 | anaglyph = anaglyphPass( scene, camera ); |
114 | 114 | parallaxBarrier = parallaxBarrierPass( scene, camera ); |
115 | 115 |
|
116 | | - postProcessing.outputNode = stereo; |
| 116 | + renderPipeline.outputNode = stereo; |
117 | 117 |
|
118 | 118 | const gui = renderer.inspector.createParameters( 'Stereo Settings' ); |
119 | 119 | gui.add( params, 'effect', effects ).onChange( update ); |
|
138 | 138 |
|
139 | 139 | if ( value === 'stereo' ) { |
140 | 140 |
|
141 | | - postProcessing.outputNode = stereo; |
| 141 | + renderPipeline.outputNode = stereo; |
142 | 142 |
|
143 | 143 | } else if ( value === 'anaglyph' ) { |
144 | 144 |
|
145 | | - postProcessing.outputNode = anaglyph; |
| 145 | + renderPipeline.outputNode = anaglyph; |
146 | 146 |
|
147 | 147 | } else if ( value === 'parallaxBarrier' ) { |
148 | 148 |
|
149 | | - postProcessing.outputNode = parallaxBarrier; |
| 149 | + renderPipeline.outputNode = parallaxBarrier; |
150 | 150 |
|
151 | 151 | } |
152 | 152 |
|
153 | | - postProcessing.needsUpdate = true; |
| 153 | + renderPipeline.needsUpdate = true; |
154 | 154 |
|
155 | 155 | } |
156 | 156 |
|
|
194 | 194 |
|
195 | 195 | } |
196 | 196 |
|
197 | | - postProcessing.render(); |
| 197 | + renderPipeline.render(); |
198 | 198 |
|
199 | 199 | } |
200 | 200 |
|
|
0 commit comments