diff --git a/examples/js/postprocessing/EffectComposer.js b/examples/js/postprocessing/EffectComposer.js index 3c3fa65b64d7c1..48e09e209046b2 100644 --- a/examples/js/postprocessing/EffectComposer.js +++ b/examples/js/postprocessing/EffectComposer.js @@ -2,6 +2,12 @@ * @author alteredq / http://alteredqualia.com/ */ +if ( THREE.Pass === undefined ) { + + console.warn( 'THREE.Pass has been moved into a separate file, "postprocessing/Pass.js". Include it, as well.' ); + +} + THREE.EffectComposer = function ( renderer, renderTarget ) { this.renderer = renderer; @@ -158,32 +164,3 @@ Object.assign( THREE.EffectComposer.prototype, { } } ); - - -THREE.Pass = function () { - - // if set to true, the pass is processed by the composer - this.enabled = true; - - // if set to true, the pass indicates to swap read and write buffer after rendering - this.needsSwap = true; - - // if set to true, the pass clears its buffer before rendering - this.clear = false; - - // if set to true, the result of the pass is rendered to screen - this.renderToScreen = false; - -}; - -Object.assign( THREE.Pass.prototype, { - - setSize: function ( width, height ) {}, - - render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { - - console.error( 'THREE.Pass: .render() must be implemented in derived pass.' ); - - } - -} ); diff --git a/examples/js/postprocessing/Pass.js b/examples/js/postprocessing/Pass.js new file mode 100644 index 00000000000000..14ca46949c2b7c --- /dev/null +++ b/examples/js/postprocessing/Pass.js @@ -0,0 +1,27 @@ +THREE.Pass = function () { + + // if set to true, the pass is processed by the composer + this.enabled = true; + + // if set to true, the pass indicates to swap read and write buffer after rendering + this.needsSwap = true; + + // if set to true, the pass clears its buffer before rendering + this.clear = false; + + // if set to true, the result of the pass is rendered to screen + this.renderToScreen = false; + +}; + +Object.assign( THREE.Pass.prototype, { + + setSize: function ( width, height ) {}, + + render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { + + console.error( 'THREE.Pass: .render() must be implemented in derived pass.' ); + + } + +} ); diff --git a/examples/misc_controls_fly.html b/examples/misc_controls_fly.html index 01dd637fbe4d9d..e2c29bf28d4865 100644 --- a/examples/misc_controls_fly.html +++ b/examples/misc_controls_fly.html @@ -40,6 +40,7 @@ + diff --git a/examples/webgl_loader_sea3d.html b/examples/webgl_loader_sea3d.html index e9b776915497fa..30fb425d3b35cf 100644 --- a/examples/webgl_loader_sea3d.html +++ b/examples/webgl_loader_sea3d.html @@ -37,6 +37,7 @@ + diff --git a/examples/webgl_loader_sea3d_hierarchy.html b/examples/webgl_loader_sea3d_hierarchy.html index 6378b08249cc00..ee154c02193f1d 100644 --- a/examples/webgl_loader_sea3d_hierarchy.html +++ b/examples/webgl_loader_sea3d_hierarchy.html @@ -37,6 +37,7 @@ + diff --git a/examples/webgl_loader_sea3d_keyframe.html b/examples/webgl_loader_sea3d_keyframe.html index c3feeba134c189..fa2badd0d7cbd3 100644 --- a/examples/webgl_loader_sea3d_keyframe.html +++ b/examples/webgl_loader_sea3d_keyframe.html @@ -37,6 +37,7 @@ + diff --git a/examples/webgl_loader_sea3d_morph.html b/examples/webgl_loader_sea3d_morph.html index 787d87a51ad239..cc787971b32bbc 100644 --- a/examples/webgl_loader_sea3d_morph.html +++ b/examples/webgl_loader_sea3d_morph.html @@ -37,6 +37,7 @@ + diff --git a/examples/webgl_loader_sea3d_physics.html b/examples/webgl_loader_sea3d_physics.html index a3b16023a17a70..32e42d0b8d75ca 100644 --- a/examples/webgl_loader_sea3d_physics.html +++ b/examples/webgl_loader_sea3d_physics.html @@ -37,6 +37,7 @@ + diff --git a/examples/webgl_loader_sea3d_skinning.html b/examples/webgl_loader_sea3d_skinning.html index 7762b5d59f5ede..27d332c44f8ce9 100644 --- a/examples/webgl_loader_sea3d_skinning.html +++ b/examples/webgl_loader_sea3d_skinning.html @@ -39,6 +39,7 @@ + diff --git a/examples/webgl_loader_sea3d_sound.html b/examples/webgl_loader_sea3d_sound.html index 60800986d3390f..b257f0cc70c0f1 100644 --- a/examples/webgl_loader_sea3d_sound.html +++ b/examples/webgl_loader_sea3d_sound.html @@ -84,6 +84,7 @@ + diff --git a/examples/webgl_marchingcubes.html b/examples/webgl_marchingcubes.html index 4df773de76536b..d38f2b85fc22cb 100644 --- a/examples/webgl_marchingcubes.html +++ b/examples/webgl_marchingcubes.html @@ -63,6 +63,7 @@ + diff --git a/examples/webgl_materials_bumpmap_skin.html b/examples/webgl_materials_bumpmap_skin.html index fc7f49e52187bb..afd754e60e73db 100644 --- a/examples/webgl_materials_bumpmap_skin.html +++ b/examples/webgl_materials_bumpmap_skin.html @@ -46,6 +46,7 @@ + diff --git a/examples/webgl_materials_cubemap_dynamic.html b/examples/webgl_materials_cubemap_dynamic.html index 714511750b206f..c01193ef165e9c 100644 --- a/examples/webgl_materials_cubemap_dynamic.html +++ b/examples/webgl_materials_cubemap_dynamic.html @@ -65,6 +65,7 @@ + diff --git a/examples/webgl_materials_normalmap.html b/examples/webgl_materials_normalmap.html index ccd2f5f8f0997b..e0e8d2936613f8 100644 --- a/examples/webgl_materials_normalmap.html +++ b/examples/webgl_materials_normalmap.html @@ -62,6 +62,7 @@ + diff --git a/examples/webgl_materials_reflectivity.html b/examples/webgl_materials_reflectivity.html index 50e7511280689d..cd60a46f225006 100644 --- a/examples/webgl_materials_reflectivity.html +++ b/examples/webgl_materials_reflectivity.html @@ -42,6 +42,7 @@ + diff --git a/examples/webgl_materials_skin.html b/examples/webgl_materials_skin.html index 9d59cb368e3e89..231da7f7243ee7 100644 --- a/examples/webgl_materials_skin.html +++ b/examples/webgl_materials_skin.html @@ -49,6 +49,7 @@ + diff --git a/examples/webgl_materials_video.html b/examples/webgl_materials_video.html index f7630e1159270f..cd371da4fa6562 100644 --- a/examples/webgl_materials_video.html +++ b/examples/webgl_materials_video.html @@ -41,6 +41,7 @@ + diff --git a/examples/webgl_points_dynamic.html b/examples/webgl_points_dynamic.html index c7715d2fd2b554..713272a7869bd3 100644 --- a/examples/webgl_points_dynamic.html +++ b/examples/webgl_points_dynamic.html @@ -43,6 +43,7 @@ + diff --git a/examples/webgl_postprocessing.html b/examples/webgl_postprocessing.html index ca41bcf35228e2..7fc81589c1b891 100644 --- a/examples/webgl_postprocessing.html +++ b/examples/webgl_postprocessing.html @@ -20,6 +20,7 @@ + diff --git a/examples/webgl_postprocessing_advanced.html b/examples/webgl_postprocessing_advanced.html index 73bd863312f6aa..87f282d9653c0e 100644 --- a/examples/webgl_postprocessing_advanced.html +++ b/examples/webgl_postprocessing_advanced.html @@ -53,6 +53,7 @@ + diff --git a/examples/webgl_postprocessing_afterimage.html b/examples/webgl_postprocessing_afterimage.html index d1f662b0915ed0..5c315a3456991e 100644 --- a/examples/webgl_postprocessing_afterimage.html +++ b/examples/webgl_postprocessing_afterimage.html @@ -19,6 +19,7 @@ + diff --git a/examples/webgl_postprocessing_backgrounds.html b/examples/webgl_postprocessing_backgrounds.html index 4613f601959b15..261afe507a900d 100644 --- a/examples/webgl_postprocessing_backgrounds.html +++ b/examples/webgl_postprocessing_backgrounds.html @@ -41,6 +41,7 @@ + diff --git a/examples/webgl_postprocessing_dof.html b/examples/webgl_postprocessing_dof.html index 34b231b0e49d4f..1784d33252898d 100644 --- a/examples/webgl_postprocessing_dof.html +++ b/examples/webgl_postprocessing_dof.html @@ -38,6 +38,7 @@ + diff --git a/examples/webgl_postprocessing_glitch.html b/examples/webgl_postprocessing_glitch.html index 164a00c1ef049a..4dd554aa9adbb3 100644 --- a/examples/webgl_postprocessing_glitch.html +++ b/examples/webgl_postprocessing_glitch.html @@ -33,6 +33,7 @@ + diff --git a/examples/webgl_postprocessing_masking.html b/examples/webgl_postprocessing_masking.html index e2df2431fadb2d..5fa8e8be61386b 100644 --- a/examples/webgl_postprocessing_masking.html +++ b/examples/webgl_postprocessing_masking.html @@ -20,6 +20,7 @@ + diff --git a/examples/webgl_postprocessing_nodes_pass.html b/examples/webgl_postprocessing_nodes_pass.html index 818383295324c5..d57517733d5e29 100644 --- a/examples/webgl_postprocessing_nodes_pass.html +++ b/examples/webgl_postprocessing_nodes_pass.html @@ -36,6 +36,7 @@ + diff --git a/examples/webgl_postprocessing_outline.html b/examples/webgl_postprocessing_outline.html index b04a3c86927184..9404efb7f17d65 100644 --- a/examples/webgl_postprocessing_outline.html +++ b/examples/webgl_postprocessing_outline.html @@ -41,6 +41,7 @@ + diff --git a/examples/webgl_postprocessing_pixel.html b/examples/webgl_postprocessing_pixel.html index b24c1f3b52491c..9b25d5ef699442 100644 --- a/examples/webgl_postprocessing_pixel.html +++ b/examples/webgl_postprocessing_pixel.html @@ -42,6 +42,7 @@ + diff --git a/examples/webgl_postprocessing_rgb_halftone.html b/examples/webgl_postprocessing_rgb_halftone.html index aead503cecf548..0377d5fac09c8a 100644 --- a/examples/webgl_postprocessing_rgb_halftone.html +++ b/examples/webgl_postprocessing_rgb_halftone.html @@ -31,6 +31,7 @@ + diff --git a/examples/webgl_postprocessing_sao.html b/examples/webgl_postprocessing_sao.html index c20a7ecbead4b3..38becc5ba87899 100644 --- a/examples/webgl_postprocessing_sao.html +++ b/examples/webgl_postprocessing_sao.html @@ -34,6 +34,7 @@ + diff --git a/examples/webgl_postprocessing_smaa.html b/examples/webgl_postprocessing_smaa.html index ab351cc7138f80..78eb0f0693acf6 100644 --- a/examples/webgl_postprocessing_smaa.html +++ b/examples/webgl_postprocessing_smaa.html @@ -22,6 +22,7 @@ + diff --git a/examples/webgl_postprocessing_sobel.html b/examples/webgl_postprocessing_sobel.html index 99e40be0753d17..31a3b518b50dd3 100644 --- a/examples/webgl_postprocessing_sobel.html +++ b/examples/webgl_postprocessing_sobel.html @@ -40,6 +40,7 @@ + diff --git a/examples/webgl_postprocessing_ssaa.html b/examples/webgl_postprocessing_ssaa.html index 59adb6ec894055..4ab738c68a679c 100644 --- a/examples/webgl_postprocessing_ssaa.html +++ b/examples/webgl_postprocessing_ssaa.html @@ -43,6 +43,7 @@ + diff --git a/examples/webgl_postprocessing_ssaa_unbiased.html b/examples/webgl_postprocessing_ssaa_unbiased.html index 3ca1cb4f395b8e..5b5b4a12fe1a93 100644 --- a/examples/webgl_postprocessing_ssaa_unbiased.html +++ b/examples/webgl_postprocessing_ssaa_unbiased.html @@ -43,6 +43,7 @@ + diff --git a/examples/webgl_postprocessing_ssao.html b/examples/webgl_postprocessing_ssao.html index c0a98a0c4c6ee0..f0a6f2011d15dd 100644 --- a/examples/webgl_postprocessing_ssao.html +++ b/examples/webgl_postprocessing_ssao.html @@ -44,6 +44,7 @@ + diff --git a/examples/webgl_postprocessing_taa.html b/examples/webgl_postprocessing_taa.html index 258242aca10338..e0530cad5726f8 100644 --- a/examples/webgl_postprocessing_taa.html +++ b/examples/webgl_postprocessing_taa.html @@ -44,6 +44,7 @@ + diff --git a/examples/webgl_postprocessing_unreal_bloom.html b/examples/webgl_postprocessing_unreal_bloom.html index 70af880009a8b7..2febafff8d5bfd 100644 --- a/examples/webgl_postprocessing_unreal_bloom.html +++ b/examples/webgl_postprocessing_unreal_bloom.html @@ -56,6 +56,7 @@ + diff --git a/examples/webgl_shader_lava.html b/examples/webgl_shader_lava.html index dca91e3733af88..5d35d4e1272182 100644 --- a/examples/webgl_shader_lava.html +++ b/examples/webgl_shader_lava.html @@ -42,6 +42,7 @@ + diff --git a/examples/webgl_shaders_tonemapping.html b/examples/webgl_shaders_tonemapping.html index de09af042933c1..60337e6496d965 100644 --- a/examples/webgl_shaders_tonemapping.html +++ b/examples/webgl_shaders_tonemapping.html @@ -48,6 +48,7 @@ + diff --git a/examples/webgl_tiled_forward.html b/examples/webgl_tiled_forward.html index 4af891797f040d..c3f91c160d4cf3 100644 --- a/examples/webgl_tiled_forward.html +++ b/examples/webgl_tiled_forward.html @@ -34,6 +34,7 @@ + diff --git a/examples/webgl_tonemapping.html b/examples/webgl_tonemapping.html index e7fed73b3def2d..ebfa83a488580c 100644 --- a/examples/webgl_tonemapping.html +++ b/examples/webgl_tonemapping.html @@ -43,6 +43,7 @@ + diff --git a/examples/webgldeferred_animation.html b/examples/webgldeferred_animation.html index e1431580b620ef..d6312d1993cfeb 100644 --- a/examples/webgldeferred_animation.html +++ b/examples/webgldeferred_animation.html @@ -44,6 +44,7 @@ +