Skip to content

Commit

Permalink
improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Feb 26, 2024
1 parent ba8e1f5 commit 736a059
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/market/src/components/album-artwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function AlbumArtwork({
src={album.cover}
width={width}
height={height}
fit="cover"
aspectRatio={aspectRatio === 'portrait' ? 3 / 4 : 1}
/>
<Container gap={4}>
Expand Down
4 changes: 2 additions & 2 deletions examples/uikit/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RenderTexture } from '@react-three/drei'
import { Texture } from 'three'

export default function App() {
const [texture, setTexture] = useState<Texture | null>(null)
const texture = useMemo(() => signal<Texture | undefined>(undefined), [])
const [show, setShow] = useState(false)
const s = useMemo(() => signal(5), [])
const x = useMemo(() => signal<string | undefined>('red'), [])
Expand All @@ -27,7 +27,7 @@ export default function App() {
<ambientLight intensity={0.5} />
<directionalLight intensity={10} position={[5, 1, 10]} />
<Gltf position={[200, 0, 200]} scale={0.1} src="scene.glb" />
<RenderTexture ref={setTexture}>
<RenderTexture ref={(t) => (texture.value = t ?? undefined)}>
<Box />
</RenderTexture>
<Fullscreen
Expand Down

0 comments on commit 736a059

Please sign in to comment.