Commit 314ef865 authored by amandaghassaei's avatar amandaghassaei

small fixes

parent 124944a9
......@@ -394,8 +394,8 @@ THREE.TrackballControls = function ( object, domElement ) {
if ( _this.enabled === false ) return;
event.preventDefault();
event.stopPropagation();
// event.preventDefault();
// event.stopPropagation();
if ( _state === STATE.NONE ) {
......
......@@ -613,10 +613,7 @@
Status: &nbsp;<span id="VRstatus"></span>
<a class="about floatRight" href="#" id="aboutVR"><span class="fui-question-circle"></span></a><br/>
<div id="VRoptions">
<label class="checkbox" for="vrEnabled">
<input id="vrEnabled" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Connect
</label>
</div>
</div>
</div>
......
......@@ -15,7 +15,8 @@ function initViveInterface(globals){
$status.html("No device connected.");
$("#VRoptions").show();
var mesh = new THREE.Mesh(new THREE.CubeGeometry(1,1,1), new THREE.MeshLambertMaterial({color:0xff0000}));
var mesh = new THREE.Mesh(new THREE.CubeGeometry(0.01,0.01,0.01), new THREE.MeshLambertMaterial({color:0xff0000}));
mesh.visible = false;
var controls = new THREE.VRControls(globals.threeView.camera);
controls.standing = true;
......@@ -41,7 +42,8 @@ function initViveInterface(globals){
if (!display) return;
$status.html("VR device detected.");
var button = WEBVR.getButton( display, globals.threeView.renderer.domElement );
document.body.appendChild(button);
console.log(button);
$("#VRoptions").html(button);
var callback = button.onclick;
button.onclick = function () {
globals.vrEnabled = !display.isPresenting;
......@@ -55,9 +57,6 @@ function initViveInterface(globals){
} );
}
function disconnect(){
}
function render(){
controller1.update();
controller2.update();
......
......@@ -17,6 +17,6 @@ $(function() {
globals.staticSolver = initStaticSolver(globals);
globals.dynamicSolver = initDynamicSolver(globals);
globals.pattern = initPattern(globals);
// globals.vive = initViveInterface(globals);
globals.vive = initViveInterface(globals);
$(".demo[data-url='Tessellations/waterbomb.svg']").click();
});
\ No newline at end of file
......@@ -173,6 +173,7 @@ function initModel(globals){
geometry.attributes.position.needsUpdate = true;
if (globals.colorMode == "axialStrain") geometry.attributes.color.needsUpdate = true;
else geometry.computeVertexNormals();
// if (globals.userInteractionEnabled) geometry.computeBoundingSphere();
// geometry.computeBoundingBox();
// geometry.computeBoundingSphere();
}
......
......@@ -6,7 +6,7 @@ var nodeMaterial = new THREE.MeshBasicMaterial({color: 0x000000, side:THREE.Doub
var nodeMaterialFixed = new THREE.MeshBasicMaterial({color: 0x000000, side:THREE.DoubleSide});
var nodeMaterialHighlight = new THREE.MeshBasicMaterial({color: 0xffffff, side:THREE.DoubleSide});
var transparentMaterial = new THREE.MeshBasicMaterial({color: 0xffffff, side:THREE.DoubleSide, opacity:0.5, transparent:true});
var nodeGeo = new THREE.SphereGeometry(3,20);
var nodeGeo = new THREE.SphereGeometry(0.04,20);
nodeGeo.rotateX(Math.PI/2);
var nodeFixedGeo = new THREE.CubeGeometry(1, 1, 1);
nodeFixedGeo.applyMatrix( new THREE.Matrix4().makeTranslation(0, 0.25, 0) );
......
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