<commit_before>﻿// Viewer 3D
var viewer3D;

// HTML document to access the elements
var htmlDoc;

// Viewer Document
var currentViewerDoc;

// Document Id that is to be loaded
var documentId;

// OAuth
var auth;

// Geometry nodes
var geometryItems;
var geometryItems_children;

// For navigation between nodes
var selectedModelListIndex = 0;
var currNodes = [];
var currNode = null;
var level = 0;

// Current Camera parameters
var position = [];
var target = [];
var upVector = [];
var aspect = 1.0;
var fov = 10;
//var orthoHeight = 
var isPerspective = true;

var explode = 0;

var automoveType = 0;

// For changing camera position along a chosen direction
// X Y or Z
var direction;

//variable for initialize Viewing service
var bFirst;

//for set token web request
var xmlhttp;

//call back when set token Succeeds
function xmlHttpRequestHandler() {
    UpdateCommandLine("set token Successful ");
}

//call back when set token fails
function xmlHttpRequestErrorHandler() {
    UpdateCommandLine("set token failed ");
}


// Initialization on load of the page
function OnInitialize() 
{
    htmlDoc = document;
	
    //this function is called only once
	//bFirst = true;

}


//function for each refresh
function OnInitializeViwer()
{
	//get the token.
	var token = htmlDoc.getElementById("TokenText").value; 
	
    //set the token
	xmlhttp = new XMLHttpRequest();

	xmlhttp.open('POST', 'https://developer.api.autodesk.com/utility/v1/settoken', false); 
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.onreadystatechange = xmlHttpRequestHandler;
    xmlhttp.onerror = xmlHttpRequestErrorHandler;
    xmlhttp.withCredentials = true;
    xmlhttp.send("access-token=" + token);
	
   var options = {};
   options.env = "AutodeskProduction";
   options.accessToken = token;

   geometryItems = null;
   geometryItems_children = null;

   currNodes = [];
   currNode = null;
   level = 0;

   // For navigation between nodes
   selectedModelListIndex = -1;<commit_msg>depreciated xmlhttp.withCredentials<commit_after>﻿// Viewer 3D
var viewer3D;

// HTML document to access the elements
var htmlDoc;

// Viewer Document
var currentViewerDoc;

// Document Id that is to be loaded
var documentId;

// OAuth
var auth;

// Geometry nodes
var geometryItems;
var geometryItems_children;

// For navigation between nodes
var selectedModelListIndex = 0;
var currNodes = [];
var currNode = null;
var level = 0;

// Current Camera parameters
var position = [];
var target = [];
var upVector = [];
var aspect = 1.0;
var fov = 10;
//var orthoHeight = 
var isPerspective = true;

var explode = 0;

var automoveType = 0;

// For changing camera position along a chosen direction
// X Y or Z
var direction;

//variable for initialize Viewing service
var bFirst;

//for set token web request
var xmlhttp;

//call back when set token Succeeds
function xmlHttpRequestHandler() {
    UpdateCommandLine("set token Successful ");
}

//call back when set token fails
function xmlHttpRequestErrorHandler() {
    UpdateCommandLine("set token failed ");
}


// Initialization on load of the page
function OnInitialize() 
{
    htmlDoc = document;
	
    //this function is called only once
	//bFirst = true;

}


//function for each refresh
function OnInitializeViwer()
{
	//get the token.
	var token = htmlDoc.getElementById("TokenText").value; 
	
    //set the token
	xmlhttp = new XMLHttpRequest();

	xmlhttp.open('POST', 'https://developer.api.autodesk.com/utility/v1/settoken', false); 
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.onreadystatechange = xmlHttpRequestHandler;
    xmlhttp.onerror = xmlHttpRequestErrorHandler;
    // xmlhttp.withCredentials = true; // this line of code will not work with Firefox 33.02
    xmlhttp.send("access-token=" + token);
	
   var options = {};
   options.env = "AutodeskProduction";
   options.accessToken = token;

   geometryItems = null;
   geometryItems_children = null;

   currNodes = [];
   currNode = null;
   level = 0;

   // For navigation between nodes
   selectedModelListIndex = -1;
{'fraction_non_alphanumeric': 0.10449574726609964, 'fraction_numerical': 0.007290400972053463, 'mean_word_length': 3.6772727272727272, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 25}, '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': '7559224', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1217, 'n_words': 402}