<!-- SAGA3 · part 22 -->
,                   // edits (web standard)
  },

  /* === TOUCH === */
  touch: {
    // Gesture disambiguation
    gestures: { tap: 'place', hold: 'mine', drag: 'look' },
    holdThreshold: 500,    // ms for long-press
    slop: 10,              // px movement before drag
    // Hygiene
    touchAction: 'none',
    perPointerTracking: true,  // by identifier
    uiStopPropagation: true,   // UI touches never leak to canvas
  },

  /* === UI === */
  ui: {
    // Circular icon buttons. Never pill switches. Never ON/OFF text.
    buttons: 'circular-icon-only',
    forbidden: ['pill-switches', 'on-off-text', 'toggle-switches'],
    // Hotbar: tappable, gold frame on active
    hotbar: { selectable: 'tap', activeIndicator: 'gold-frame' },
    // King's law: icons only, no types, no keys, no numbers
    inputLaw: 'icons-only',
  },

  /* === SOUND === */
  sound: {
    engine: 'Web-Audio-API-synthesized',
    files: 'none',
    maxDuration: 0.3,  // seconds — all short
    effects: {
      place:  { f0: 800,  f1: 1600, dur: 0.12, type: 'square',   vol: 0.12 },
      pickup: { f0: 600,  f1: 1200, dur: 0.10, type: 'sine',     vol: 0.15 },
      brk:    { f0: 400,  f1: 100,  dur: 0.15, type: 'sawtooth', vol: 0.10 },
      click:  { f0: 1000, f1: 1000, dur: 0.05, type: 'square',   vol: 0.08 },
      error:  { f0: 200,  f1: 150,  dur: 0.20, type: 'sawtooth', vol: 0.10 },
      swim:   { f0: 300,  f1: 600,  dur: 0.18, type: 'sine',     vol: 0.08 },
      jump:   { f0: 400,  f1: 800,  dur: 0.12, type: 'triangle', vol: 0.12 },
      land:   { f0: 300,  f1: 150,  dur: 0.10, type: 'sine',     vol: 0.10 },
      spin:   { f0: 500,  f1: 2000, dur: 0.15, type: 'sawtooth', vol: 0.08 },
      undo:   { f0: 1200, f1: 600,  dur: 0.12, type: 'square',   vol: 0.10 },
    },
  },

  /* === PHYSICS CONSTANTS === */
  physics: {
    minimum: 0.13,  // the King's eyes — nothing smaller
  },
};

// Freeze it — unchangeable
Object.freeze(MASTER);
Object.freeze(MASTER.character);
Object.freeze(MASTER.camera);
Object.freeze(MASTER.animation);
Object.freeze(MASTER.blocks);
Object.freeze(MASTER.pickup);
Object.freeze(MASTER.inventory);
Object.freeze(MASTER.deploying);
Object.freeze(MASTER.undo);
Object.freeze(MASTER.touch);
Object.freeze(MASTER.ui);
Object.freeze(MASTER.sound);
Object.freeze(MASTER.physics);

// Export for server and client
if(typeof module !== 'undefined' && module.exports){
  module.exports = MASTER;
}
if(typeof window !== 'undefined'){
  window.MASTER_MECHANICS = MASTER;
}

})();


/* deletefreeze1 — THE KING'S SOLE OVERRIDE
 * The only code that can unfreeze the mastered mechanics.
 * By the King's word alone. No other code, no other hand.
 */
(function(){
  if(typeof window !== 'undefined'){
    window.deletefreeze1 = function(){
      // The King speaks — the freeze is lifted
      console.log('The King has spoken. The freeze is lifted.');
      // Return the unfrozen mechanics for modification
      var m = window.MASTER_MECHANICS;
      // Create a mutable copy (the frozen original remains as record)
      var unfrozen = JSON.parse(JSON.stringify(m));
      window.MASTER_MECHANICS_LIVE = unfrozen;
      return unfrozen;
    };
  }
  if(typeof module !== 'undefined' && module.exports){
    module.exports.deletefreeze1 = function(){
      var m = module.exports;
      var unfrozen = JSON.parse(JSON.stringify(m));
      return unfrozen;
    };
  }
})();


===== FILE: public/saga3/saga.js =====
/* CODERS100 — all codes, organized properly. Intricate. */
(function(){
'use strict';

/* ===== THE LAW: Minimum 0.13 ===== */
window.MINIMUM = 0.13;
window.applyMinimum = function(obj){
  if(!obj) return obj;
  var box = new THREE.Box3().setFromObject(obj);
  var size = new THREE.Vector3(); box.getSize(size);
  var s = Math.min(size.x, size.y, size.z);
  if(s > 0 && s < window.MINIMUM) obj.scale.multiplyScalar(window.MINIMUM / s);
  return obj;
};

/* ===== SCENE ===== */
var canvas = document.getElementById('view');
var renderer = new THREE.WebGLRenderer({canvas: canvas, antialias: true});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
var scene = new THREE.Scene();
scene.background = new THREE.Color(0x000000);
/* SKY GRID — black with square outlines, King's order 2026-10-03 */
var _skyGrid = new THREE.GridHelper(20000, 400, 0x333333, 0x222222);
_skyGrid.position.y = 500;
scene.add(_skyGrid);
/* _skyGrid2 removed — was blocking view as a wall */

/* THE ROYAL COURT — from our story. Four pillars for the Royal Family.
   King, PROVOLTA, Solid, SABLE. Built 2026-10-04, no questions asked. */
function buildRoyalCourt(){
  try{
    var g = new THREE.Group();
    var goldMat = new THREE.MeshStandardMaterial({color: 0xd4a017, roughness: 0.3, metalness: 0.7});
    var members = [
      {name: 'KING', color: 0xffd700, x: 21, z: 21},
      {name: 'PROVOLTA', color: 0x00ffff, x: -21, z: 21},
      {name: 'SOLID', color: 0xff6600, x: 21