<!-- NEW3 — TEST 3 · THE RIVER'S JOURNEY · part 439 -->
atType, IntType, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NoBlending, NoColorSpace, NoToneMapping, NormalBlending, NotEqualCompare, NotEqualDepth, ObjectSpaceNormalMap, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, PerspectiveCamera, Plane, PlaneGeometry, R11_EAC_Format, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RG11_EAC_Format, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, 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/new3/mapdata3.js =====
// mapdata3.js — TEST 3 · THE RIVER'S JOURNEY. One river, five acts:
// twin sources join in the north, bend around the downtown of 800, run
// straight through the Crossing, branch canals through their rows, and
// end in the harbor bay behind the Waterfront.
import { line, arc, join } from './worldmap.js';

const bend = arc(-250, -80, 750, Math.PI * 1.11, Math.PI * 0.44, 40);
const main = join(
  line([-1150, -620], [-955, -336], 6),
  bend,
  line([-120, 658], [350, 640], 8),
  line([350, 640], [980, 600], 10),
  line([980, 600], [1300, 760], 8),
  line([1300, 760], [1450, 830], 4)
);
export const MAP = {
  id: 'new3', name: "THE RIVER'S JOURNEY", sub: 'Test 3 · one river, five acts', size: 3800,
  spawn: { x: -250, z: 300, yaw: Math.PI },
  water: {
    rivers: [
      { pts: line([-1750, -1150], [-1150, -620], 10), width: 42 },
      { pts: line([-820, -1250], [-1150, -620], 10), width: 42 },
      { pts: main, width: 64 },
      { pts: line([1180, -380], [1180, 590], 10), width: 26 },
    ],
    lakes: [{ x: 1450, z: 1080, r: 250 }],
  },
  streets: [
    { a: [-1150, -1250], b: [-1150, 200], w: 16 },
    { a: [-250, -1350], b: [-250, 640], w: 18 },
    { a: [350, -200], b: [350, 1250], w: 18 },
    { a: [1210, -520], b: [1210, 700], w: 16 },
    { a: [1000, 30], b: [1400, 30], w: 12 },
    { a: [-1600, 195], b: [900, 195], w: 16 },
    { a: [-200, 845], b: [1750, 845], w: 16 },
    { a: [-1750, -450], b: [-250, -450], w: 14 },
  ],
  regions: [
    { kind: 'downtown', name: 'Downtown — the 800', x: -250, z: -80, seed: 3 },
    { kind: 'suburb', name: 'Westbank Homes', x: -1420, z: -60, w: 380, d: 620, seed: 11 },
    { kind: 'market', name: 'Northbank Market', x: 660, z: 330, w: 560, d: 240, seed: 12 },
    { kind: 'suburb', name: 'Southbank Homes', x: 350, z: 1020, w: 760, d: 300, seed: 13 },
    { kind: 'towers', name: 'Canal Rows', x: 1180, z: 180, w: 470, d: 430, floors: 12, seed: 14 },
    { kind: 'park', name: 'Harbor Park', x: 1450, z: 470, w: 480, d: 280, seed: 15 },
    { kind: 'towers', name: 'The Waterfront', x: 1000, z: 1030, w: 360, d: 330, floors: 16, seed: 16 },
  ],
};


===== FILE: public/new3/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 law