<!-- NEW3 — TEST 3 · THE RIVER'S JOURNEY · part 10 -->
(dt, t);
  } else if (mode === 'diving' || mode === 'rising') {
    trans.k += dt / trans.dur;
    const s = smooth(Math.min(1, trans.k));
    king.update(dt);
    if (mode === 'diving') {
      const bt = boomTarget();
      _v1.copy(bt.position);
      _v2.lerpVectors(trans.fromLook, bt.look, s);
      camera.position.lerpVectors(trans.fromPos, _v1, s);
      camera.lookAt(_v2);
      if (trans.k >= 1) { mode = 'street'; document.body.classList.add('inside'); enterBtn.textContent = 'EXIT TO THE SKY'; }
    } else {
      camera.position.lerpVectors(trans.fromPos, trans.toPos, s);
      _v1.lerpVectors(trans.fromLook, trans.toLook, s);
      camera.lookAt(_v1);
      if (trans.k >= 1) { mode = 'sky'; document.body.classList.remove('inside'); enterBtn.textContent = 'ENTER THE CITY'; king.hide(); }
    }
  } else {
    king.update(dt);
    king.boom(camera, dt);
  }
  renderer.render(scene, camera);
  frames++;
  censusTimer += dt;
  if (censusTimer > 0.5) {
    censusTimer = 0;
    const ri = renderer.info.render;
    let line = 'THE WITNESS · ' + MAP.name + '\n' +
      'regions ' + meta.counts.regions + ' · fashion ' + meta.counts.fashion + ' · towers ' + meta.counts.towers + ' · houses ' + meta.counts.houses + '\n' +
      'bridges ' + meta.counts.bridges + ' · water ' + meta.waterKm + ' km · draw calls ' + ri.calls + ' · triangles ' + ri.triangles.toLocaleString('en-US');
    if (mode !== 'sky') line += '\nYou are in the world — near ' + nearestRegion();
    witnessEl.textContent = line;
  }
}
frame();
window.addEventListener('resize', () => {
  renderer.setSize(window.innerWidth, window.innerHeight);
  stage.setAspect(window.innerWidth, window.innerHeight);
});
</script>
</body>
</html>


===== FILE: public/new3/lib/three.core.js =====
/**
 * @license
 * Copyright 2010-2026 Three.js Authors
 * SPDX-License-Identifier: MIT
 */
const REVISION = '186';

/**
 * Represents mouse buttons and interaction types in context of controls.
 *
 * @type {ConstantsMouse}
 * @constant
 */
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };

/**
 * Represents touch interaction types in context of controls.
 *
 * @type {ConstantsTouch}
 * @constant
 */
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };

/**
 * Disables face culling.
 *
 * @type {number}
 * @constant
 */
const CullFaceNone = 0;

/**
 * Culls back faces.
 *
 * @type {number}
 * @constant
 */
const CullFaceBack = 1;

/**
 * Culls front faces.
 *
 * @type {number}
 * @constant
 */
const CullFaceFront = 2;

/**
 * Culls both front and back faces.
 *
 * @type {number}
 * @constant
 */
const CullFaceFrontBack = 3;

/**
 * Gives unfiltered shadow maps - fastest, but lowest quality.
 *
 * @type {number}
 * @constant
 */
const BasicShadowMap = 0;

/**
 * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm.
 *
 * @type {number}
 * @constant
 */
const PCFShadowMap = 1;

/**
 * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm with
 * better soft shadows especially when using low-resolution shadow maps.
 *
 * @type {number}
 * @constant
 * @deprecated since r186. Use `PCFShadowMap` instead.
 */
const PCFSoftShadowMap = 2;

/**
 * Filters shadow maps using the Variance Shadow Map (VSM) algorithm.
 * When using VSMShadowMap all shadow receivers will also cast shadows.
 *
 * @type {number}
 * @constant
 */
const VSMShadowMap = 3;

/**
 * Only front faces are rendered.
 *
 * @type {number}
 * @constant
 */
const FrontSide = 0;

/**
 * Only back faces are rendered.
 *
 * @type {number}
 * @constant
 */
const BackSide = 1;

/**
 * Both front and back faces are rendered.
 *
 * @type {number}
 * @constant
 */
const DoubleSide = 2;

/**
 * No blending is performed which effectively disables
 * alpha transparency.
 *
 * @type {number}
 * @constant
 */
const NoBlending = 0;

/**
 * The default blending.
 *
 * @type {number}
 * @constant
 */
const NormalBlending = 1;

/**
 * Represents additive blending.
 *
 * @type {number}
 * @constant
 */
const AdditiveBlending = 2;

/**
 * Represents subtractive blending.
 *
 * @type {number}
 * @constant
 */
const SubtractiveBlending = 3;

/**
 * Represents multiply blending.
 *
 * @type {number}
 * @constant
 */
const MultiplyBlending = 4;

/**
 * Represents custom blending.
 *
 * @type {number}
 * @constant
 */
const CustomBlending = 5;

/**
 * Represents material blending.
 *
 * @type {number}
 * @constant
 */
const MaterialBlending = 6;

/**
 * A `source + destination` blending equation.
 *
 * @type {number}
 * @constant
 */
const AddEquation = 100;

/**
 * A `source - destination` blending equation.
 *
 * @type {number}
 * @constant
 */
const SubtractEquation = 101;

/**
 * A `destination - source` blending equation.
 *
 * @type {number}
 * @constant
 */
const ReverseSubtractEquation = 102;

/**
 * A blend equation that uses the minimum of source and destination.
 *
 * @type {number}
 * @cons