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.
Binary file
Binary file
Binary file
@@ -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 };
@@ -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 };