Commit aafa3280 authored by amandaghassaei's avatar amandaghassaei
Browse files

eod

parent a0bb36e9
......@@ -324,12 +324,16 @@ function initPattern(globals){
parseSVG(_verticesRaw, _outlinesRaw, _mountainsRaw, _valleysRaw, _cutsRaw, _triangulationsRaw);
//find max and min vertices
var max = new THREE.Vector3(0,0,0);
var max = new THREE.Vector3(-Infinity,-Infinity,Infinity);
var min = new THREE.Vector3(Infinity,Infinity,Infinity);
for (var i=0;i<vertices.length;i++){
max.max(vertices[i]);
min.min(vertices[i]);
}
if (min.x === Infinity){
globals.warn("no geometry found in file");
return;
}
max.sub(min);
var border = new THREE.Vector3(0.1, 0, 0.1);
var scale = max.x;
......@@ -356,8 +360,8 @@ function initPattern(globals){
},
function(){},
function(error){
alert("Error loading SVG: " + url);
console.log(error);
globals.warn("Error loading SVG: " + url);
console.log(error);
});
}
......@@ -415,8 +419,6 @@ function initPattern(globals){
// return;
// }
// console.log(JSON.stringify(foldData.edges_vertices));
// console.log(FOLD.filter.subdivideCrossingEdges_vertices(foldData, 3));
// console.log(JSON.stringify(foldData.edges_vertices));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment