Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .storybook/stories/FaceControls.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export default {
),
],
tags: ['!autodocs'], // FaceLandmarker cannot have multiple instances
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<typeof FaceControls>

type Story = StoryObj<typeof FaceControls>
Expand Down
5 changes: 3 additions & 2 deletions .storybook/stories/Fbo.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ type Story = StoryObj<typeof Fbo>
function SpinningThing() {
const mesh = React.useRef<React.ComponentRef<typeof TorusKnot>>(null!)

useFrame(() => {
mesh.current.rotation.x = mesh.current.rotation.y = mesh.current.rotation.z += 0.01
useFrame((state) => {
const t = state.clock.getElapsedTime()
mesh.current.rotation.x = mesh.current.rotation.y = mesh.current.rotation.z = t
})

return (
Expand Down
11 changes: 2 additions & 9 deletions .storybook/stories/HTML.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,14 @@ export const HTMLTransformSt = {

function HTMLOrthographicScene(props: HtmlProps) {
const camera = useThree((state) => state.camera)
const [zoomIn, setZoomIn] = React.useState(true)

const initialCamera = {
position: new THREE.Vector3(0, 0, -10),
}

useFrame(() => {
zoomIn ? (camera.zoom += 0.01) : (camera.zoom -= 0.01)
useFrame((state) => {
camera.zoom = 2 + Math.sin(state.clock.getElapsedTime()) * 1
camera.updateProjectionMatrix()

if (camera.zoom > 3) {
setZoomIn(false)
} else if (camera.zoom < 1) {
setZoomIn(true)
}
})

return (
Expand Down
3 changes: 3 additions & 0 deletions .storybook/stories/Instances.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default {
</Setup>
),
],
parameters: {
chromatic: { disableSnapshot: true },
},
}

// type Story = StoryObj
Expand Down
3 changes: 3 additions & 0 deletions .storybook/stories/WebcamVideoTexture.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default {
</Setup>
),
],
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<typeof WebcamVideoTexture>

type Story = StoryObj<typeof WebcamVideoTexture>
Expand Down
3 changes: 1 addition & 2 deletions chromatic.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"projectId": "Project:64a019f36ecd3751d0ada612",
"zip": true,
"onlyStoryFiles": [".storybook/stories/Example.stories.tsx", ".storybook/stories/CameraShake.stories.tsx"]
"zip": true
}
Loading