@@ -66,7 +66,7 @@ export class BloomEffect extends Effect {
6666 /**
6767 * A luminance shader pass.
6868 *
69- * You may disable this pass to deactivate luminance filtering.
69+ * This pass can be disabled to skip luminance filtering.
7070 *
7171 * @type {LuminancePass }
7272 * @deprecated Use getLuminancePass() instead.
@@ -77,8 +77,8 @@ export class BloomEffect extends Effect {
7777 colorOutput : true
7878 } ) ;
7979
80- this . luminanceMaterial . setThreshold ( luminanceThreshold ) ;
81- this . luminanceMaterial . setSmoothingFactor ( luminanceSmoothing ) ;
80+ this . luminanceMaterial . threshold = luminanceThreshold ;
81+ this . luminanceMaterial . smoothingFactor = luminanceSmoothing ;
8282
8383 /**
8484 * A blur pass.
@@ -90,10 +90,7 @@ export class BloomEffect extends Effect {
9090 this . blurPass = new KawaseBlurPass ( { resolutionScale, width, height, kernelSize } ) ;
9191
9292 const resolution = this . blurPass . getResolution ( ) ;
93- resolution . addEventListener ( "change" , ( e ) => this . setSize (
94- resolution . getBaseWidth ( ) ,
95- resolution . getBaseHeight ( )
96- ) ) ;
93+ resolution . addEventListener ( "change" , ( e ) => this . setSize ( resolution . baseWidth , resolution . baseHeight ) ) ;
9794
9895 }
9996
@@ -131,7 +128,7 @@ export class BloomEffect extends Effect {
131128
132129 get resolution ( ) {
133130
134- return this . getResolution ( ) ;
131+ return this . blurPass . resolution ;
135132
136133 }
137134
@@ -143,7 +140,7 @@ export class BloomEffect extends Effect {
143140
144141 getResolution ( ) {
145142
146- return this . blurPass . getResolution ( ) ;
143+ return this . blurPass . resolution ;
147144
148145 }
149146
@@ -180,7 +177,7 @@ export class BloomEffect extends Effect {
180177
181178 get luminanceMaterial ( ) {
182179
183- return this . luminancePass . getFullscreenMaterial ( ) ;
180+ return this . luminancePass . fullscreenMaterial ;
184181
185182 }
186183
@@ -192,7 +189,7 @@ export class BloomEffect extends Effect {
192189
193190 getLuminanceMaterial ( ) {
194191
195- return this . luminancePass . getFullscreenMaterial ( ) ;
192+ return this . luminancePass . fullscreenMaterial ;
196193
197194 }
198195
@@ -205,20 +202,13 @@ export class BloomEffect extends Effect {
205202
206203 get width ( ) {
207204
208- return this . getResolution ( ) . getWidth ( ) ;
205+ return this . resolution . width ;
209206
210207 }
211208
212- /**
213- * Sets the render width.
214- *
215- * @type {Number }
216- * @deprecated Use getResolution().setPreferredWidth() instead.
217- */
218-
219209 set width ( value ) {
220210
221- this . getResolution ( ) . setPreferredWidth ( value ) ;
211+ this . resolution . preferredWidth = value ;
222212
223213 }
224214
@@ -231,28 +221,21 @@ export class BloomEffect extends Effect {
231221
232222 get height ( ) {
233223
234- return this . getResolution ( ) . getHeight ( ) ;
224+ return this . resolution . height ;
235225
236226 }
237227
238- /**
239- * Sets the render height.
240- *
241- * @type {Number }
242- * @deprecated Use getResolution().setPreferredHeight() instead.
243- */
244-
245228 set height ( value ) {
246229
247- this . getResolution ( ) . setPreferredHeight ( value ) ;
230+ this . resolution . preferredHeight = value ;
248231
249232 }
250233
251234 /**
252235 * Indicates whether dithering is enabled.
253236 *
254237 * @type {Boolean }
255- * @deprecated Use EffectPass.getFullscreenMaterial() .dithering instead.
238+ * @deprecated Use EffectPass.fullscreenMaterial .dithering instead.
256239 */
257240
258241 get dithering ( ) {
@@ -261,13 +244,6 @@ export class BloomEffect extends Effect {
261244
262245 }
263246
264- /**
265- * Enables or disables dithering.
266- *
267- * @type {Boolean }
268- * @deprecated Use EffectPass.getFullscreenMaterial().dithering instead.
269- */
270-
271247 set dithering ( value ) {
272248
273249 this . blurPass . dithering = value ;
@@ -283,18 +259,13 @@ export class BloomEffect extends Effect {
283259
284260 get kernelSize ( ) {
285261
286- return this . blurPass . getKernelSize ( ) ;
262+ return this . blurPass . kernelSize ;
287263
288264 }
289265
290- /**
291- * @type {KernelSize }
292- * @deprecated Use getBlurPass().setKernelSize() instead.
293- */
294-
295266 set kernelSize ( value ) {
296267
297- this . blurPass . setKernelSize ( value ) ;
268+ this . blurPass . kernelSize = value ;
298269
299270 }
300271
@@ -305,22 +276,14 @@ export class BloomEffect extends Effect {
305276
306277 get distinction ( ) {
307278
308- console . warn ( this . name , "distinction was removed, use getLuminanceMaterial().getThreshold() and " +
309- "getLuminanceMaterial().getSmoothingFactor() instead." ) ;
310-
279+ console . warn ( this . name , "distinction was removed" ) ;
311280 return 1.0 ;
312281
313282 }
314283
315- /**
316- * @type {Number }
317- * @deprecated Use getLuminanceMaterial().setThreshold() and ...setSmoothingFactor() instead.
318- */
319-
320284 set distinction ( value ) {
321285
322- console . warn ( this . name , "distinction was removed, use getLuminanceMaterial().setThreshold() and " +
323- "getLuminanceMaterial().setSmoothingFactor() instead." ) ;
286+ console . warn ( this . name , "distinction was removed" ) ;
324287
325288 }
326289
@@ -333,20 +296,13 @@ export class BloomEffect extends Effect {
333296
334297 get intensity ( ) {
335298
336- return this . getIntensity ( ) ;
299+ return this . uniforms . get ( "intensity" ) . value ;
337300
338301 }
339302
340- /**
341- * Sets the bloom intensity.
342- *
343- * @type {Number }
344- * @deprecated Use setIntensity() instead.
345- */
346-
347303 set intensity ( value ) {
348304
349- this . setIntensity ( value ) ;
305+ this . uniforms . get ( "intensity" ) . value = value ;
350306
351307 }
352308
@@ -358,7 +314,7 @@ export class BloomEffect extends Effect {
358314
359315 getIntensity ( ) {
360316
361- return this . uniforms . get ( " intensity" ) . value ;
317+ return this . intensity ;
362318
363319 }
364320
@@ -370,7 +326,7 @@ export class BloomEffect extends Effect {
370326
371327 setIntensity ( value ) {
372328
373- this . uniforms . get ( " intensity" ) . value = value ;
329+ this . intensity = value ;
374330
375331 }
376332
@@ -383,7 +339,7 @@ export class BloomEffect extends Effect {
383339
384340 getResolutionScale ( ) {
385341
386- return this . getResolution ( ) . getScale ( ) ;
342+ return this . resolution . scale ;
387343
388344 }
389345
@@ -396,7 +352,7 @@ export class BloomEffect extends Effect {
396352
397353 setResolutionScale ( scale ) {
398354
399- this . getResolution ( ) . setScale ( scale ) ;
355+ this . resolution . scale = scale ;
400356
401357 }
402358
@@ -412,7 +368,7 @@ export class BloomEffect extends Effect {
412368
413369 const renderTarget = this . renderTarget ;
414370
415- if ( this . luminancePass . isEnabled ( ) ) {
371+ if ( this . luminancePass . enabled ) {
416372
417373 this . luminancePass . render ( renderer , inputBuffer , renderTarget ) ;
418374 this . blurPass . render ( renderer , renderTarget , renderTarget ) ;
@@ -434,10 +390,10 @@ export class BloomEffect extends Effect {
434390
435391 setSize ( width , height ) {
436392
437- const resolution = this . getResolution ( ) ;
393+ const resolution = this . resolution ;
438394 resolution . setBaseSize ( width , height ) ;
439- this . renderTarget . setSize ( resolution . getWidth ( ) , resolution . getHeight ( ) ) ;
440- this . luminancePass . getResolution ( ) . copy ( resolution ) ;
395+ this . renderTarget . setSize ( resolution . width , resolution . height ) ;
396+ this . luminancePass . resolution . copy ( resolution ) ;
441397
442398 }
443399
0 commit comments