Skip to content

Commit 516ade5

Browse files
drcmdaisaac-mason
andauthored
BREAKING: 4.x, react 19, fiber v9 (#41)
* BREAKING: 4.x, react 19, fiber v9 * v4 * fix: node version CI * CI github actions v3 * ... * ... * feat: update @react-three/fiber and @react-three/drei to non rc versions * fix: cleanup readme example --------- Co-authored-by: “Isaac <[email protected]>
1 parent cad162e commit 516ade5

File tree

16 files changed

+14659
-12411
lines changed

16 files changed

+14659
-12411
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Repo
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818

19-
- name: Setup Node.js 16.x
20-
uses: actions/setup-node@v2
19+
- name: Setup Node.js 18.x
20+
uses: actions/setup-node@v3
2121
with:
22-
node-version: 16.x
22+
node-version: 18.x
2323

2424
- name: Install Dependencies
2525
run: yarn

.storybook/common/Setup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Vector3 } from 'three'
3-
import { Canvas, Props as CanvasProps } from '@react-three/fiber'
3+
import { Canvas, CanvasProps } from '@react-three/fiber'
44
import { OrbitControls } from '@react-three/drei'
55

66
type Props = React.PropsWithChildren<
@@ -21,7 +21,7 @@ export const Setup = ({
2121
...restProps
2222
}: Props) => (
2323
<Canvas shadows camera={{ position: cameraPosition, fov: cameraFov }} {...restProps}>
24-
{children}
24+
{children}
2525
{lights && (
2626
<>
2727
<ambientLight intensity={0.8} />

.storybook/index.css

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,14 @@
11
html,
22
body,
3-
#root {
4-
width: 100%;
3+
#storybook-root {
54
height: 100%;
6-
margin: 0;
7-
padding: 0;
8-
-webkit-touch-callout: none;
9-
-webkit-user-select: none;
10-
-khtml-user-select: none;
11-
-moz-user-select: none;
12-
-ms-user-select: none;
13-
user-select: none;
14-
overflow: hidden;
15-
background-color: #121212;
16-
}
17-
18-
#root {
19-
overflow: auto;
20-
}
21-
22-
.html-story-block {
23-
color: white;
24-
width: 120px;
25-
position: relative;
26-
margin-left: 100px;
27-
}
28-
29-
.html-story-block.margin300 {
30-
margin-left: 300px;
315
}
326

33-
.html-story-block:before {
34-
content: '';
35-
display: block;
36-
position: absolute;
37-
38-
top: 50%;
39-
left: -60px;
40-
41-
width: 60px;
42-
height: 1px;
43-
background-color: white;
7+
body,
8+
.sbdocs canvas {
9+
background-color: #121212;
4410
}
4511

46-
.html-story-label {
47-
background-color: white;
48-
color: black;
49-
width: 100px;
50-
height: 20px;
51-
display: flex;
52-
align-items: center;
53-
justify-content: center;
54-
}
12+
.sbdocs canvas {
13+
min-height: 20rem;
14+
}

.storybook/main.ts

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
module.exports = {
2-
stories: ['./stories/**/*.stories.mdx', './stories/**/*.stories.@(js|jsx|ts|tsx)'],
3-
addons: [
4-
'@storybook/addon-links',
5-
{
6-
name: '@storybook/addon-essentials',
7-
options: {
8-
docs: false,
9-
},
10-
},
11-
'@storybook/addon-interactions',
12-
{
13-
name: '@storybook/addon-storysource',
14-
options: {
15-
loaderOptions: {
16-
injectStoryParameters: false,
17-
},
18-
},
19-
},
20-
],
21-
framework: '@storybook/react',
1+
import type { StorybookConfig } from '@storybook/react-vite'
2+
3+
const config: StorybookConfig = {
4+
staticDirs: ['./public'],
5+
stories: ['./stories/**/*.stories.{ts,tsx}'],
6+
addons: ['@storybook/addon-essentials', '@storybook/addon-knobs'],
7+
framework: {
8+
name: '@storybook/react-vite',
9+
options: {},
10+
},
11+
docs: {
12+
autodocs: false,
13+
},
2214
}
15+
16+
export default config

.storybook/manager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import { addons } from '@storybook/addons'
22

33
addons.setConfig({
44
panelPosition: 'right',
5-
selectedPanel: 'storybook/source-loader/panel',
65
showPanel: true,
76
})

.storybook/preview.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

.storybook/preview.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react'
2+
import type { Preview } from '@storybook/react'
3+
4+
import './index.css'
5+
6+
const preview: Preview = {
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
decorators: [
11+
(Story) => (
12+
<React.Suspense fallback={null}>
13+
<Story />
14+
</React.Suspense>
15+
),
16+
],
17+
}
18+
export default preview

.storybook/public/_.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
+

.storybook/stories/advanced/MultipleMaterials.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88

99
export const MultipleMaterials = () => {
1010
return (
11-
<Setup>
11+
<Setup>
1212
<mesh>
1313
<Geometry useGroups>
1414
<Base>
@@ -23,7 +23,7 @@ export const MultipleMaterials = () => {
2323
<sphereGeometry args={[1, 64, 64]} />
2424
<meshNormalMaterial />
2525
</Addition>
26-
</Geometry>
26+
</Geometry>
2727
</mesh>
2828
</Setup>
2929
)

.yarn/install-state.gz

1.44 MB
Binary file not shown.

0 commit comments

Comments
 (0)