var controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.2;
controls.noZoom = true;
controls.noPan = false;
controls.staticMoving = false;
controls.dynamicDampingFactor = 0.1;
material = new THREE.MeshNormalMaterial({color: 0xBAE8E6, opacity: 1.0});
material.side = THREE.DoubleSide;
options = {
zoom: 81,
meshResolution: 100,
changeHarmonics: true,
m: [5,8,3,1,7,3,3,7],
randomizeHarmonics: function(){
options.m = [];
for(var i=0; i<8; i++) {
options.m.push( parseInt(Math.random()*9, 10) );
}
$m.remove();
$m = $("<div id=\"m\">m: ["+options.m+"]"+"</div>");
$("#guiAbout").append($m);
},
updateMesh: function(res){
var sh, builder, toxiMesh, threeGeometry;
if(res === undefined){
res = options.meshResolution;
}
if(threeMesh !== undefined) {
scene.remove(threeMesh);
}
if(options.changeHarmonics) {
options.randomizeHarmonics();
}