Skip to content

Commit

Permalink
Update bloom.js to get rid of reduntant parts already implemented in …
Browse files Browse the repository at this point in the history
…superthree
  • Loading branch information
enzofrancescaHM authored Feb 1, 2025
1 parent 4c2cb7c commit 0a342d0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions examples/showcase/post-processing/bloom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ import { EffectComposer } from "three/addons/postprocessing/EffectComposer.js";
import { RenderPass } from "three/addons/postprocessing/RenderPass.js";
import { UnrealBloomPass } from "three/addons/postprocessing/UnrealBloomPass.js";
import { OutputPass } from "three/addons/postprocessing/OutputPass.js";
import { FullScreenQuad } from "three/addons/postprocessing/Pass.js";

// Disable XR projection for fullscreen effects
// https://github.com/mrdoob/three.js/pull/26160
const _render = FullScreenQuad.prototype.render;
FullScreenQuad.prototype.render = function (renderer) {
const xrEnabled = renderer.xr.enabled;
renderer.xr.enabled = false;
_render.apply(this, arguments);
renderer.xr.enabled = xrEnabled;
};

AFRAME.registerComponent("bloom", {
schema: {
Expand All @@ -34,10 +23,6 @@ AFRAME.registerComponent("bloom", {
this.renderer.getSize(this.size);
this.composer.setSize(this.size.width, this.size.height);
},
"enter-vr": function () {
this.renderer.getSize(this.size);
this.composer.setSize(this.size.width, this.size.height);
},
},
init() {
this.size = new THREE.Vector2();
Expand Down

0 comments on commit 0a342d0

Please sign in to comment.