Unverified Commit d0f1e33d authored by taisei mima's avatar taisei mima Committed by GitHub

Fix with-three-js example (#20897)

parent d9f1cf00
......@@ -25,14 +25,14 @@ const Bird = ({ speed, factor, url, ...props }) => {
<scene name="Scene" {...props}>
<mesh
name="Object_0"
morphTargetDictionary={gltf.__$[1].morphTargetDictionary}
morphTargetInfluences={gltf.__$[1].morphTargetInfluences}
morphTargetDictionary={gltf.nodes.Object_0.morphTargetDictionary}
morphTargetInfluences={gltf.nodes.Object_0.morphTargetInfluences}
rotation={[1.5707964611537577, 0, 0]}
>
<bufferGeometry attach="geometry" {...gltf.__$[1].geometry} />
<bufferGeometry attach="geometry" {...gltf.nodes.Object_0.geometry} />
<meshStandardMaterial
attach="material"
{...gltf.__$[1].material}
{...gltf.nodes.Object_0.material}
name="Material_0_COLOR_0"
/>
</mesh>
......
const withTM = require('next-transpile-modules')([
'drei',
'three',
'postprocessing',
])
const withTM = require('next-transpile-modules')(['drei', 'three'])
module.exports = withTM()
......@@ -8,15 +8,15 @@
"start": "next start"
},
"dependencies": {
"drei": "0.0.60",
"next": "9.4.4",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-three-fiber": "4.2.12",
"three": "0.118.3"
"drei": "2.2.13",
"next": "10.0.5",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-three-fiber": "5.3.11",
"three": "0.124.0"
},
"devDependencies": {
"next-transpile-modules": "4.0.2"
"next-transpile-modules": "6.0.0"
},
"license": "MIT"
}
import dynamic from 'next/dynamic'
import { Suspense } from 'react'
import { Canvas } from 'react-three-fiber'
import { OrbitControls, StandardEffects } from 'drei'
import { OrbitControls } from 'drei'
const Bird = dynamic(() => import('../components/Bird'), { ssr: false })
......@@ -41,7 +41,6 @@ const BirdsPage = (props) => {
<OrbitControls />
<Suspense fallback={null}>
<Birds />
<StandardEffects smaa />
</Suspense>
</Canvas>
</>
......
import { useRef, useState, Suspense } from 'react'
import { useRef, useState } from 'react'
import { Canvas, useFrame } from 'react-three-fiber'
import { OrbitControls, StandardEffects, Box } from 'drei'
import { OrbitControls, Box } from 'drei'
const MyBox = (props) => {
const mesh = useRef()
......@@ -39,9 +39,6 @@ const BoxesPage = () => {
<MyBox position={[0, 10, 0]} />
<MyBox position={[0, -10, 0]} />
<OrbitControls />
<Suspense fallback={null}>
<StandardEffects smaa />
</Suspense>
</Canvas>,
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment