<commit_before>﻿/**
 * @author jbouny
 */

var DEMO =
{
	ms_Renderer : null,
	ms_Camera : null,
	ms_Scene : null,
	ms_Controls : null,
  ms_PlaneGroup : null,
  ms_ProjectedGrid : null,
  ms_LODGrid : null,
  ms_GlobalTime : 0,

	Initialize : function () {

		this.ms_Renderer = new THREE.WebGLRenderer();
		this.ms_Renderer.context.getExtension( 'OES_texture_float' );
		this.ms_Renderer.context.getExtension( 'OES_texture_float_linear' );
		this.ms_Renderer.setClearColor( 0xbbbbbb );
    
    this.ms_Clock = new THREE.Clock();

		document.body.appendChild( this.ms_Renderer.domElement );

		this.ms_Scene = new THREE.Scene();

		this.ms_Camera = new THREE.PerspectiveCamera( 55.0, WINDOW.ms_Width / WINDOW.ms_Height, 0.5, 1000000 );
		this.ms_Camera.position.set( 500, 1100, 2200 );
		this.ms_Camera.lookAt( new THREE.Vector3( 0, 0, 0 ) );
		this.ms_Scene.add( this.ms_Camera );

		// Initialize Orbit control
		this.ms_Controls = new THREE.OrbitControls( this.ms_Camera, this.ms_Renderer.domElement );
		this.ms_Controls.target.set( 0, 0, 0 );
		this.ms_Controls.maxDistance = 200000.0;
    
    // General parameters
    this.ms_Animate = true;
    this.ms_Update = true;
    this.ms_Wireframe = false;
    this.ms_MeshType = "LOD";
    
    // LOD parameters
    this.ms_LODGrid = new THREE.LODGridExample( 128, 8, 500 );
    
    // Basic grid parameters
    this.ms_BasicGridResolution = 256;
    this.ms_BasicGridSize = 10000;
    
    // Projected grid parameter
		this.ms_GeometryResolution = 128;

		this.InitGui();

		this.InitializeScene();
    
	},

	InitializeScene : function InitializeScene() {

		// Add light
		this.ms_MainDirectionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
		this.ms_MainDirectionalLight.position.set( -0.2, 0.5, 1 );
		this.ms_Scene.add( this.ms_MainDirectionalLight );
    
    // Add axis helper
    /*var axis = new THREE.AxisHelper(1000);
    this.ms_Scene.add( axis );
    
    // Add some color boxes
    for ( var i = -2; i <= 2; ++ i ) {
      for ( var j = -2; j <= 2; ++ j ) {
        for ( var k = 0-2; k <= 2; ++ k ) {
          var geometry = new THREE.BoxGeometry( 100, 100, 100 );
          var material = new THREE.MeshLambertMaterial( { fog: true, side: THREE.DoubleSide, color: new THREE.Color( 0.5 + i * 0.2, 0.5 + j * 0.2, 0.5 + k * 0.2 ) } );
          var mesh = new THREE.Mesh( geometry, material );
          mesh.position.set( i * 300, j * 300, k * 300 );
          this.ms_Scene.add( mesh );
        }
      }
    }*/

		// Initialize ProjectedGridExample
		this.ms_ProjectedGrid = new THREE.ProjectedGridExample( this.ms_Renderer, this.ms_Camera, this.ms_Scene, {
			GEOMETRY_RESOLUTION: this.ms_GeometryResolution
		} );
    
    // Add custom geometry
    this.ChangeMesh();
    
    this.ChangeWireframe();
    this.ChangeAnimateMaterial();
	},

	InitGui : function InitGui() {

		// Initialize UI<commit_msg>Increase the far distance on the camera and remove boxes from the scene<commit_after>﻿/**
 * @author jbouny
 */

var DEMO =
{
	ms_Renderer : null,
	ms_Camera : null,
	ms_Scene : null,
	ms_Controls : null,
  ms_PlaneGroup : null,
  ms_ProjectedGrid : null,
  ms_LODGrid : null,
  ms_GlobalTime : 0,

	Initialize : function () {

		this.ms_Renderer = new THREE.WebGLRenderer();
		this.ms_Renderer.context.getExtension( 'OES_texture_float' );
		this.ms_Renderer.context.getExtension( 'OES_texture_float_linear' );
		this.ms_Renderer.setClearColor( 0xbbbbbb );
    
    this.ms_Clock = new THREE.Clock();

		document.body.appendChild( this.ms_Renderer.domElement );

		this.ms_Scene = new THREE.Scene();

		this.ms_Camera = new THREE.PerspectiveCamera( 55.0, WINDOW.ms_Width / WINDOW.ms_Height, 0.5, 100000000 );
		this.ms_Camera.position.set( 500, 1100, 2200 );
		this.ms_Camera.lookAt( new THREE.Vector3( 0, 0, 0 ) );
		this.ms_Scene.add( this.ms_Camera );

		// Initialize Orbit control
		this.ms_Controls = new THREE.OrbitControls( this.ms_Camera, this.ms_Renderer.domElement );
		this.ms_Controls.target.set( 0, 0, 0 );
		this.ms_Controls.maxDistance = 50000000.0;
    
    // General parameters
    this.ms_Animate = true;
    this.ms_Update = true;
    this.ms_Wireframe = false;
    this.ms_MeshType = "LOD";
    
    // LOD parameters
    this.ms_LODGrid = new THREE.LODGridExample( 128, 7, 500 );
    
    // Basic grid parameters
    this.ms_BasicGridResolution = 256;
    this.ms_BasicGridSize = 10000;
    
    // Projected grid parameter
		this.ms_GeometryResolution = 128;

		this.InitGui();

		this.InitializeScene();
    
	},

	InitializeScene : function InitializeScene() {

		// Add light
		this.ms_MainDirectionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
		this.ms_MainDirectionalLight.position.set( -0.2, 0.5, 1 );
		this.ms_Scene.add( this.ms_MainDirectionalLight );
    
    // Add axis helper
    var axis = new THREE.AxisHelper(1000);
    this.ms_Scene.add( axis );

		// Initialize ProjectedGridExample
		this.ms_ProjectedGrid = new THREE.ProjectedGridExample( this.ms_Renderer, this.ms_Camera, this.ms_Scene, {
			GEOMETRY_RESOLUTION: this.ms_GeometryResolution
		} );
    
    // Add custom geometry
    this.ChangeMesh();
    
    this.ChangeWireframe();
    this.ChangeAnimateMaterial();
	},

	InitGui : function InitGui() {

		// Initialize UI
{'fraction_non_alphanumeric': 0.12291350531107739, 'fraction_numerical': 0.03395295902883156, 'mean_word_length': 3.0718146718146717, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4659601', 'n_tokens_mistral': 2069, 'n_tokens_neox': 1814, 'n_words': 382}