Environment Cycle

The original day/dusk/night/dawn palette and smoothstep stops as a standalone Three.js module, without Game, physics, a server or the full world.

Exact preview of Environment Cycle
Type
Component
Category
WebGL
Source license
MIT
Collection
Open Source Experiences

View source in the repository

Usage

// Place this example in vendor/experiences/bruno-2025/sources/example.js.
// Use that project's isolated dependencies and Vite setup (see its README).
// Rebuild the included native runtimes with: npm run build:experiences

import { EnvironmentCycle } from '../parts/EnvironmentCycle.js';

const cycle = new EnvironmentCycle({ duration: 240, progress: 0.02 });
function frame(elapsedSeconds) {
  cycle.update(elapsedSeconds);
  cycle.apply({ scene, light: directionalLight, fog: scene.fog });
  // cycle.values also exposes shadowColor, revealColor and temperature.
  renderer.render(scene, camera);
}
// Or cycle.setProgress(0.46) for a fixed night environment.

License and credits

Bruno Simon · Folio 2025 by Bruno Simon. Original upstream source

Read the original MIT license

Credits and asset notices

Third-party assets and dependencies

vendor/experiences/bruno-2025/ASSET_NOTICES.md

Keep the original source and media notices with your copy.

Explore more

  • Liquid FormExact preview of Liquid Form

    A centered silver ray-marched liquid form with authored studio reflections and pointer-responsive camera drift.

  • Boarding PassExact preview of Boarding Pass

    A live flight pass whose changed gate and times roll over like a departures board.

  • Aurora TextExact preview of Aurora Text

    Multi-colour aurora motion within a large type specimen.

Frontfield homepage