[READ-ONLY] Mirror of https://github.com/flo-bit/flo-bit.github.io. my personal website, w/ astro, svelte, tailwind, typescript, threlte flo-bit.dev/
portfolio portfolio-website svelte sveltekit tailwind threejs threlte typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #9 from flo-bit/main

social links, interactive planets

authored by

Florian and committed by
GitHub
(Jan 22, 2024, 3:30 AM +0100) 3f004550 8f635b4c

+117 -23
+1 -1
src/routes/+page.svelte
··· 48 48 src={fallback} 49 49 alt="background" 50 50 /> 51 - <div class="fixed left-0 right-0 top-0 h-screen -z-40"> 51 + <div class="fixed left-0 right-0 top-0 h-screen"> 52 52 <Canvas> 53 53 <Scene pos={percentageScroll} /> 54 54 </Canvas>
+48 -9
src/lib/3D/Scene.svelte
··· 1 1 <script lang="ts"> 2 2 import { T, useTask, useThrelte } from '@threlte/core'; 3 - import * as THREE from 'three'; 4 - import { OrbitControls } from '@threlte/extras'; 3 + import { Color } from 'three'; 4 + import { interactivity, useCursor } from '@threlte/extras'; 5 + interactivity(); 6 + 7 + const { hovering, onPointerEnter, onPointerLeave } = useCursor() 5 8 6 9 import Stars from './Stars.svelte'; 7 10 import { onMount } from 'svelte'; 8 11 import PlanetModel from './PlanetModel.svelte'; 9 12 import Nebula from './Nebula.svelte'; 10 13 14 + import { spring } from 'svelte/motion'; 15 + 16 + let rotate = spring( 17 + 0, 18 + { 19 + stiffness: 0.1, 20 + damping: 0.05 21 + } 22 + ); 23 + let size = spring( 24 + 2, 25 + { 26 + stiffness: 0.1, 27 + damping: 0.1 28 + } 29 + ); 30 + 11 31 let rotation = 0; 12 32 let distance = 1; 33 + 34 + let rotationSpeed = 0.1; 13 35 useTask((delta) => { 14 - rotation += delta * 0.1; 36 + // rotation += delta * rotationSpeed; 37 + 38 + rotate.set($rotate + delta * rotationSpeed); 15 39 16 40 if (window.innerWidth < 768) { 17 41 distance = 6; ··· 23 47 const { scene, renderer } = useThrelte(); 24 48 25 49 onMount(() => { 26 - scene.background = new THREE.Color(0x000000); 50 + scene.background = new Color(0x000000); 27 51 renderer.setClearColor(0x000000, 1); 28 52 }); 29 53 30 54 export let pos = 0; 31 55 56 + function debounceScale() { 57 + setTimeout(() => { 58 + size.set(2); 59 + }, 100); 60 + } 32 61 </script> 33 62 34 63 <T.PerspectiveCamera ··· 38 67 ref.lookAt(0, 1, 0); 39 68 }} 40 69 far={100} 41 - > 42 - <OrbitControls autoRotate={false} /> 43 - </T.PerspectiveCamera> 70 + ></T.PerspectiveCamera> 44 71 45 72 <T.DirectionalLight intensity={3} position={[-pos * 10 + 5, 2 + pos * 3, 2]} /> 46 73 47 74 <T.AmbientLight intensity={0.1} /> 48 75 49 76 <PlanetModel 50 - scale={2} 51 - rotation.y={rotation} 77 + on:click={() => { 78 + rotate.set($rotate + 4); 79 + }} 80 + on:pointerleave={() => { 81 + size.set(2) 82 + onPointerLeave() 83 + }} 84 + on:pointerenter={() => { 85 + size.set(2.2) 86 + onPointerEnter()} 87 + } 88 + 89 + scale={$size} 90 + rotation.y={$rotate} 52 91 rotation.z={0.1} 53 92 position.x={pos * 4 - 2} 54 93 position.z={-distance}
-2
src/lib/components/About.svelte
··· 1 1 <script lang="ts"> 2 - import SocialLink from '$lib/components/SocialLink.svelte'; 3 - 4 2 // @ts-ignore 5 3 import imageMe from '$lib/images/avatar.png?w=1024&format=webp'; 6 4 import Resume from './Resume.svelte';
+51 -7
src/lib/components/Contact.svelte
··· 2 2 import SocialLink from '$lib/components/SocialLink.svelte'; 3 3 </script> 4 4 5 - <div class="py-32 bg-black/30 md:bg-transparent section" id="contact"> 5 + <div class="relative isolate py-32 bg-black/30 md:bg-transparent section pointer-events-none" id="contact"> 6 6 <div class="mx-auto max-w-5xl px-6 lg:px-8"> 7 7 <div class="grid grid-cols-1 gap-x-8 gap-y-10 md:grid-cols-3"> 8 8 <div> 9 - <h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-zinc-100"> 9 + <h2 class="text-3xl font-bold tracking-tight text-zinc-900 dark:text-zinc-100 pointer-events-auto"> 10 10 Get in touch 11 11 </h2> 12 - <p class="mt-4 leading-7 text-zinc-600 dark:text-zinc-300"> 12 + <p class="mt-4 leading-7 text-zinc-600 dark:text-zinc-300 pointer-events-auto"> 13 13 You have a project in mind? Let's talk about it. Drop me a line and I'll get back to you 14 14 as soon as possible. 15 15 </p> 16 16 17 - <ul role="list" class="mt-8"> 17 + <ul role="list" class="mt-8 pointer-events-auto"> 18 18 <SocialLink href="https://github.com/flo-bit" class="mt-4"> 19 19 <svelte:fragment slot="icon"> 20 20 <svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> ··· 25 25 /> 26 26 </svg> 27 27 </svelte:fragment> 28 - Follow on GitHub</SocialLink 28 + GitHub</SocialLink 29 29 > 30 30 <SocialLink href="https://linkedin.com/in/floriankillius" class="mt-4"> 31 31 <svelte:fragment slot="icon"> 32 - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" 32 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="x-5 h-5" 33 33 ><path 34 34 d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" 35 35 /></svg 36 36 > 37 37 </svelte:fragment> 38 - Connect on LinkedIn 38 + LinkedIn 39 39 </SocialLink> 40 + <SocialLink href="https://www.instagram.com/flobit.dev/" class="mt-4"> 41 + <svelte:fragment slot="icon"> 42 + <svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> 43 + <path 44 + fill-rule="evenodd" 45 + d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" 46 + clip-rule="evenodd" 47 + /> 48 + </svg> 49 + </svelte:fragment> 50 + Instagram 51 + </SocialLink> 52 + <SocialLink href="https://youtube.com/@flobit" class="mt-4"> 53 + <svelte:fragment slot="icon"> 54 + <svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> 55 + <path 56 + fill-rule="evenodd" 57 + d="M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 0 1-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 0 1-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 0 1 1.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418ZM15.194 12 10 15V9l5.194 3Z" 58 + clip-rule="evenodd" 59 + /> 60 + </svg> 61 + </svelte:fragment> 62 + Youtube 63 + </SocialLink> 64 + <SocialLink href="https://flobit.substack.com/" class="mt-4"> 65 + <svelte:fragment slot="icon"> 66 + <svg 67 + xmlns="http://www.w3.org/2000/svg" 68 + shape-rendering="geometricPrecision" 69 + text-rendering="geometricPrecision" 70 + image-rendering="optimizeQuality" 71 + fill-rule="evenodd" 72 + clip-rule="evenodd" 73 + viewBox="0 0 448 511.471" 74 + fill="currentColor" 75 + class="w-4 h-4" 76 + ><path 77 + d="M0 0h448v62.804H0V0zm0 229.083h448v282.388L223.954 385.808 0 511.471V229.083zm0-114.542h448v62.804H0v-62.804z" 78 + /></svg 79 + > 80 + </svelte:fragment> 81 + Substack 82 + </SocialLink> 83 + 40 84 <SocialLink href="mailto:flo.bit.dev@gmail.com" class="mt-8"> 41 85 <svelte:fragment slot="icon"> 42 86 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
+1 -1
src/lib/components/Footer.svelte
··· 1 - <footer class="bg-black"> 1 + <footer class="bg-black relative isolate "> 2 2 <div class="mx-auto max-w-7xl overflow-hidden px-6 py-12 lg:px-8"> 3 3 <p class="mt-4 text-center text-xs leading-5 text-zinc-500 dark:text-zinc-400"> 4 4 &copy; 2024 Florian Killius. All rights reserved.
+1 -1
src/lib/components/Hero.svelte
··· 1 - <div class="relative isolate overflow-hidden section h-screen" id="home"> 1 + <div class="relative isolate overflow-hidden section h-screen pointer-events-none ml-52" id="home"> 2 2 <div class="mx-auto max-w-5xl px-6 py-40 lg:px-8"> 3 3 <div class=""> 4 4 <h1
+13 -1
src/lib/components/Projects.svelte
··· 14 14 link: { href: 'http://hyperlumen.de', label: 'hyperlumen.de' } 15 15 }, 16 16 { 17 + name: 'Text Effect Fluid', 18 + description: "Text effect that looks like it's made of fluid.", 19 + link: { href: 'https://github.com/flo-bit/text_effect_fluid', label: 'github.com' } 20 + }, 21 + { 17 22 name: 'Ball Game', 18 23 description: 19 24 'Simple 3D browser game made with Threlte. Inspired by the game "Marble Blast Gold".', ··· 47 52 import svleek from '$lib/images/projects/svleek.png?w=1024&format=webp'; 48 53 //@ts-ignore 49 54 import mandala from '$lib/images/projects/mandala.png?w=1024&format=webp'; 55 + //@ts-ignore 56 + import fluideffect from '$lib/images/projects/text-effect-fluid.png?w=1024&format=webp'; 50 57 51 58 let images: { 52 59 src: string; ··· 57 64 src: hyperlumen, 58 65 alt: 'Hyperlumen', 59 66 href: 'https://hyperlumen.de' 67 + }, 68 + { 69 + src: fluideffect, 70 + alt: 'Text Fluid Effect', 71 + href: 'https://flo-bit.github.io/text_effect_fluid/' 60 72 }, 61 73 { 62 74 src: ballgame, ··· 81 93 ]; 82 94 </script> 83 95 84 - <div id="projects" class="py-16 md:py-32 section bg-black"> 96 + <div id="projects" class="z-20 py-16 md:py-32 section bg-black relative isolate "> 85 97 <div class="mx-auto max-w-5xl px-6 lg:px-8"> 86 98 <div class="max-w-2xl"> 87 99 <h1 class="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
+2 -1
src/lib/components/SocialLink.svelte
··· 8 8 9 9 <li class="flex {classes}"> 10 10 <a 11 + target="_blank" 11 12 {href} 12 13 class="group flex items-center text-sm font-medium text-zinc-800 transition duration-100 hover:text-cyan-500 dark:text-zinc-200 dark:hover:text-cyan-500" 13 14 > 14 - <div class="h-6 w-6 flex-none fill-zinc-500 transition duration-100 group-hover:fill-cyan-500"> 15 + <div class="h-6 w-6 flex-none fill-zinc-500 transition duration-100 group-hover:fill-cyan-500 flex items-center justify-center"> 15 16 <slot name="icon" /> 16 17 </div> 17 18 <span class="ml-4"><slot /></span>
src/lib/images/projects/fluid-effect.png

This is a binary file and will not be displayed.

src/lib/images/projects/text-effect-fluid.png

This is a binary file and will not be displayed.