<commit_before>var scene, camera, renderer, controls;
var detector = {'Collections':{}};

var loader = new THREE.OBJMTLLoader();

function importOBJMTL(name, obj, mtl) {
  loader.load(obj, mtl, function(object){
    object.name = name;
    object.visible = true;

    object.children.forEach(function(c) {
      c.material.transparent = true;
      c.material.opacity = 0.5;
    });

    scene.add(object);
  });
}

function init() {
  scene = new THREE.Scene();

  camera = new THREE.PerspectiveCamera(90, window.innerWidth / window.innerHeight, 0.001, 700);

  camera.position.set(1, 1, 0.5);
  camera.up = new THREE.Vector3(0,1,0);
  camera.lookAt(new THREE.Vector3(0,0,0));
  scene.add(camera);

  renderer = new THREE.WebGLRenderer();
  element = renderer.domElement;
  container = document.getElementById('cms');
  container.appendChild(element);

  effect = new THREE.StereoEffect(renderer);

  controls = new THREE.OrbitControls(camera, element);
  controls.enablePan = false;
  controls.enableZoom = false;

  var intensity = 1.0;
  var length = 15.0;

  var light1 = new THREE.DirectionalLight(0xffffff, intensity);
  light1.position.set(-length, length, length);
  scene.add(light1);

  var light2 = new THREE.DirectionalLight(0xffffff, intensity);
  light2.position.set(length, -length, -length);
  scene.add(light2);
}

function run() {
  requestAnimationFrame(run);

  var width = container.offsetWidth;
  var height = container.offsetHeight;

  camera.aspect = width / height;
  camera.updateProjectionMatrix();
  renderer.setSize(width, height);
  effect.setSize(width, height);

  camera.updateProjectionMatrix();

  controls.update();
  effect.render(scene, camera);
}

//--
// This is right from https://github.com/sitepoint-editors/VRWeatherParticles
function setOrientationControls(e) {
  if ( !e.alpha ) {
    return;
  }

  controls = new THREE.DeviceOrientationControls(camera, true);
  controls.connect();
  controls.update();
  element.addEventListener('click', fullscreen, false);
  window.removeEventListener('deviceorientation', setOrientationControls, true);
}

window.addEventListener('deviceorientation', setOrientationControls, true);

function fullscreen() {
  if (container.requestFullscreen) {
    container.requestFullscreen();
  } else if (container.msRequestFullscreen) {
    container.msRequestFullscreen();
  } else if (container.mozRequestFullScreen) {
    container.mozRequestFullScreen();
  } else if (container.webkitRequestFullscreen) {
    container.webkitRequestFullscreen();
    }
}
//--

var WIREFRAME = 0;
var SOLID = 1;

var tracker_style = {color: "rgb(100%, 100%, 0%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(30%, 30%, 30%)", opacity: 1, linewidth: 1};

