jQuery dialog is not working while using in three.js. I'm trying to implement a click event on a Circle(using Circle Geometry) using jQuery. But it not supporting. Here is my code:
function onDocumentMouseDown(event) {
event.preventDefault();
var vector = new THREE.Vector3((event.clientX / window.innerWidth) * 2 - 1, -(event.clientY / window.innerHeight) * 2 + 1, 0.5);
vector = vector.unproject(camera);
var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize());
var intersects = raycaster.intersectObjects(sphereMesh.children, true);
if (intersects.length > 0) {
console.log(intersects[0]);
if (intersects[0].object.name == "mesh") {
contactus();
}
}
}
function contactus() {
$("#dialog-message").dialog({
draggable: true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
}
I'm not able to see the content in the dialog. But I can see the dialog with "close" button. And mouse click is not working on the dialog.