From 736a059912da0fae5e89d6b0cfd4099a585923f9 Mon Sep 17 00:00:00 2001 From: Bela Bohlender Date: Mon, 26 Feb 2024 19:17:09 +0100 Subject: [PATCH] improve examples --- examples/market/src/components/album-artwork.tsx | 1 + examples/uikit/src/App.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/market/src/components/album-artwork.tsx b/examples/market/src/components/album-artwork.tsx index 7f95aecc..ce63ac12 100644 --- a/examples/market/src/components/album-artwork.tsx +++ b/examples/market/src/components/album-artwork.tsx @@ -20,6 +20,7 @@ export function AlbumArtwork({ src={album.cover} width={width} height={height} + fit="cover" aspectRatio={aspectRatio === 'portrait' ? 3 / 4 : 1} /> diff --git a/examples/uikit/src/App.tsx b/examples/uikit/src/App.tsx index 883605d3..8db6c2d5 100644 --- a/examples/uikit/src/App.tsx +++ b/examples/uikit/src/App.tsx @@ -16,7 +16,7 @@ import { RenderTexture } from '@react-three/drei' import { Texture } from 'three' export default function App() { - const [texture, setTexture] = useState(null) + const texture = useMemo(() => signal(undefined), []) const [show, setShow] = useState(false) const s = useMemo(() => signal(5), []) const x = useMemo(() => signal('red'), []) @@ -27,7 +27,7 @@ export default function App() { - + (texture.value = t ?? undefined)}>