Home page
- fix bug with mouse tracker in home page Site - change line in header (index.html) to delete warning in console
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<link rel="manifest" href="/static/manifest.json">
|
<link rel="manifest" href="/static/manifest.json">
|
||||||
<title>Chat</title>
|
<title>Chat</title>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/22 17:19:17 by edbernar #+# #+# */
|
/* Created: 2024/08/22 17:19:17 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/11/14 10:49:34 by edbernar ### ########.fr */
|
/* Updated: 2024/11/15 13:53:22 by edbernar ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -261,6 +261,7 @@ function home3D()
|
|||||||
{
|
{
|
||||||
document.getElementsByTagName('canvas')[1].addEventListener('click', redirection);
|
document.getElementsByTagName('canvas')[1].addEventListener('click', redirection);
|
||||||
clickDetect = true;
|
clickDetect = true;
|
||||||
|
console.log('clickDetect');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,8 +383,8 @@ function windowUpdater(e)
|
|||||||
function mouseTracker (event)
|
function mouseTracker (event)
|
||||||
{
|
{
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
|
mouse.x = ((event.clientX / window.innerWidth) * 2 - 1);
|
||||||
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
|
mouse.y = ((-(event.clientY / window.innerHeight) * 2) + 1) + (-(window.scrollY / window.innerHeight) * 2);
|
||||||
};
|
};
|
||||||
|
|
||||||
function redirection()
|
function redirection()
|
||||||
|
Reference in New Issue
Block a user