<!-- NEW6 — TEST 6 · THE FIVE SHORES · part 439 -->
peatWrapping, ReverseSubtractEquation, SIGNED_R11_EAC_Format, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SIGNED_RG11_EAC_Format, SRGBColorSpace, SRGBTransfer, ShaderChunk, ShaderLib, ShaderMaterial, ShortType, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, Uint16BufferAttribute, Uint32BufferAttribute, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebXRController, ZeroFactor, createCanvasElement, error, log, warn, warnOnce };


===== FILE: public/new6/mapdata6.js =====
// mapdata6.js — TEST 6 · THE FIVE SHORES. A great central lake, five shore
// districts facing each other across the water: the Bend downtown north,
// Canal City east, the Waterfront south, the Crossing west, Twin Rivers
// northeast — and a park island in the lake, reached by a bridge.
import { line, arc, join } from './worldmap.js';

const ring = [];
for (let i = 0; i < 12; i++) {
  const a0 = (i / 12) * Math.PI * 2, a1 = ((i + 1) / 12) * Math.PI * 2;
  ring.push({ a: [Math.cos(a0) * 745, Math.sin(a0) * 745], b: [Math.cos(a1) * 745, Math.sin(a1) * 745], w: 14 });
}
export const MAP = {
  id: 'new6', name: 'THE FIVE SHORES', sub: 'Test 6 · five districts around one lake', size: 3400,
  spawn: { x: 0, z: -760, yaw: Math.PI },
  water: {
    rivers: [
      { pts: join(line([-752, -1394], [-700, -800], 6), line([-700, -800], [-390, -520], 4)), width: 38 },
      { pts: join(line([752, -1394], [700, -800], 6), line([700, -800], [390, -520], 4)), width: 38 },
      { pts: arc(0, -1120, 800, Math.PI * 1.11, Math.PI * 1.89, 36), width: 38 },
      { pts: line([-1700, -150], [-630, -150], 12), width: 44 },
      { pts: line([0, 615], [0, 1700], 12), width: 40 },
      { pts: join(line([1500, -1500], [920, -760], 8), line([920, -760], [470, -390], 6)), width: 30 },
      { pts: join(line([1700, -900], [1010, -660], 8), line([1010, -660], [520, -350], 6)), width: 30 },
      { pts: line([1080, -700], [1080, 700], 12), width: 22 },
      { pts: line([790, 0], [1520, 0], 8), width: 22 },
    ],
    lakes: [{ x: 0, z: 0, r: 620 }],
  },
  streets: [
    ...ring,
    { a: [745, 132], b: [1560, 132], w: 16 },
    { a: [-745, -60], b: [-1560, -60], w: 16 },
    { a: [180, 745], b: [180, 900], w: 14 },
    { a: [560, -400], b: [345, -318], w: 12 },
    { a: [-1080, -420], b: [-1080, 240], w: 13 },
  ],
  regions: [
    { kind: 'downtown', name: 'Downtown — the 800', x: 0, z: -1120, seed: 3 },
    { kind: 'towers', name: 'Canal City', x: 1080, z: 0, w: 600, d: 880, floors: 12, seed: 51 },
    { kind: 'towers', name: 'The Waterfront', x: 0, z: 1060, w: 1080, d: 330, floors: 15, seed: 52 },
    { kind: 'suburb', name: 'Northbank Homes', x: -1080, z: -430, w: 620, d: 360, seed: 53 },
    { kind: 'suburb', name: 'Southbank Homes', x: -1080, z: 100, w: 620, d: 280, seed: 54 },
    { kind: 'suburb', name: 'Twin Rivers Homes', x: 1280, z: -1030, w: 500, d: 440, seed: 55 },
    { kind: 'island', name: 'Island Park', x: 250, z: -250, r: 130, seed: 56 },
    { kind: 'park', name: 'South Shore Park', x: -560, z: 800, w: 300, d: 260, seed: 57 },
  ],
};


===== FILE: public/new6/stage.js =====
/* stage.js — THE STAGE for the King's /new2 test (Test 2: the big district).
 *
 * One factory: makeStage(THREE, renderer, opts) -> stage
 *
 * Same stage as Test 1, same laws, retuned for district scale:
 *   1. THE MAP FLOOR   — one large flat apron. In Test 2 the district's
 *      own streets and blocks are built ON this floor by the Citywright;
 *      the floor itself stays quiet: dark, city-neutral ground that
 *      carries the district without arguing with its plan.
 *   2. THE STAND LAYER — an invisible plane 0.02 above the floor. Every
 *      character in the world resolves its standing height through
 *      stage.groundY(x, z). Decorative geometry can dip, tilt or lie;
 *      feet cannot. Nobody falls beneath a floor again.
 *   3. THE CAMERA RIG  — a slow cinematic establishing move that frames
 *      the WHOLE district at once, with hard anti-incursion clamps:
 *      the polar angle and distance are fenced so the view can never
 *      clip inside a building, dive under the floor, or frame the void
 *      past the world edge. The fences scale with the stage, so the
 *      sky view reads the entire district, far edge included.
 *   4. BUILD MEMORY    — Solid's memory ships in every build (the King's
 *      standing law): window.logBuild / window.readMemory on the
 *      localStorage key 'solid-memory'.
 *
 * Self-contained: no assets, no CDN. THREE is handed in by the caller.
 */

'use strict';

/* ----------------------------------------