three-player-controller 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/drone.glb +0 -0
- package/assets/person.glb +0 -0
- package/assets/remoteControl.glb +0 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +894 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +856 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +44 -0
package/assets/drone.glb
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
3
|
+
|
|
4
|
+
declare function usePlayer(): {
|
|
5
|
+
init: (opts: {
|
|
6
|
+
scene: THREE.Scene;
|
|
7
|
+
camera: THREE.PerspectiveCamera;
|
|
8
|
+
controls: OrbitControls;
|
|
9
|
+
playerModel: {
|
|
10
|
+
url: string;
|
|
11
|
+
idleAnim: string;
|
|
12
|
+
walkAnim: string;
|
|
13
|
+
runAnim: string;
|
|
14
|
+
jumpAnim: string;
|
|
15
|
+
leftWalkAnim?: string;
|
|
16
|
+
rightWalkAnim?: string;
|
|
17
|
+
backwardAnim?: string;
|
|
18
|
+
scale?: number;
|
|
19
|
+
};
|
|
20
|
+
initPos?: THREE.Vector3;
|
|
21
|
+
scale?: number;
|
|
22
|
+
}, callback?: () => void) => Promise<void>;
|
|
23
|
+
changeView: () => void;
|
|
24
|
+
createBVH: (url?: string) => Promise<void>;
|
|
25
|
+
createPlayer: () => void;
|
|
26
|
+
reset: (pos?: THREE.Vector3) => void;
|
|
27
|
+
updatePlayer: (dt: number) => Promise<void>;
|
|
28
|
+
destroy: () => void;
|
|
29
|
+
};
|
|
30
|
+
declare function onAllEvent(): void;
|
|
31
|
+
declare function offAllEvent(): void;
|
|
32
|
+
|
|
33
|
+
export { offAllEvent, onAllEvent, usePlayer };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
3
|
+
|
|
4
|
+
declare function usePlayer(): {
|
|
5
|
+
init: (opts: {
|
|
6
|
+
scene: THREE.Scene;
|
|
7
|
+
camera: THREE.PerspectiveCamera;
|
|
8
|
+
controls: OrbitControls;
|
|
9
|
+
playerModel: {
|
|
10
|
+
url: string;
|
|
11
|
+
idleAnim: string;
|
|
12
|
+
walkAnim: string;
|
|
13
|
+
runAnim: string;
|
|
14
|
+
jumpAnim: string;
|
|
15
|
+
leftWalkAnim?: string;
|
|
16
|
+
rightWalkAnim?: string;
|
|
17
|
+
backwardAnim?: string;
|
|
18
|
+
scale?: number;
|
|
19
|
+
};
|
|
20
|
+
initPos?: THREE.Vector3;
|
|
21
|
+
scale?: number;
|
|
22
|
+
}, callback?: () => void) => Promise<void>;
|
|
23
|
+
changeView: () => void;
|
|
24
|
+
createBVH: (url?: string) => Promise<void>;
|
|
25
|
+
createPlayer: () => void;
|
|
26
|
+
reset: (pos?: THREE.Vector3) => void;
|
|
27
|
+
updatePlayer: (dt: number) => Promise<void>;
|
|
28
|
+
destroy: () => void;
|
|
29
|
+
};
|
|
30
|
+
declare function onAllEvent(): void;
|
|
31
|
+
declare function offAllEvent(): void;
|
|
32
|
+
|
|
33
|
+
export { offAllEvent, onAllEvent, usePlayer };
|