This commit is contained in:
Avijit Gupta 2016-01-17 05:58:09 +05:30 коммит произвёл Yash Mehrotra
Родитель 6ddb717632
Коммит 9fcd6f4033
2 изменённых файлов: 26 добавлений и 0 удалений

Просмотреть файл

@ -312,6 +312,28 @@ if (Meteor.isClient) {
}
},
"mousemove": function(e) {
var mouse = {
x: (e.clientX / WIDTH)*2 - 1,
y: (e.clientY / HEIGHT)*2 - 1
};
var mouseVector = new THREE.Vector3(mouse.x, mouse.y, 0.5);
projector.unprojectVector(mouseVector, camera);
var raycaster = new THREE.Raycaster(camera.position, mouseVector.sub( camera.position).normalize() );
var intersects = raycaster.intersectObjects(sceneObjects, true);
$('body').removeClass('mousepointer');
if (intersects.length) {
intersects.forEach(function(intersect) {
var attackRank = intersect.object.rank;
if (typeof attackRank !== "undefined") {
$('body').addClass('mousepointer');
}
});
}
},
"change .cbox": function(event) {
var isChecked = $('.cbox').is(':checked');
var attackId = Session.get('attackDetails').id;

Просмотреть файл

@ -570,4 +570,8 @@ circle:hover{
.vr-sidenav #attacks-list .attacks-list-item:hover {
cursor: pointer;
text-decoration: underline;
}
.mousepointer {
cursor: pointer;
}