-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Merged): restores recursive implementation (#2366)
- Loading branch information
1 parent
71b1128
commit aa0f742
Showing
2 changed files
with
87 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react' | ||
import { Meta, StoryObj } from '@storybook/react' | ||
|
||
import { Setup } from '../Setup' | ||
|
||
import { useGLTF, Merged, Instance } from '../../src' | ||
|
||
export default { | ||
title: 'Performance/Merged', | ||
component: Merged, | ||
decorators: [ | ||
(Story) => ( | ||
<Setup> | ||
<Story /> | ||
</Setup> | ||
), | ||
], | ||
} satisfies Meta<typeof Merged> | ||
|
||
type Story = StoryObj<typeof Merged> | ||
|
||
function Scene() { | ||
const { nodes } = useGLTF('suzanne.glb', true) | ||
return <Merged meshes={nodes}>{({ Suzanne }) => <Suzanne />}</Merged> | ||
} | ||
|
||
export const DefaultStory = { | ||
render: (args) => <Scene {...args} />, | ||
name: 'Default', | ||
} satisfies Story |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters