diff --git a/src/app/page.tsx b/src/app/page.tsx index 71fe665..ec94b73 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,4 @@ -import SphereCurve from "@/components/3d/curves/sphere"; +import ThingCurve from "@/components/3d/curves/thing"; import RenderedSection from "@/components/3d/renderedsection"; export default function Home() { @@ -6,7 +6,7 @@ export default function Home() { <> diff --git a/src/components/3d/curves/lorentz.ts b/src/components/3d/curves/lorentz.ts deleted file mode 100644 index bf0d179..0000000 --- a/src/components/3d/curves/lorentz.ts +++ /dev/null @@ -1,82 +0,0 @@ -"use client"; - -import * as THREE from "three"; -import { CurveProps } from "../renderer"; - -const maxParticles = 20000; - -const startScatter = 0.1; - -const init = () => { - var arrayCurve = []; - - var x = 0.01, - y = 0.01, - z = 0.01; - var a = 0.9; - var b = 3.4; - var f = 9.9; - var g = 1; - var t = 0.001; - for (var i = 0; i < maxParticles; i++) { - x = x - t * a * x + t * y * y - t * z * z + t * a * f; - y = y - t * y + t * x * y - t * b * x * z + t * g; - z = z - t * z + t * b * x * y + t * x * z; - arrayCurve.push( - new THREE.Vector3(x, y, z).multiplyScalar( - 1 - startScatter / 2 + Math.random() * startScatter - ) - ); - } - return arrayCurve; -}; - -const update = (pc: THREE.Points, group: THREE.Group) => { - //Varying the points on each frame - // step += 0.01; - var geometry = pc.geometry; - var a = 0.9 //+ Math.random() * .2; - var b = 3.4 //+ Math.random() * .1; - var f = 9.9 //+ Math.random() * .2; - var g = 1 //+ Math.random() * .1; - var t = 0.001; - - var positions = geometry.attributes.position; - const numPoints = positions.array.length / 3; - - for (let i = 0; i < numPoints; i++) { - let x = positions.getX(i), - y = positions.getY(i), - z = positions.getZ(i); - positions.setXYZ( - i, - x - t * a * x + t * y * y - t * z * z + t * a * f, - y - t * y + t * x * y - t * b * x * z + t * g, - z - t * z + t * b * x * y + t * x * z - ); - } - positions.needsUpdate = true; - - // TODO: remove - // group.rotation.x += 0.0005; - // group.rotation.y += 0.001; - // group.rotation.z -= 0.0005; -}; - -// INFO: Curve definition -const LorentzCurve: CurveProps = { - func: { init: init, update: update }, - cam: { - pos: new THREE.Vector3(8, 8, 18).multiplyScalar(2), - rotation: new THREE.Vector3(0, 0, 180), - }, - particles: { - max: maxParticles, - size: 0.1, - color: "#888", - darkcolor: "#444", - opacity: 0.4, - }, // 87a -}; - -export default LorentzCurve; diff --git a/src/components/3d/curves/sphere.ts b/src/components/3d/curves/thing.ts similarity index 93% rename from src/components/3d/curves/sphere.ts rename to src/components/3d/curves/thing.ts index 0a57f83..fc53530 100644 --- a/src/components/3d/curves/sphere.ts +++ b/src/components/3d/curves/thing.ts @@ -64,7 +64,7 @@ const update = (pc: THREE.Points, group: THREE.Group) => { }; // INFO: Curve definition -const SphereCurve = { +const ThingCurve = { func: { init: init, update: update }, cam: { pos: new THREE.Vector3(0, 0, 18).multiplyScalar(1.7), @@ -79,4 +79,4 @@ const SphereCurve = { }, // 87a }; -export default SphereCurve; +export default ThingCurve; diff --git a/src/components/layout/header.tsx b/src/components/layout/header.tsx index f7bc5f6..56bc561 100644 --- a/src/components/layout/header.tsx +++ b/src/components/layout/header.tsx @@ -1,5 +1,4 @@ import { Separator } from "@/components/ui/separator"; -import { cn } from "@/lib/utils"; import { Button } from "../ui/button"; import Link from "next/link"; @@ -7,6 +6,8 @@ import ThemeButton from "../themebutton"; import NavLinks from "../navlinks"; import NavCommand from "./nav"; +import Logo from "@/components/logo"; + const Header = () => (
@@ -15,15 +16,7 @@ const Header = () => ( href="/" className="flex flex-row items-center gap-x-2 hover:opacity-80 transition-opacity" > - {/* */} - - Wych - +
diff --git a/src/components/logo.tsx b/src/components/logo.tsx index 67442b4..faffaa8 100644 --- a/src/components/logo.tsx +++ b/src/components/logo.tsx @@ -1,30 +1,20 @@ import * as React from "react"; import { SVGProps } from "react"; -type LogoProps = { className?: string } & SVGProps; +type LogoProps = { + className?: string; +} & SVGProps; const Logo: React.FC = (props: SVGProps) => ( - - ); diff --git a/src/components/my.tsx b/src/components/my.tsx new file mode 100644 index 0000000..2e6f68d --- /dev/null +++ b/src/components/my.tsx @@ -0,0 +1,31 @@ +import * as React from "react"; +import { SVGProps } from "react"; + +type MySVGProps = { className?: string } & SVGProps; + +const MySVG: React.FC = (props: SVGProps) => ( + + + + + +); +export default MySVG;