Pyramid FX | Projects

Pyramid FX

A glowing particle pyramid with multiple themed effects: lightning bolts, volcanic shards, arctic rings, emerald spirals and solar flares — all triggered from a single button.

  • Built with Three.js + Postprocessing
  • Multi-theme particle & lightning effects
  • GPU-accelerated WebGL scene
HTML

<body>
  <div id="ui-container">
    <button id="effect-trigger">
      Trigger Effect
    </button>
    <div id="effect-info">
      Lightning Storm
    </div>
  </div>

  <!-- Pyramid FX: Three.js scene with particle pyramid & effects -->
  <script type="module">
    // import three + addons, build pyramid & effects
    ...
  </script>
</body>
JavaScript

// Import Three.js + postprocessing
import * as THREE from "three";
// OrbitControls, EffectComposer, UnrealBloomPass...

// Create scene, camera, renderer
const scene  = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(...);
const renderer = new THREE.WebGLRenderer({ antialias: true });

// Build outer/inner particle pyramids + edge lines
function createParticlePyramid(...) { ... }

// Effect themes: lightning, shards, rings, spiral, flare
const effectThemes = [ ... ];

// Triggered by the button
document.getElementById("effect-trigger")
  .addEventListener("click", () => {
    // cycle themes + fire the current FX
  });

// Animation loop: rotate pyramids, update particles & FX
function animate() {
  requestAnimationFrame(animate);
  ...
}
animate();