diff --git a/app/blob/page.jsx b/app/blob/page.jsx
index 1bd11a4e..37fe8f93 100644
--- a/app/blob/page.jsx
+++ b/app/blob/page.jsx
@@ -1,24 +1,10 @@
'use client'
import dynamic from 'next/dynamic'
-
+import { View } from '@react-three/drei'
const Blob = dynamic(() => import('@/components/canvas/Examples').then((mod) => mod.Blob), { ssr: false })
-const View = dynamic(() => import('@/components/canvas/View').then((mod) => mod.View), {
- ssr: false,
- loading: () => (
-
- ),
-})
-const Common = dynamic(() => import('@/components/canvas/View').then((mod) => mod.Common), { ssr: false })
+
+const Common = dynamic(() => import('@/components/canvas/Common').then((mod) => mod.Common), { ssr: false })
export default function Page() {
return (
diff --git a/app/page.jsx b/app/page.jsx
index a26a93b7..a7544222 100644
--- a/app/page.jsx
+++ b/app/page.jsx
@@ -2,26 +2,12 @@
import dynamic from 'next/dynamic'
import { Suspense } from 'react'
+import { View } from '@react-three/drei'
const Logo = dynamic(() => import('@/components/canvas/Examples').then((mod) => mod.Logo), { ssr: false })
const Dog = dynamic(() => import('@/components/canvas/Examples').then((mod) => mod.Dog), { ssr: false })
const Duck = dynamic(() => import('@/components/canvas/Examples').then((mod) => mod.Duck), { ssr: false })
-const View = dynamic(() => import('@/components/canvas/View').then((mod) => mod.View), {
- ssr: false,
- loading: () => (
-
- ),
-})
-const Common = dynamic(() => import('@/components/canvas/View').then((mod) => mod.Common), { ssr: false })
+const Common = dynamic(() => import('@/components/canvas/Common').then((mod) => mod.Common), { ssr: false })
export default function Page() {
return (
@@ -51,19 +37,19 @@ export default function Page() {
Drag, scroll, pinch, and rotate the canvas to explore the 3D scene.
-
+
-
+
{/* second row */}
-
+
-
+
diff --git a/package.json b/package.json
index 6907035d..1ef3de76 100644
--- a/package.json
+++ b/package.json
@@ -18,15 +18,14 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "^10.0.0",
- "@react-three/drei": "^9.92.7",
- "@react-three/fiber": "^8.15.12",
+ "@react-three/drei": "^9.120.6",
+ "@react-three/fiber": "^8.17.10",
"glsl-random": "^0.0.5",
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "three": "^0.160.0",
- "three-stdlib": "^2.28.9",
- "tunnel-rat": "^0.1.2"
+ "three": "^0.172.0",
+ "three-stdlib": "^2.28.9"
},
"devDependencies": {
"@next/bundle-analyzer": "^14.0.4",
diff --git a/src/components/canvas/Common.jsx b/src/components/canvas/Common.jsx
new file mode 100644
index 00000000..4583b2fc
--- /dev/null
+++ b/src/components/canvas/Common.jsx
@@ -0,0 +1,15 @@
+'use client'
+
+import { Suspense } from 'react'
+import { PerspectiveCamera, OrbitControls } from '@react-three/drei'
+
+export const Common = ({ color, orbit }) => (
+
+ {color && }
+ {orbit && }
+
+
+
+
+
+)
diff --git a/src/components/canvas/Scene.jsx b/src/components/canvas/Scene.jsx
index 6b41e692..83dd073c 100644
--- a/src/components/canvas/Scene.jsx
+++ b/src/components/canvas/Scene.jsx
@@ -1,18 +1,14 @@
'use client'
import { Canvas } from '@react-three/fiber'
-import { Preload } from '@react-three/drei'
-import { r3f } from '@/helpers/global'
+import { Preload, View } from '@react-three/drei'
import * as THREE from 'three'
export default function Scene({ ...props }) {
// Everything defined in here will persist between route changes, only children are swapped
return (
-