scripts/modelCreation.js
/**
 * Driver function for fetching a Collada Model
 * There is no inbuilt way of checking whether URLs to straight collada .dae files are valid.
 * Have a PHP function test whether the entered URL is resolvable; if so, attempt
 * to create a model. If the model file didn't actually contain a model, an invisible model will display
 * @param {ModelSimulator} simulator The simulator to create a model for
 */
Driver function for fetching a Collada Model
There is no inbuilt way of checking whether URLs to straight collada .dae files are valid.
Have a PHP function test whether the entered URL is resolvable; if so, attempt
to create a model. If the model file didn't actually contain a model, an invisible model will display
@param {ModelSimulator} simulator The simulator to create a model for
Driver function for fetching a Collada Model There is no inbuilt way of checking whether URLs to straight collada . dae files are valid . Have a PHP function test whether the entered URL is resolvable ; if so attempt to create a model . If the model file didn ' t actually contain a model an invisible model will display @param { ModelSimulator } simulator The simulator to create a model for
function fetchColladaModel(simulator) {
	var error = false;
	var colladaModel = new Object();
	colladaModel.url = simulator.modelURL;
	var ajaxURL = "php/checkColladaExists.php";
	var ajaxData = { "colladaModel" : colladaModel };
	var checkIfColladaExistsCB = function(fileExists) {
		fileExists = (fileExists == "true") ? true : false;
		if(fileExists)
			createColladaKmlModel(simulator)
		else
			error = true;
		showHideInvalidModelError(error);
	};
	executeAJAXRequest(ajaxURL, ajaxData, checkIfColladaExistsCB);
}
function fetchColladaModel ( simulator ) { var error = false ; var colladaModel = new Object ( ) ; colladaModel . url = simulator . modelURL ; var ajaxURL = "php/checkColladaExists.php" ; var ajaxData = { "colladaModel" : colladaModel } ; var checkIfColladaExistsCB = function ( fileExists ) { fileExists = ( fileExists == "true" ) ? true : false ; if ( fileExists ) createColladaKmlModel ( simulator ) else error = true ; showHideInvalidModelError ( error ) ; } ; executeAJAXRequest ( ajaxURL , ajaxData , checkIfColladaExistsCB ) ; }
Driver function for fetching a Collada Model
 There is no inbuilt way of checking whether URLs to straight collada .dae files are valid.
Driver function for fetching a Collada Model There is no inbuilt way of checking whether URLs to straight collada . dae files are valid .