Skip to content

Commit 332446f

Browse files
p4gsclaudehappy-otter
committed
Remove BokehPass depth-of-field post-processing
Reverts to direct renderer.render() — no more EffectComposer, RenderPass, or BokehPass imports/setup. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent acb3f80 commit 332446f

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

docs/projects/nthpartyfinder/index.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,7 @@
682682
{
683683
"imports": {
684684
"three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js",
685-
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/",
686-
"three/examples/jsm/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"
685+
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"
687686
}
688687
}
689688
</script>
@@ -919,9 +918,6 @@ <h2 class="section-title">Ready to Find Your Nth Party?</h2>
919918

920919
<script type="module">
921920
import * as THREE from 'three';
922-
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
923-
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
924-
import { BokehPass } from 'three/addons/postprocessing/BokehPass.js';
925921

926922
// ── CONFIG ──
927923
const NODE_COUNT = 120;
@@ -1184,22 +1180,11 @@ <h2 class="section-title">Ready to Find Your Nth Party?</h2>
11841180
}
11851181

11861182
// ── RESIZE ──
1187-
// ── POST-PROCESSING (Depth of Field) ──
1188-
const composer = new EffectComposer(renderer);
1189-
composer.addPass(new RenderPass(scene, camera));
1190-
const bokehPass = new BokehPass(scene, camera, {
1191-
focus: 4.0,
1192-
aperture: 0.008,
1193-
maxblur: 0.012,
1194-
});
1195-
composer.addPass(bokehPass);
1196-
11971183
function resize() {
11981184
const rect = hero.getBoundingClientRect();
11991185
const w = rect.width;
12001186
const h = rect.height;
12011187
renderer.setSize(w, h);
1202-
composer.setSize(w, h);
12031188
camera.aspect = w / h;
12041189
camera.updateProjectionMatrix();
12051190
}
@@ -1229,8 +1214,6 @@ <h2 class="section-title">Ready to Find Your Nth Party?</h2>
12291214
const lookY = Math.sin(t2 * 0.8) * 0.4;
12301215
const lookZ = Math.cos(t3 * 0.6) * 1.2;
12311216
camera.lookAt(lookX, lookY, lookZ);
1232-
// Update DOF focus to distance between camera and look target
1233-
bokehPass.uniforms['focus'].value = camera.position.distanceTo(new THREE.Vector3(lookX, lookY, lookZ));
12341217

12351218
// Pulse primary glow
12361219
const glowScale = 0.35 + 0.08 * Math.sin(elapsed * 1.5);
@@ -1275,7 +1258,7 @@ <h2 class="section-title">Ready to Find Your Nth Party?</h2>
12751258
}
12761259
}
12771260

1278-
composer.render();
1261+
renderer.render(scene, camera);
12791262
}
12801263
animate();
12811264
</script>

0 commit comments

Comments
 (0)