Skip to content

Commit

Permalink
bump(deps): update dependency @react-three/drei to ^9.56.25 (#296)
Browse files Browse the repository at this point in the history
* In-house typing

* Prettier

* Bump
  • Loading branch information
jordankzf authored Feb 23, 2023
1 parent 6518d86 commit aea7fdc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@babel/types": "^7.21.0",
"@react-three/drei": "^9.53.3",
"@react-three/drei": "^9.56.25",
"@react-three/fiber": "^8.11.2",
"@reduxjs/toolkit": "^1.9.3",
"@tailwindcss/line-clamp": "^0.4.2",
Expand Down
53 changes: 31 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/components/home/Jellyfish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useGLTF } from "@react-three/drei";
import { BufferGeometry, Mesh } from "three";
import { Canvas, Euler, useFrame, Vector3 } from "@react-three/fiber";
import useWebGlEnabled from "hooks/useWebGlEnabled";
import { GLTFResult } from "types/gltf";

export default function Jellyfish({
position,
Expand Down Expand Up @@ -39,7 +40,7 @@ export default function Jellyfish({
}

export function Model(props) {
const { nodes, materials } = useGLTF("/models/jellyfish.gltf");
const { nodes, materials } = useGLTF("/models/jellyfish.gltf") as GLTFResult;
return (
<group {...props} dispose={null}>
<group rotation={[-Math.PI / 2, 0, 0]}>
Expand Down
5 changes: 4 additions & 1 deletion src/components/home/UnderwaterDrone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useGLTF } from "@react-three/drei";
import { BufferGeometry, Mesh } from "three";
import { Canvas, Euler, useFrame, Vector3 } from "@react-three/fiber";
import useWebGlEnabled from "hooks/useWebGlEnabled";
import { GLTFResult } from "types/gltf";

export default function UnderwaterDrone({
position,
Expand Down Expand Up @@ -39,7 +40,9 @@ export default function UnderwaterDrone({

export function Model(props) {
const group = useRef();
const { nodes, materials } = useGLTF("/models/UnderwaterDrone.gltf");
const { nodes, materials } = useGLTF(
"/models/UnderwaterDrone.gltf"
) as GLTFResult;
return (
<group ref={group} {...props} dispose={null}>
<group name="Sketchfab_Scene">
Expand Down
7 changes: 7 additions & 0 deletions src/types/gltf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Material, Object3D } from "three";
import { GLTF } from "three/examples/jsm/loaders/GLTFLoader";

export type GLTFResult = GLTF & {
nodes: { [name: string]: Object3D<Event> };
materials: { [name: string]: Material };
};

0 comments on commit aea7fdc

Please sign in to comment.