Revert "Progress sync"

This reverts commit 359018746c.
This commit is contained in:
BOTAlex 2024-03-31 21:49:37 +02:00
parent 359018746c
commit 041e2935c7
3 changed files with 22 additions and 77 deletions

16
package-lock.json generated
View File

@ -19,7 +19,6 @@
"svelte": "^4.2.7", "svelte": "^4.2.7",
"svelte-check": "^3.6.0", "svelte-check": "^3.6.0",
"svelte-highlight": "^7.6.0", "svelte-highlight": "^7.6.0",
"svelte-parallax": "^0.6.0",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^5.0.3" "vite": "^5.0.3"
} }
@ -898,12 +897,6 @@
"node": ">=8.0" "node": ">=8.0"
} }
}, },
"node_modules/focus-options-polyfill": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/focus-options-polyfill/-/focus-options-polyfill-1.6.0.tgz",
"integrity": "sha512-uyrAmLZrPnUItQY5wTdg31TO9GGZRGsh/jmohUg9oLmLi/sw5y7LlTV/mwyd6rvbxIOGwmRiv6LcTS8w7Bk9NQ==",
"dev": true
},
"node_modules/fs-constants": { "node_modules/fs-constants": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
@ -1801,15 +1794,6 @@
"resolved": "https://registry.npmjs.org/svelte-media-queries/-/svelte-media-queries-1.6.2.tgz", "resolved": "https://registry.npmjs.org/svelte-media-queries/-/svelte-media-queries-1.6.2.tgz",
"integrity": "sha512-SMz6od/vIeZEGlc4P0HKJK4G0fZotuwFhCSpBQaPqh75h6sL6sNf+4+IjbegFKXbP7b+SOfyzVOIMXTr8jynkA==" "integrity": "sha512-SMz6od/vIeZEGlc4P0HKJK4G0fZotuwFhCSpBQaPqh75h6sL6sNf+4+IjbegFKXbP7b+SOfyzVOIMXTr8jynkA=="
}, },
"node_modules/svelte-parallax": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/svelte-parallax/-/svelte-parallax-0.6.0.tgz",
"integrity": "sha512-W2dGPNmK274AmL8Ibzr96luh24jr3u2MfAmAJTpnhAZwxkRws5MKgCxfxBBPvpRUc2GpGGIGanhTYXoHV6DcBw==",
"dev": true,
"dependencies": {
"focus-options-polyfill": "^1.6.0"
}
},
"node_modules/svelte/node_modules/@ampproject/remapping": { "node_modules/svelte/node_modules/@ampproject/remapping": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",

View File

@ -18,7 +18,6 @@
"svelte": "^4.2.7", "svelte": "^4.2.7",
"svelte-check": "^3.6.0", "svelte-check": "^3.6.0",
"svelte-highlight": "^7.6.0", "svelte-highlight": "^7.6.0",
"svelte-parallax": "^0.6.0",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^5.0.3" "vite": "^5.0.3"
}, },

View File