var detector_description = {

  "SiStripTECMinus3D_V1": {
    name: "Tracker Endcap (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTECPlus3D_V1": {
    name: "Tracker Endcap (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTIDMinus3D_V1": {
    name: "Tracker Inner Detector (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTIDPlus3D_V1": {
    name: "Tracker Inner Detector (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTOB3D_V1": {
    name: "Tracker Outer Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTIB3D_V1": {
    name: "Tracker Inner Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelEndcapMinus3D_V1": {
    name: "Pixel Endcap (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelEndcapPlus3D_V1": {
    name: "Pixel Endcap (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelBarrel3D_V1": {
    name: "Pixel Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  "CSC3D_V1": {
    name: "Cathode Strip Chambers", type: SOLID, method: solidBox,
    style: {color: "rgb(60%, 70%, 10%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(0%, 0%, 0%)", opacity: 1, linewidth: 1}
  },
  "DTs3D_V1": {
    name: "Drift Tubes", type: SOLID, method: solidBox,
    style: {color: "rgb(80%, 40%, 0%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(0%, 0%, 0%)", opacity: 1, linewidth: 1}
  }

};

function wireframeFace(data, ci) {
  var f1 = new THREE.Vector3(data[ci][0],   data[ci][1],   data[ci][2]);
  var f2 = new THREE.Vector3(data[ci+1][0], data[ci+1][1], data[ci+1][2]);
  var f3 = new THREE.Vector3(data[ci+2][0], data[ci+2][1], data[ci+2][2]);
  var f4 = new THREE.Vector3(data[ci+3][0], data[ci+3][1], data[ci+3][2]);

  var face = new THREE.Geometry();
  face.vertices.push(f1,f2);
  face.vertices.push(f2,f3);
  face.vertices.push(f3,f4);
  face.vertices.push(f4,f1);

  return face;
};

function solidFace(data, ci) {
  var f1 = new THREE.Vector3(data[ci][0],   data[ci][1],   data[ci][2]);
  var f2 = new THREE.Vector3(data[ci+1][0], data[ci+1][1], data[ci+1][2]);
  var f3 = new THREE.Vector3(data[ci+2][0], data[ci+2][1], data[ci+2][2]);
  var f4 = new THREE.Vector3(data[ci+3][0], data[ci+3][1], data[ci+3][2]);

  var face = new THREE.Geometry();
  face.vertices = [f1,f2,f3,f4];
  face.faces.push(new THREE.Face3(0,1,2));
  face.faces.push(new THREE.Face3(0,2,3));
<commit_msg>don't draw all of tracker<commit_after>var scene, camera, renderer, controls;
var detector = {'Collections':{}};

var loader = new THREE.OBJMTLLoader();

function importOBJMTL(name, obj, mtl) {
  loader.load(obj, mtl, function(object){
    object.name = name;
    object.visible = true;

    object.children.forEach(function(c) {
      c.material.transparent = true;
      c.material.opacity = 0.75;
    });

    scene.add(object);
  });
}

function init() {
  scene = new THREE.Scene();

  camera = new THREE.PerspectiveCamera(90, window.innerWidth / window.innerHeight, 0.001, 700);

  camera.position.set(1, 1, 0.5);
  camera.up = new THREE.Vector3(0,1,0);
  camera.lookAt(new THREE.Vector3(0,0,0));
  scene.add(camera);

  renderer = new THREE.WebGLRenderer();
  element = renderer.domElement;
  container = document.getElementById('cms');
  container.appendChild(element);

  effect = new THREE.StereoEffect(renderer);

  controls = new THREE.OrbitControls(camera, element);
  controls.enablePan = false;
  controls.enableZoom = false;

  var intensity = 1.0;
  var length = 15.0;

  var light1 = new THREE.DirectionalLight(0xffffff, intensity);
  light1.position.set(-length, length, length);
  scene.add(light1);

  var light2 = new THREE.DirectionalLight(0xffffff, intensity);
  light2.position.set(length, -length, -length);
  scene.add(light2);
}

function run() {
  requestAnimationFrame(run);

  var width = container.offsetWidth;
  var height = container.offsetHeight;

  camera.aspect = width / height;
  camera.updateProjectionMatrix();
  renderer.setSize(width, height);
  effect.setSize(width, height);

  camera.updateProjectionMatrix();

  controls.update();
  effect.render(scene, camera);
}

//--
// This is right from https://github.com/sitepoint-editors/VRWeatherParticles
function setOrientationControls(e) {
  if ( !e.alpha ) {
    return;
  }

  controls = new THREE.DeviceOrientationControls(camera, true);
  controls.connect();
  controls.update();
  element.addEventListener('click', fullscreen, false);
  window.removeEventListener('deviceorientation', setOrientationControls, true);
}

window.addEventListener('deviceorientation', setOrientationControls, true);

function fullscreen() {
  if (container.requestFullscreen) {
    container.requestFullscreen();
  } else if (container.msRequestFullscreen) {
    container.msRequestFullscreen();
  } else if (container.mozRequestFullScreen) {
    container.mozRequestFullScreen();
  } else if (container.webkitRequestFullscreen) {
    container.webkitRequestFullscreen();
    }
}
//--

var WIREFRAME = 0;
var SOLID = 1;

var tracker_style = {color: "rgb(100%, 100%, 0%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(30%, 30%, 30%)", opacity: 0.75, linewidth: 1};

var detector_description = {

  "SiStripTECMinus3D_V1": {
    name: "Tracker Endcap (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTECPlus3D_V1": {
    name: "Tracker Endcap (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  /*
  "SiStripTIDMinus3D_V1": {
    name: "Tracker Inner Detector (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "SiStripTIDPlus3D_V1": {
    name: "Tracker Inner Detector (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  */
  "SiStripTOB3D_V1": {
    name: "Tracker Outer Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  /*
  "SiStripTIB3D_V1": {
    name: "Tracker Inner Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelEndcapMinus3D_V1": {
    name: "Pixel Endcap (-)", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelEndcapPlus3D_V1": {
    name: "Pixel Endcap (+)", type: SOLID, method: solidBox, style: tracker_style
  },
  "PixelBarrel3D_V1": {
    name: "Pixel Barrel", type: SOLID, method: solidBox, style: tracker_style
  },
  */
  "CSC3D_V1": {
    name: "Cathode Strip Chambers", type: SOLID, method: solidBox,
    style: {color: "rgb(60%, 70%, 10%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(0%, 0%, 0%)", opacity: 0.75, linewidth: 1}
  },
  "DTs3D_V1": {
    name: "Drift Tubes", type: SOLID, method: solidBox,
    style: {color: "rgb(80%, 40%, 0%)", emissive: "rgb(30%, 30%, 30%)", specular: "rgb(0%, 0%, 0%)", opacity: 0.75, linewidth: 1}
  }

};

function wireframeFace(data, ci) {
  var f1 = new THREE.Vector3(data[ci][0],   data[ci][1],   data[ci][2]);
  var f2 = new THREE.Vector3(data[ci+1][0], data[ci+1][1], data[ci+1][2]);
  var f3 = new THREE.Vector3(data[ci+2][0], data[ci+2][1], data[ci+2][2]);
  var f4 = new THREE.Vector3(data[ci+3][0], data[ci+3][1], data[ci+3][2]);

  var face = new THREE.Geometry();
  face.vertices.push(f1,f2);
  face.vertices.push(f2,f3);
  face.vertices.push(f3,f4);
  face.vertices.push(f4,f1);

  return face;
};

function solidFace(data, ci) {
  var f1 = new THREE.Vector3(data[ci][0],   data[ci][1],   data[ci][2]);
  var f2 = new THREE.Vector3(data[ci+1][0], data[ci+1][1], data[ci+1][2]);
  var f3 = new THREE.Vector3(data[ci+2][0], data[ci+2][1], data[ci+2][2]);
  var f4 = new THREE.Vector3(data[ci+3][0], data[ci+3][1], data[ci+3][2]);

  var face = new THREE.Geometry();
  face.vertices = [f1,f2,f3,f4];
  face.faces.push(new THREE.Face3(0,1,2));
  face.faces.push(new THREE.Face3(0,2,3));

{'fraction_non_alphanumeric': 0.1715648854961832, 'fraction_numerical': 0.03730916030534351, 'mean_word_length': 4.522128556375132, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '467472', 'n_tokens_mistral': 4056, 'n_tokens_neox': 3777, 'n_words': 806}