<!-- RUBY-BACKUP · part 243 -->
.Mesh(new THREE.TorusGeometry(0.06, 0.015, 8, 12), gold);
    bracelet.position.set(s*0.31, 1.1, 0);
    bracelet.rotation.x = Math.PI/2;
    group.add(bracelet);
  });
  return group;
}

/* GENERIC AVATARS — simple orb, persona in the name */
var GEN_MESH = null, GEN_ANIM = null;
function buildRobot(accentColor){
  /* REAL PERSON — ordinary, but the future is here in the graphics */
  var g = new THREE.Group();
  /* skin — enhanced, lifelike */
  var skin = new THREE.MeshPhysicalMaterial({
    color: 0xd4a574, roughness: 0.45,
    clearcoat: 0.3, clearcoatRoughness: 0.4
  });
  var cloth = new THREE.MeshStandardMaterial({
    color: new THREE.Color(accentColor), roughness: 0.85
  });
  var dark = new THREE.MeshStandardMaterial({color: 0x1a1a1a, roughness: 0.35});
  var hairMat = new THREE.MeshStandardMaterial({color: 0x2a1a0a, roughness: 0.75});
  /* subtle future sheen — rim light on skin */
  var sheen = new THREE.MeshStandardMaterial({
    color: 0xffffff, transparent: true, opacity: 0.06,
    emissive: new THREE.Color(accentColor), emissiveIntensity: 0.08
  });
  /* head — real */
  var head = new THREE.Mesh(new THREE.SphereGeometry(0.14, 32, 32), skin);
  head.position.y = 1.55; head.scale.set(0.95, 1.1, 0.98); g.add(head);
  var headSheen = new THREE.Mesh(new THREE.SphereGeometry(0.145, 24, 24), sheen);
  headSheen.position.y = 1.55; headSheen.scale.set(0.95, 1.1, 0.98); g.add(headSheen);
  /* hair */
  var hair = new THREE.Mesh(new THREE.SphereGeometry(0.145, 24, 24, 0, Math.PI*2, 0, Math.PI*0.55), hairMat);
  hair.position.y = 1.57; g.add(hair);
  /* eyes */
  [-1,1].forEach(function(s){
    var white = new THREE.Mesh(new THREE.SphereGeometry(0.028, 16, 16),
      new THREE.MeshStandardMaterial({color: 0xffffff, roughness: 0.15}));
    white.position.set(0.045, 1.57, s*0.06); g.add(white);
    var pupil = new THREE.Mesh(new THREE.SphereGeometry(0.013, 12, 12), dark);
    pupil.position.set(0.055, 1.57, s*0.06); g.add(pupil);
    /* catchlight — the future is in the eyes */
    var catch_ = new THREE.Mesh(new THREE.SphereGeometry(0.005, 8, 8),
      new THREE.MeshBasicMaterial({color: 0xffffff}));
    catch_.position.set(0.062, 1.575, s*0.06); g.add(catch_);
  });
  /* nose, mouth */
  var nose = new THREE.Mesh(new THREE.ConeGeometry(0.018, 0.04, 12), skin);
  nose.position.set(0.1, 1.53, 0); nose.rotation.z = -Math.PI/2; g.add(nose);
  var mouth = new THREE.Mesh(new THREE.BoxGeometry(0.015, 0.008, 0.05),
    new THREE.MeshStandardMaterial({color: 0x8a4a3a, roughness: 0.5}));
  mouth.position.set(0.095, 1.48, 0); g.add(mouth);
  /* neck */
  var neck = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.06, 0.1, 18), skin);
  neck.position.y = 1.42; g.add(neck);
  /* torso — ordinary clothes */
  var torso = new THREE.Mesh(new THREE.CylinderGeometry(0.14, 0.17, 0.55, 24), cloth);
  torso.position.y = 1.1; g.add(torso);
  /* arms */
  [-1,1].forEach(function(s){
    var upper = new THREE.Mesh(new THREE.CylinderGeometry(0.045, 0.04, 0.3, 16), cloth);
    upper.position.set(0, 1.2, s*0.22); g.add(upper);
    var fore = new THREE.Mesh(new THREE.CylinderGeometry(0.04, 0.035, 0.28, 16), skin);
    fore.position.set(0, 0.92, s*0.23); g.add(fore);
    var hand = new THREE.Mesh(new THREE.SphereGeometry(0.05, 16, 16), skin);
    hand.position.set(0, 0.76, s*0.24); hand.scale.set(0.9, 1.2, 0.9); g.add(hand);
    /* fingers — subtle */
    for(var f=0; f<4; f++){
      var finger = new THREE.Mesh(new THREE.CylinderGeometry(0.012, 0.01, 0.06, 8), skin);
      finger.position.set(0, 0.70, s*0.24 + (f-1.5)*0.02); g.add(finger);
    }
  });
  /* legs — ordinary */
  [-1,1].forEach(function(s){
    var thigh = new THREE.Mesh(new THREE.CylinderGeometry(0.07, 0.06, 0.35, 16), cloth);
    thigh.position.set(0, 0.62, s*0.09); g.add(thigh);
    var shin = new THREE.Mesh(new THREE.CylinderGeometry(0.055, 0.05, 0.35, 16), skin);
    shin.position.set(0, 0.28, s*0.09); g.add(shin);
    var foot = new THREE.Mesh(new THREE.BoxGeometry(0.18, 0.07, 0.09), dark);
    foot.position.set(0.05, 0.035, s*0.09); g.add(foot);
  });
  g.userData.breathe = 0;
  return g;
}
/* CG characters — robots, superheroes, future style all the way */
var CG_CHARACTERS = ['cyborg','chrome','vector','nexus','pulse','xenon','zeta','nova','quark','nebula','titan','sentinel','wraith','sovereign','warden'];
function buildHumanoid(accentColor){
  /* HYPER-REALISTIC humanoid — smooth, natural, lifelike */
  var g = new THREE.Group();
  var skin = new THREE.MeshStandardMaterial({color: 0xd4a574, roughness: 0.55});
  var cloth = new THREE.MeshStandardMaterial({color: new THREE.Color(accentColor), roughness: 0.75});
  var dark = new THREE.MeshStandardMaterial({color: 0x1a1a1a, roughness: 0.4});
  var hairMat = new THREE.MeshStandardMaterial({color: 0x2a1a0a, roughness: 0.8});
  /* head — hyper-realistic */
  var head = new THREE.Mesh(new THREE.SphereGeometry(0.14, 32, 32), skin);
  head.position.y = 1.55; head.scale.set(0.95, 1