javascript - jQuery Dialog not working in three.js -
jquery dialog not working while using in three.js. i'm trying implement click event on circle(using circle geometry) using jquery. not supporting. here 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 see content in dialog. can see dialog "close" button. , mouse click not working on dialog.
content has nothing jquery dialog , can try adding hardcoded constant, events work need bind these buttons like,
$( #dialog-message" ).dialog({ dialogclass: "no-close", buttons: [ { text: "ok", click: function() { $( ).dialog( "close" ); } } ] });
further can refer api, https://api.jqueryui.com/dialog/
Comments
Post a Comment