@pmndrs/viverse 0.2.5 → 0.2.6
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/dist/action/definitions.d.ts +11 -0
- package/dist/action/definitions.js +18 -0
- package/dist/action/index.d.ts +1 -11
- package/dist/action/index.js +1 -18
- package/dist/action/keyboard.d.ts +1 -1
- package/dist/action/keyboard.js +2 -1
- package/dist/action/pointer-capture.js +1 -1
- package/dist/action/pointer-lock.js +1 -1
- package/dist/action/pointer.d.ts +1 -1
- package/dist/action/pointer.js +1 -1
- package/dist/action/screen-joystick.js +1 -1
- package/dist/action/screen-jump-button.js +1 -1
- package/dist/simple-character/apply-input-options.d.ts +1 -1
- package/dist/simple-character/index.d.ts +5 -98
- package/dist/simple-character/index.js +2 -1
- package/dist/simple-character/state/jump-down.d.ts +1 -1
- package/dist/simple-character/state/jump-forward.d.ts +1 -1
- package/dist/simple-character/state/jump-loop.d.ts +1 -1
- package/dist/simple-character/state/jump-start.d.ts +1 -1
- package/dist/simple-character/state/jump-up.d.ts +1 -1
- package/dist/simple-character/state/movement.d.ts +1 -1
- package/dist/simple-character/types.d.ts +99 -0
- package/dist/simple-character/types.js +1 -0
- package/dist/simple-character/update-input-velocity.d.ts +1 -1
- package/dist/simple-character/update-rotation.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventAction, StateAction } from './action.js';
|
|
2
|
+
export declare function BooleanOr(...values: Array<boolean>): boolean;
|
|
3
|
+
export declare const MoveForwardAction: StateAction<number>;
|
|
4
|
+
export declare const MoveBackwardAction: StateAction<number>;
|
|
5
|
+
export declare const MoveLeftAction: StateAction<number>;
|
|
6
|
+
export declare const MoveRightAction: StateAction<number>;
|
|
7
|
+
export declare const RunAction: StateAction<boolean>;
|
|
8
|
+
export declare const JumpAction: EventAction<unknown>;
|
|
9
|
+
export declare const ZoomAction: EventAction<number>;
|
|
10
|
+
export declare const RotateYawAction: EventAction<number>;
|
|
11
|
+
export declare const RotatePitchAction: EventAction<number>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventAction, StateAction } from './action.js';
|
|
2
|
+
export function BooleanOr(...values) {
|
|
3
|
+
let value = false;
|
|
4
|
+
for (let i = 0; i < values.length; i++) {
|
|
5
|
+
value ||= values[i];
|
|
6
|
+
}
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
const sum = (...values) => values.reduce((a, b) => a + b, 0);
|
|
10
|
+
export const MoveForwardAction = new StateAction(Math.max, 0);
|
|
11
|
+
export const MoveBackwardAction = new StateAction(Math.max, 0);
|
|
12
|
+
export const MoveLeftAction = new StateAction(Math.max, 0);
|
|
13
|
+
export const MoveRightAction = new StateAction(Math.max, 0);
|
|
14
|
+
export const RunAction = new StateAction(BooleanOr, false);
|
|
15
|
+
export const JumpAction = new EventAction();
|
|
16
|
+
export const ZoomAction = new EventAction(sum, 0);
|
|
17
|
+
export const RotateYawAction = new EventAction(sum, 0);
|
|
18
|
+
export const RotatePitchAction = new EventAction(sum, 0);
|
package/dist/action/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import { EventAction, StateAction } from './action.js';
|
|
2
|
-
export declare function BooleanOr(...values: Array<boolean>): boolean;
|
|
3
|
-
export declare const MoveForwardAction: StateAction<number>;
|
|
4
|
-
export declare const MoveBackwardAction: StateAction<number>;
|
|
5
|
-
export declare const MoveLeftAction: StateAction<number>;
|
|
6
|
-
export declare const MoveRightAction: StateAction<number>;
|
|
7
|
-
export declare const RunAction: StateAction<boolean>;
|
|
8
|
-
export declare const JumpAction: EventAction<unknown>;
|
|
9
|
-
export declare const ZoomAction: EventAction<number>;
|
|
10
|
-
export declare const RotateYawAction: EventAction<number>;
|
|
11
|
-
export declare const RotatePitchAction: EventAction<number>;
|
|
12
1
|
export * from './pointer-lock.js';
|
|
13
2
|
export * from './pointer-capture.js';
|
|
14
3
|
export * from './pointer.js';
|
|
@@ -16,3 +5,4 @@ export * from './keyboard.js';
|
|
|
16
5
|
export * from './screen-joystick.js';
|
|
17
6
|
export * from './screen-jump-button.js';
|
|
18
7
|
export * from './action.js';
|
|
8
|
+
export * from './definitions.js';
|
package/dist/action/index.js
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
import { EventAction, StateAction } from './action.js';
|
|
2
|
-
export function BooleanOr(...values) {
|
|
3
|
-
let value = false;
|
|
4
|
-
for (let i = 0; i < values.length; i++) {
|
|
5
|
-
value ||= values[i];
|
|
6
|
-
}
|
|
7
|
-
return value;
|
|
8
|
-
}
|
|
9
|
-
const sum = (...values) => values.reduce((a, b) => a + b, 0);
|
|
10
|
-
export const MoveForwardAction = new StateAction(Math.max, 0);
|
|
11
|
-
export const MoveBackwardAction = new StateAction(Math.max, 0);
|
|
12
|
-
export const MoveLeftAction = new StateAction(Math.max, 0);
|
|
13
|
-
export const MoveRightAction = new StateAction(Math.max, 0);
|
|
14
|
-
export const RunAction = new StateAction(BooleanOr, false);
|
|
15
|
-
export const JumpAction = new EventAction();
|
|
16
|
-
export const ZoomAction = new EventAction(sum, 0);
|
|
17
|
-
export const RotateYawAction = new EventAction(sum, 0);
|
|
18
|
-
export const RotatePitchAction = new EventAction(sum, 0);
|
|
19
1
|
export * from './pointer-lock.js';
|
|
20
2
|
export * from './pointer-capture.js';
|
|
21
3
|
export * from './pointer.js';
|
|
@@ -23,3 +5,4 @@ export * from './keyboard.js';
|
|
|
23
5
|
export * from './screen-joystick.js';
|
|
24
6
|
export * from './screen-jump-button.js';
|
|
25
7
|
export * from './action.js';
|
|
8
|
+
export * from './definitions.js';
|
package/dist/action/keyboard.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateAction } from './action.js';
|
|
2
|
+
import { JumpAction, MoveBackwardAction, MoveForwardAction, MoveLeftAction, MoveRightAction, RunAction, } from './definitions.js';
|
|
2
3
|
export class KeyboardActionBinding {
|
|
3
4
|
pressedKeys = new Set();
|
|
4
5
|
writer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RotatePitchAction, RotateYawAction, ZoomAction } from './
|
|
1
|
+
import { RotatePitchAction, RotateYawAction, ZoomAction } from './definitions.js';
|
|
2
2
|
export class PointerLockRotateZoomActionBindings {
|
|
3
3
|
rotationSpeed; // default 0.4
|
|
4
4
|
zoomSpeed; // default 0.0001
|
package/dist/action/pointer.d.ts
CHANGED
package/dist/action/pointer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MoveForwardAction, MoveBackwardAction, MoveLeftAction, MoveRightAction, RunAction
|
|
1
|
+
import { MoveForwardAction, MoveBackwardAction, MoveLeftAction, MoveRightAction, RunAction } from './definitions.js';
|
|
2
2
|
const DefaultDeadZonePx = 24;
|
|
3
3
|
const DefaultRunDistancePx = 46;
|
|
4
4
|
const JoystickRadius = 56;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SimpleCharacterActionBindingOptions } from './
|
|
1
|
+
import { SimpleCharacterActionBindingOptions } from './types.js';
|
|
2
2
|
export declare function applySimpleCharacterActionBindingOptions(actionBindingsList: Array<unknown>, options?: SimpleCharacterActionBindingOptions): void;
|
|
@@ -1,102 +1,8 @@
|
|
|
1
1
|
import { Group, Object3D, Object3DEventMap, AnimationAction } from 'three';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export type SimpleCharacterState = {
|
|
7
|
-
camera: Object3D;
|
|
8
|
-
model?: CharacterModel;
|
|
9
|
-
physics: BvhCharacterPhysics;
|
|
10
|
-
lastJump: number;
|
|
11
|
-
};
|
|
12
|
-
export type SimpleCharacterMovementOptions = {
|
|
13
|
-
/**
|
|
14
|
-
* @default true
|
|
15
|
-
*/
|
|
16
|
-
jump?: {
|
|
17
|
-
/**
|
|
18
|
-
* @default 0.2
|
|
19
|
-
*/
|
|
20
|
-
delay?: number;
|
|
21
|
-
/**
|
|
22
|
-
* @default 0.1
|
|
23
|
-
*/
|
|
24
|
-
bufferTime?: number;
|
|
25
|
-
/**
|
|
26
|
-
* @default 8
|
|
27
|
-
*/
|
|
28
|
-
speed?: number;
|
|
29
|
-
} | boolean;
|
|
30
|
-
/**
|
|
31
|
-
* @default true
|
|
32
|
-
*/
|
|
33
|
-
walk?: {
|
|
34
|
-
speed?: number;
|
|
35
|
-
} | boolean;
|
|
36
|
-
/**
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
run?: {
|
|
40
|
-
speed?: number;
|
|
41
|
-
} | boolean;
|
|
42
|
-
};
|
|
43
|
-
export type SimpleCharacterAnimationOptions = {
|
|
44
|
-
readonly walk?: CharacterAnimationOptions;
|
|
45
|
-
readonly run?: CharacterAnimationOptions;
|
|
46
|
-
readonly idle?: CharacterAnimationOptions;
|
|
47
|
-
readonly jumpUp?: CharacterAnimationOptions;
|
|
48
|
-
readonly jumpLoop?: CharacterAnimationOptions;
|
|
49
|
-
readonly jumpDown?: CharacterAnimationOptions;
|
|
50
|
-
readonly jumpForward?: CharacterAnimationOptions;
|
|
51
|
-
/**
|
|
52
|
-
* @default "movement"
|
|
53
|
-
*/
|
|
54
|
-
yawRotationBasedOn?: 'camera' | 'movement';
|
|
55
|
-
/**
|
|
56
|
-
* @default 10
|
|
57
|
-
*/
|
|
58
|
-
maxYawRotationSpeed?: number;
|
|
59
|
-
/**
|
|
60
|
-
* @default 0.1
|
|
61
|
-
*/
|
|
62
|
-
crossFadeDuration?: number;
|
|
63
|
-
};
|
|
64
|
-
export type SimpleCharacterActionBindingOptions = {
|
|
65
|
-
screenJoystickRunDistancePx?: number;
|
|
66
|
-
screenJoystickDeadZonePx?: number;
|
|
67
|
-
pointerCaptureRotationSpeed?: number;
|
|
68
|
-
pointerCaptureZoomSpeed?: number;
|
|
69
|
-
pointerLockRotationSpeed?: number;
|
|
70
|
-
pointerLockZoomSpeed?: number;
|
|
71
|
-
keyboardRequiresPointerLock?: boolean;
|
|
72
|
-
keyboardMoveForwardKeys?: Array<string>;
|
|
73
|
-
keyboardMoveBackwardKeys?: Array<string>;
|
|
74
|
-
keyboardMoveLeftKeys?: Array<string>;
|
|
75
|
-
keyboardMoveRightKeys?: Array<string>;
|
|
76
|
-
keyboardRunKeys?: Array<string>;
|
|
77
|
-
keyboardJumpKeys?: Array<string>;
|
|
78
|
-
};
|
|
79
|
-
export type SimpleCharacterOptions = {
|
|
80
|
-
/**
|
|
81
|
-
* @deprecated use actionBindings instead
|
|
82
|
-
*/
|
|
83
|
-
readonly input?: ReadonlyArray<{
|
|
84
|
-
new (domElement: HTMLElement, abortSignal: AbortSignal): any;
|
|
85
|
-
}>;
|
|
86
|
-
readonly actionBindings?: ReadonlyArray<{
|
|
87
|
-
new (domElement: HTMLElement, abortSignal: AbortSignal): any;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated use actionBindingOptions instead
|
|
91
|
-
*/
|
|
92
|
-
inputOptions?: SimpleCharacterActionBindingOptions;
|
|
93
|
-
actionBindingOptions?: SimpleCharacterActionBindingOptions;
|
|
94
|
-
movement?: SimpleCharacterMovementOptions;
|
|
95
|
-
readonly model?: CharacterModelOptions | boolean;
|
|
96
|
-
physics?: BvhCharacterPhysicsOptions;
|
|
97
|
-
cameraBehavior?: CharacterCameraBehaviorOptions;
|
|
98
|
-
readonly animation?: SimpleCharacterAnimationOptions;
|
|
99
|
-
};
|
|
2
|
+
import { CharacterCameraBehavior } from '../camera.js';
|
|
3
|
+
import { CharacterModel } from '../model/index.js';
|
|
4
|
+
import { BvhCharacterPhysics, BvhPhysicsWorld } from '../physics/index.js';
|
|
5
|
+
import { SimpleCharacterOptions, SimpleCharacterState } from './types.js';
|
|
100
6
|
export declare class SimpleCharacter extends Group<Object3DEventMap & {
|
|
101
7
|
loaded: {};
|
|
102
8
|
}> implements SimpleCharacterState {
|
|
@@ -122,3 +28,4 @@ export declare class SimpleCharacter extends Group<Object3DEventMap & {
|
|
|
122
28
|
export * from './update-input-velocity.js';
|
|
123
29
|
export * from './update-rotation.js';
|
|
124
30
|
export * from './apply-input-options.js';
|
|
31
|
+
export * from './types.js';
|
|
@@ -4,7 +4,7 @@ import { Group, Vector3 } from 'three';
|
|
|
4
4
|
import { applySimpleCharacterActionBindingOptions } from './apply-input-options.js';
|
|
5
5
|
import { KeyboardLocomotionActionBindings, PointerCaptureRotateZoomActionBindings, ScreenJoystickLocomotionActionBindings, ScreenButtonJumpActionBindings, } from '../action/index.js';
|
|
6
6
|
import { CharacterCameraBehavior } from '../camera.js';
|
|
7
|
-
import { loadCharacterModel, flattenCharacterModelOptions
|
|
7
|
+
import { loadCharacterModel, flattenCharacterModelOptions } from '../model/index.js';
|
|
8
8
|
import { BvhCharacterPhysics } from '../physics/index.js';
|
|
9
9
|
import { shouldJump } from '../utils.js';
|
|
10
10
|
import { loadSimpleCharacterJumpDownState } from './state/jump-down.js';
|
|
@@ -106,3 +106,4 @@ export class SimpleCharacter extends Group {
|
|
|
106
106
|
export * from './update-input-velocity.js';
|
|
107
107
|
export * from './update-rotation.js';
|
|
108
108
|
export * from './apply-input-options.js';
|
|
109
|
+
export * from './types.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type GraphTimelineState } from '@pmndrs/timeline';
|
|
2
|
-
import type { SimpleCharacterState, SimpleCharacterOptions } from '../
|
|
2
|
+
import type { SimpleCharacterState, SimpleCharacterOptions } from '../types.js';
|
|
3
3
|
export declare function loadSimpleCharacterJumpDownState<T>(state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type GraphTimelineState } from '@pmndrs/timeline';
|
|
2
2
|
import { AnimationAction } from 'three';
|
|
3
|
-
import { SimpleCharacterState, SimpleCharacterOptions } from '../
|
|
3
|
+
import { SimpleCharacterState, SimpleCharacterOptions } from '../types.js';
|
|
4
4
|
export declare function loadSimpleCharacterJumpForwardAction(state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<AnimationAction>;
|
|
5
5
|
export declare function loadSimpleCharacterJumpForwardState<T>(jumpForward: AnimationAction, state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type GraphTimelineState } from '@pmndrs/timeline';
|
|
2
|
-
import type { SimpleCharacterOptions, SimpleCharacterState } from '../
|
|
2
|
+
import type { SimpleCharacterOptions, SimpleCharacterState } from '../types.js';
|
|
3
3
|
export declare function loadSimpleCharacterJumpLoopState<T>(state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GraphTimelineState } from '@pmndrs/timeline';
|
|
2
2
|
import { AnimationAction } from 'three';
|
|
3
|
-
import type { SimpleCharacterOptions, SimpleCharacterState } from '../
|
|
3
|
+
import type { SimpleCharacterOptions, SimpleCharacterState } from '../types.js';
|
|
4
4
|
export declare function loadSimpleCharacterJumpStartState<T>(jumpUp: AnimationAction, jumpForward: AnimationAction, state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphTimelineState } from '@pmndrs/timeline';
|
|
2
2
|
import { AnimationAction } from 'three';
|
|
3
|
-
import { SimpleCharacterState, SimpleCharacterOptions } from '../
|
|
3
|
+
import { SimpleCharacterState, SimpleCharacterOptions } from '../types.js';
|
|
4
4
|
export declare function loadSimpleCharacterJumpUpAction(state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<AnimationAction>;
|
|
5
5
|
export declare function loadSimpleCharacterJumpUpState<T>(jumpUp: AnimationAction, state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type GraphTimelineState } from '@pmndrs/timeline';
|
|
2
|
-
import type { SimpleCharacterOptions, SimpleCharacterState } from '../
|
|
2
|
+
import type { SimpleCharacterOptions, SimpleCharacterState } from '../types.js';
|
|
3
3
|
export declare function loadSimpleCharacterMovingState<T>(state: SimpleCharacterState, options: SimpleCharacterOptions): Promise<GraphTimelineState<T>>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Object3D } from 'three';
|
|
2
|
+
import { CharacterAnimationOptions } from '../animation/index.js';
|
|
3
|
+
import { CharacterCameraBehaviorOptions } from '../camera.js';
|
|
4
|
+
import { CharacterModel, CharacterModelOptions } from '../model/index.js';
|
|
5
|
+
import { BvhCharacterPhysics, BvhCharacterPhysicsOptions } from '../physics/index.js';
|
|
6
|
+
export type SimpleCharacterState = {
|
|
7
|
+
camera: Object3D;
|
|
8
|
+
model?: CharacterModel;
|
|
9
|
+
physics: BvhCharacterPhysics;
|
|
10
|
+
lastJump: number;
|
|
11
|
+
};
|
|
12
|
+
export type SimpleCharacterMovementOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
jump?: {
|
|
17
|
+
/**
|
|
18
|
+
* @default 0.2
|
|
19
|
+
*/
|
|
20
|
+
delay?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @default 0.1
|
|
23
|
+
*/
|
|
24
|
+
bufferTime?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @default 8
|
|
27
|
+
*/
|
|
28
|
+
speed?: number;
|
|
29
|
+
} | boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
walk?: {
|
|
34
|
+
speed?: number;
|
|
35
|
+
} | boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
run?: {
|
|
40
|
+
speed?: number;
|
|
41
|
+
} | boolean;
|
|
42
|
+
};
|
|
43
|
+
export type SimpleCharacterAnimationOptions = {
|
|
44
|
+
readonly walk?: CharacterAnimationOptions;
|
|
45
|
+
readonly run?: CharacterAnimationOptions;
|
|
46
|
+
readonly idle?: CharacterAnimationOptions;
|
|
47
|
+
readonly jumpUp?: CharacterAnimationOptions;
|
|
48
|
+
readonly jumpLoop?: CharacterAnimationOptions;
|
|
49
|
+
readonly jumpDown?: CharacterAnimationOptions;
|
|
50
|
+
readonly jumpForward?: CharacterAnimationOptions;
|
|
51
|
+
/**
|
|
52
|
+
* @default "movement"
|
|
53
|
+
*/
|
|
54
|
+
yawRotationBasedOn?: 'camera' | 'movement';
|
|
55
|
+
/**
|
|
56
|
+
* @default 10
|
|
57
|
+
*/
|
|
58
|
+
maxYawRotationSpeed?: number;
|
|
59
|
+
/**
|
|
60
|
+
* @default 0.1
|
|
61
|
+
*/
|
|
62
|
+
crossFadeDuration?: number;
|
|
63
|
+
};
|
|
64
|
+
export type SimpleCharacterActionBindingOptions = {
|
|
65
|
+
screenJoystickRunDistancePx?: number;
|
|
66
|
+
screenJoystickDeadZonePx?: number;
|
|
67
|
+
pointerCaptureRotationSpeed?: number;
|
|
68
|
+
pointerCaptureZoomSpeed?: number;
|
|
69
|
+
pointerLockRotationSpeed?: number;
|
|
70
|
+
pointerLockZoomSpeed?: number;
|
|
71
|
+
keyboardRequiresPointerLock?: boolean;
|
|
72
|
+
keyboardMoveForwardKeys?: Array<string>;
|
|
73
|
+
keyboardMoveBackwardKeys?: Array<string>;
|
|
74
|
+
keyboardMoveLeftKeys?: Array<string>;
|
|
75
|
+
keyboardMoveRightKeys?: Array<string>;
|
|
76
|
+
keyboardRunKeys?: Array<string>;
|
|
77
|
+
keyboardJumpKeys?: Array<string>;
|
|
78
|
+
};
|
|
79
|
+
export type SimpleCharacterOptions = {
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated use actionBindings instead
|
|
82
|
+
*/
|
|
83
|
+
readonly input?: ReadonlyArray<{
|
|
84
|
+
new (domElement: HTMLElement, abortSignal: AbortSignal): any;
|
|
85
|
+
}>;
|
|
86
|
+
readonly actionBindings?: ReadonlyArray<{
|
|
87
|
+
new (domElement: HTMLElement, abortSignal: AbortSignal): any;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated use actionBindingOptions instead
|
|
91
|
+
*/
|
|
92
|
+
inputOptions?: SimpleCharacterActionBindingOptions;
|
|
93
|
+
actionBindingOptions?: SimpleCharacterActionBindingOptions;
|
|
94
|
+
movement?: SimpleCharacterMovementOptions;
|
|
95
|
+
readonly model?: CharacterModelOptions | boolean;
|
|
96
|
+
physics?: BvhCharacterPhysicsOptions;
|
|
97
|
+
cameraBehavior?: CharacterCameraBehaviorOptions;
|
|
98
|
+
readonly animation?: SimpleCharacterAnimationOptions;
|
|
99
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import type { SimpleCharacterMovementOptions } from './
|
|
2
|
+
import type { SimpleCharacterMovementOptions } from './types.js';
|
|
3
3
|
import type { BvhCharacterPhysics } from '../physics/index.js';
|
|
4
4
|
export declare function updateSimpleCharacterVelocity(camera: Object3D, physics: BvhCharacterPhysics, options?: SimpleCharacterMovementOptions): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
2
|
import { BvhCharacterPhysics } from '../physics/index.js';
|
|
3
|
-
import type { SimpleCharacterAnimationOptions } from './
|
|
3
|
+
import type { SimpleCharacterAnimationOptions } from './types.js';
|
|
4
4
|
export declare function updateSimpleCharacterRotation(delta: number, physics: BvhCharacterPhysics, camera: Object3D, model: {
|
|
5
5
|
scene: Object3D;
|
|
6
6
|
}, options?: SimpleCharacterAnimationOptions): true | undefined;
|