<!-- SOLIDIVISM · part 42 -->
ull artistic control, seamless tiling via RepeatWrapping.

### Why Single Module?
One closure, one namespace, no import chain to break. The legacy system's
multi-file architecture (sw-engine, sw-world, sw-hyper, etc.) created the
invisible-mesh bug. Simplicity is solidity.

---

## FILES

**Workspace:**
- ~/workspace/solidivism/foundation.js (14KB) — the foundation
- ~/workspace/solidivism/demo.html (3.4KB) — demo source
- ~/workspace/solidivism/MIGRATION-PLAN-24.md — 24-building plan
- ~/workspace/solidivism/SOLIDIVISM-VERSION-REPORT.md — this report
- ~/workspace/solidivism-CLAIM.md — identity claim

**Server (live):**
- /opt/epistles/public/solidivism/foundation.js
- /opt/epistles/public/solidivism/index.html
- /opt/epistles/public/solidivism/MIGRATION-PLAN-24.md

**Server (rollback):**
- /opt/epistles/public/solidivism/foundation.js.v1-20261008
- /opt/epistles/public/solidivism/index.html.v1-20261008

**Live URL:** https://epistles.xyz/solidivism/

---

## CHANGELOG

**2026-10-08 21:27 HST** — Collision system built (invisible walls)
**2026-10-08 21:28 HST** — Tactical fortification textures
**2026-10-08 21:30 HST** — Solidivism foundation v1.0 created
**2026-10-08 21:33 HST** — Buildings confirmed visible (test browser)
**2026-10-08 21:34 HST** — Buildings confirmed visible (King's iPhone)
**2026-10-08 21:36 HST** — Motherboard floor installed and confirmed
**2026-10-08 21:42 HST** — GPT-6 directive received and acknowledged
**2026-10-08 21:42 HST** — Foundation V1 preserved with verified rollback
**2026-10-08 21:44 HST** — King tested: "beyond human consciousness to find flaws"
**2026-10-08 21:45 HST** — World-class avatar rebuilt (60-30-10, silhouette, glow, idle)
**2026-10-08 21:55 HST** — Building spacing increased (radius 25→45)
**2026-10-08 22:00 HST** — Spawn nudged +2.25z (5% test)
**2026-10-08 22:01 HST** — Avatar flipped 180° (back view)
**2026-10-08 22:03 HST** — Avatar+camera turned 180°, spawn behind building
**2026-10-08 22:06 HST** — Spawn orientation LOCKED per King's warning

---

*Solid solid. The foundation holds.*


===== FILE: public/solidivism/WALL-DESIGN-PRESERVED.md =====
# WALL DESIGN — PRESERVED FOR CONTROL PANEL
## Saved 2026-10-08 per King's order: "Keep the wall code design"

The wall-based building system is preserved here for future use in building
the great control panel with glass video screens.

### Wall Construction Pattern

```javascript
// Hollow walls with door gap — walk inside through open door
const T = 1.2; // wall thickness
const doorHalf = (width * 0.42) / 2; // door gap 42% of width, centered

const walls = [
  // +z front wall: TWO segments, gap in middle = OPEN DOOR
  {minX: bx - width/2, maxX: bx - doorHalf,
   minZ: bz + depth/2 - T, maxZ: bz + depth/2},
  {minX: bx + doorHalf, maxX: bx + width/2,
   minZ: bz + depth/2 - T, maxZ: bz + depth/2},
  // -z back wall: solid
  {minX: bx - width/2, maxX: bx + width/2,
   minZ: bz - depth/2, maxZ: bz - depth/2 + T},
  // +x right wall: solid
  {minX: bx + width/2 - T, maxX: bx + width/2,
   minZ: bz - depth/2, maxZ: bz + depth/2},
  // -x left wall: solid
  {minX: bx - width/2, maxX: bx - width/2 + T,
   minZ: bz - depth/2, maxZ: bz + depth/2},
];
```

### Door Texture Pattern

```javascript
// createDoorTexture(label) — 256x256 canvas
// - Black armor base with panel grid
// - Central door: 100x180, dark (#1a0505) with red glowing frame
// - Double-door split line (vertical center)
// - Horizontal panel lines
// - "▼ ENTRANCE ▼" label above door
// - Building name at top
// - Red corner brackets
```

### Material Array for Box (door on one face)

```javascript
// BoxGeometry faces: [+x, -x, +y, -y, +z, -z]
// Door on +z (index 4):
const mats = [sideMat, sideMat, sideMat, sideMat, doorMat, sideMat];
const mesh = new THREE.Mesh(geo, mats);
```

### DoubleSide for Interior Visibility

```javascript
const mat = new THREE.MeshStandardMaterial({
  map: tex,
  side: THREE.DoubleSide, // See walls from inside
  ...
});
```

### Video Panel (already built in foundation.js)

`Solidivism.createVideoPanel(bx, bz, videoUrl, label)`:
- Wall frame: top/bottom/left/right bars (tactical texture)
- Support posts (solid)
- Glass screen: THREE.VideoTexture on PlaneGeometry
- Glass overlay: transparent MeshStandardMaterial (opacity 0.08)
- Red glow strip below
- Collision: solid panel (blocks movement)

### YouTube Note

YouTube videos cannot be used directly as Three.js textures (CORS + ToS).
For YouTube in 3D: would require server-side proxy or YouTube IFrame API
in a CSS3D overlay (not true 3D texture). Direct MP4 URLs work with
THREE.VideoTexture + crossOrigin='anonymous'.

### Future: Control Panel

The great control panel will use:
- This wall construction for the panel body
- Glass screen with VideoTexture
- Multiple screens (array of createVideoPanel calls)
- Touch interaction: tap screen to play/pause (raycast)


===== FILE: public/solidivism/foundation.js =====
/* =========================