Compare commits
3 Commits
7134f79809
...
878c1f6b5f
Author | SHA1 | Date |
---|---|---|
BOTAlex | 878c1f6b5f | |
BOTAlex | c3a0c735fa | |
BOTAlex | b444948903 |
|
@ -6,7 +6,7 @@
|
|||
|
||||
// Params
|
||||
let mouseMoveScale: number = 0.25;
|
||||
let targetTextLenght: number = 70;
|
||||
let targetTextLenght: number = 80;
|
||||
|
||||
// Site variables
|
||||
let mousePos: Vector2;
|
||||
|
@ -51,9 +51,25 @@
|
|||
|
||||
windowRef.addEventListener("resize", updateDimensions);
|
||||
|
||||
const RevertToOrigin = () => {
|
||||
if(navigator.userAgent.search(/gecko/i)>0){
|
||||
StartPageAnimated.classList.add('FirefoxSmoothTranition');
|
||||
}
|
||||
updateAnimation(new Vector2(windowWidth/2, windowHeight/2));
|
||||
};
|
||||
document.documentElement.addEventListener('mouseleave', RevertToOrigin)
|
||||
|
||||
const RemoveFirefoxSmoothTranition = () => {
|
||||
if(navigator.userAgent.search(/gecko/i)>0){
|
||||
StartPageAnimated.classList.remove('FirefoxSmoothTranition');
|
||||
}
|
||||
};
|
||||
document.documentElement.addEventListener('mouseenter', RemoveFirefoxSmoothTranition)
|
||||
|
||||
return () => {
|
||||
windowRef.removeEventListener("resize", updateDimensions);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
const programmingLanguages: string[] = [
|
||||
|
@ -93,7 +109,7 @@
|
|||
<div
|
||||
class="StartPageAnimated"
|
||||
bind:this={StartPageAnimated}
|
||||
style="transform: translate({mouseRelativeScaled.x}px, {mouseRelativeScaled.y}px);"
|
||||
style="transform: translate({mouseRelativeScaled.x}px, {mouseRelativeScaled.y}px) translateZ(0) rotate(0.001deg);"
|
||||
>
|
||||
{#each {length: 100} as _, i}
|
||||
|
||||
|
@ -107,6 +123,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DummyDiv" class="FirefoxSmoothTranition"/>
|
||||
|
||||
<style>
|
||||
.StartPageContainer {
|
||||
height: 40vh;
|
||||
|
@ -131,13 +149,19 @@
|
|||
|
||||
padding: 0;
|
||||
|
||||
transition: all 1000ms cubic-bezier(0.16, 1.63, 0.01, 0.99);
|
||||
transition: transform 1000ms cubic-bezier(0.16, 1.63, 0.01, 0.99);
|
||||
-moz-transition: none;
|
||||
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.FirefoxSmoothTranition{
|
||||
transition: none;
|
||||
-moz-transition: transform 1000ms cubic-bezier(0.16, 1.63, 0.01, 0.99) !important;
|
||||
}
|
||||
|
||||
.SkillsText{
|
||||
font-family: 'CozetteVector';
|
||||
|
||||
|
|
Loading…
Reference in New Issue