@ -4,8 +4,6 @@
import TopNameTextPlate from "./TopNameTextPlate.svelte"; import TopNameTextPlate from "./TopNameTextPlate.svelte";
//import { throttle } from "./../Utils/Throttle"; //import { throttle } from "./../Utils/Throttle";
import { Parallax, ParallaxLayer, StickyLayer } from "svelte-parallax";
// Params // Params
let mouseMoveScale: number = 0.25; let mouseMoveScale: number = 0.25;
let targetTextLenght: number = 100; let targetTextLenght: number = 100;
@ -54,32 +52,24 @@
windowRef.addEventListener("resize", updateDimensions); windowRef.addEventListener("resize", updateDimensions);
const RevertToOrigin = () => { const RevertToOrigin = () => {
if ( if(navigator.userAgent.search(/gecko/i)>0 && StartPageAnimated !== null){
navigator.userAgent.search(/gecko/i) > 0 && StartPageAnimated.classList.add('FirefoxSmoothTranition');
StartPageAnimated !== null
) {
StartPageAnimated.classList.add("FirefoxSmoothTranition");
} }
updateAnimation(new Vector2(windowWidth / 2, windowHeight / 2)); updateAnimation(new Vector2(windowWidth/2, windowHeight/2));
}; };
document.documentElement.addEventListener("mouseleave", RevertToOrigin); document.documentElement.addEventListener('mouseleave', RevertToOrigin)
const RemoveFirefoxSmoothTranition = () => { const RemoveFirefoxSmoothTranition = () => {
if ( if(navigator.userAgent.search(/gecko/i)>0 && StartPageAnimated !== null){
navigator.userAgent.search(/gecko/i) > 0 && StartPageAnimated.classList.remove('FirefoxSmoothTranition');
StartPageAnimated !== null
) {
StartPageAnimated.classList.remove("FirefoxSmoothTranition");
} }
}; };
document.documentElement.addEventListener( document.documentElement.addEventListener('mouseenter', RemoveFirefoxSmoothTranition)
"mouseenter",
RemoveFirefoxSmoothTranition,
);
return () => { return () => {
windowRef.removeEventListener("resize", updateDimensions); windowRef.removeEventListener("resize", updateDimensions);
}; };
}); });
const programmingLanguages: string[] = [ const programmingLanguages: string[] = [
@ -91,52 +81,27 @@
"JAVASCRIPT", "JAVASCRIPT",
"TYPESCRIPT", "TYPESCRIPT",
"HTML", "HTML",
"CSS", "CSS"
]; ];
function getRandomInt(max: number) { function getRandomInt(max: number) {
return Math.floor(Math.random() * max); return Math.floor(Math.random() * max);
} }
function GrabRandomString() { function GrabRandomString(){
let outString: string = ""; let outString: string = "";
while (outString.length < targetTextLenght) { while (outString.length < targetTextLenght) {
outString += outString += programmingLanguages[getRandomInt(programmingLanguages.length)] + " ";
programmingLanguages[
getRandomInt(programmingLanguages.length)
] + " ";
} }
return outString; // At about target size return outString; // At about target size
} }
</script> </script>
<svelte:window on:mousemove={onMouseMoved} /> <svelte:window on:mousemove={onMouseMoved} />
<Parallax sections={2} config={{ stiffness: 0.2, damping: 0.3 }}> <div class="StartPageContainer">
<ParallaxLayer class="StartPageContainer" rate={0.25} offset={0} span={0}>
<div
class="StartPageAnimated"
bind:this={StartPageAnimated}
style="transform: translate({mouseRelativeScaled.x}px, {mouseRelativeScaled.y}px) translateZ(0) rotate(0.001deg);"
>
{#each { length: 100 } as _, i}
<span class="rotate45 SkillsText">
{GrabRandomString()}
</span>
{/each}
</div>
</ParallaxLayer>
<ParallaxLayer rate={0} offset={0.25} span={0}>
<TopNameTextPlate />
</ParallaxLayer>
<ParallaxLayer rate={0.5} offset={0.5} style="background-color: darkblue;">
</ParallaxLayer>
</Parallax>
<!-- <div class="StartPageContainer">
<div class="TopOverlay"> <div class="TopOverlay">
<TopNameTextPlate/> <TopNameTextPlate/>
</div> </div>
@ -157,13 +122,13 @@
> >
{/each} {/each}
</div> </div>
</div> --> </div>
<div id="DummyDiv" class="FirefoxSmoothTranition StartPageContainer TopOverlay" style="display: none !important;" /> <div id="DummyDiv" class="FirefoxSmoothTranition"/>
<style> <style>
.StartPageContainer { .StartPageContainer {
/* height: 40vh; */ height: 40vh;
background-color: burlywood; background-color: burlywood;
overflow: hidden; overflow: hidden;
@ -188,28 +153,25 @@
transition: transform 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; -moz-transition: none;
left: -25vw;
top: -25vh;
justify-content: center; justify-content: center;
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
} }
.FirefoxSmoothTranition { .FirefoxSmoothTranition{
transition: transform 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: transform 1000ms cubic-bezier(0.16, 1.63, 0.01, 0.99) !important; -moz-transition: transform 1000ms cubic-bezier(0.16, 1.63, 0.01, 0.99) !important;
} }
.SkillsText { .SkillsText{
font-family: "CozetteVector"; font-family: 'CozetteVector';
text-align: start; text-align: start;
font-size: x-large; font-size: x-large;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
white-space: nowrap; white-space:nowrap;
width: 2rem; width: 2rem;