Skip to content

Commit 8dcc8f8

Browse files
fix: remove unused items
1 parent a0a3b22 commit 8dcc8f8

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ecctrl",
3-
"version": "1.0.40",
3+
"version": "1.0.41",
44
"author": "Erdong Chen",
55
"license": "MIT",
66
"description": "A floating rigibody character controller for R3F",

src/Ecctrl.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ const Ecctrl = forwardRef<RapierRigidBody, EcctrlProps>(({
101101
const jumpIdleAnimation = !animated
102102
? null
103103
: useGame((state) => state.jumpIdle);
104-
const jumpLandAnimation = !animated
105-
? null
106-
: useGame((state) => state.jumpLand);
107104
const fallAnimation = !animated ? null : useGame((state) => state.fall);
108105
const action1Animation = !animated ? null : useGame((state) => state.action1);
109106
const action2Animation = !animated ? null : useGame((state) => state.action2);
@@ -404,7 +401,7 @@ const Ecctrl = forwardRef<RapierRigidBody, EcctrlProps>(({
404401
/**
405402
* Load camera pivot and character move preset
406403
*/
407-
const { pivot, followCam, cameraCollisionDetect } =
404+
const { pivot, cameraCollisionDetect } =
408405
useFollowCam(cameraSetups);
409406
const pivotPosition = useMemo(() => new THREE.Vector3(), []);
410407
const modelEuler = useMemo(() => new THREE.Euler(), []);

src/EcctrlAnimation.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ import { useGLTF, useAnimations } from "@react-three/drei";
22
import { useEffect, useRef, Suspense } from "react";
33
import * as THREE from "three";
44
import { useGame, type AnimationSet } from "./stores/useGame";
5-
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader";
65

76
export function EcctrlAnimation(props: EcctrlAnimationProps) {
87
// Change the character src to yours
98
const group = useRef();
10-
const { animations } = useGLTF(props.characterURL) as GLTF;
9+
const { animations } = useGLTF(props.characterURL);
1110
const { actions } = useAnimations(animations, group);
1211

1312
/**

0 commit comments

Comments
 (0)