diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1ed453a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.{js,json,yml}] +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af3ad12 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +/.yarn/** linguist-vendored +/.yarn/releases/* binary +/.yarn/plugins/**/* binary +/.pnp.* binary linguist-generated diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz new file mode 100644 index 0000000..5124f4e Binary files /dev/null and b/.yarn/install-state.gz differ diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/astro.config.mjs b/astro.config.mjs index 04eae20..f71d3c1 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,4 +1,8 @@ -import { defineConfig } from "astro/config"; +import { + defineConfig, + passthroughImageService, + squooshImageService, +} from "astro/config"; import tailwind from "@astrojs/tailwind"; import react from "@astrojs/react"; @@ -9,7 +13,7 @@ export default defineConfig({ integrations: [tailwind(), react()], output: "hybrid", adapter: vercel({ - imageService: true, + // imageService: true, webAnalytics: { enabled: true, }, @@ -18,4 +22,7 @@ export default defineConfig({ }, functionPerRoute: true, }), + image: { + service: squooshImageService(), + }, }); diff --git a/package.json b/package.json index 456b7f6..4c42572 100644 --- a/package.json +++ b/package.json @@ -10,19 +10,27 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^3.0.4", - "@astrojs/tailwind": "^5.0.2", - "@astrojs/vercel": "^5.1.0", + "@astrojs/react": "3.6.2", + "@astrojs/tailwind": "5.1.0", + "@astrojs/vercel": "7.7.2", "@icons-pack/react-simple-icons": "^9.1.0", + "@react-three/drei": "^9.101.0", + "@react-three/fiber": "^8.15.19", + "@react-three/xr": "^5.7.1", + "@tailwindcss/typography": "^0.5.10", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", - "astro": "^3.4.0", + "astro": "4.14.2", "astro-seo": "^0.8.0", "react": "^18.0.0", "react-dom": "^18.0.0", - "tailwindcss": "^3.0.24" + "sharp": "^0.33.5", + "squoosh": "^0.0.0", + "tailwindcss": "^3.0.24", + "three": "^0.162.0" }, "devDependencies": { - "sass": "^1.69.5" + "sass": "^1.69.5", + "typescript": "^5.5.4" } } diff --git a/src/assets/img/work/this-website-thumb.png b/src/assets/img/work/this-website-thumb.png new file mode 100644 index 0000000..e716346 Binary files /dev/null and b/src/assets/img/work/this-website-thumb.png differ diff --git a/src/components/AR.tsx b/src/components/AR.tsx new file mode 100644 index 0000000..ccc19d5 --- /dev/null +++ b/src/components/AR.tsx @@ -0,0 +1,66 @@ +import { Interactive, XR, ARButton, Controllers } from "@react-three/xr"; +import { Text } from "@react-three/drei"; +import { Canvas } from "@react-three/fiber"; +import { useState, Suspense } from "react"; + +function Box({ color, size, scale, children, ...rest }: any) { + return ( + + + + {children} + + ); +} + +function Button(props: any) { + const [hover, setHover] = useState(false); + const [color, setColor] = useState("blue"); + + const onSelect = () => { + setColor((Math.random() * 0xffffff) | 0); + }; + + return ( + setHover(true)} + onBlur={() => setHover(false)} + onSelect={onSelect} + > + + + + Hello react-xr! + + + + + ); +} + +export default function AR() { + return ( + <> + + + + + +