@metatell/bot-core 0.0.1
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/CoreServiceFactory.d.ts +25 -0
- package/dist/CoreServiceFactory.d.ts.map +1 -0
- package/dist/CoreServiceFactory.js +102 -0
- package/dist/CoreServiceFactory.js.map +1 -0
- package/dist/ServiceContainer.d.ts +87 -0
- package/dist/ServiceContainer.d.ts.map +1 -0
- package/dist/ServiceContainer.js +119 -0
- package/dist/ServiceContainer.js.map +1 -0
- package/dist/ServiceIdentifier.d.ts +28 -0
- package/dist/ServiceIdentifier.d.ts.map +1 -0
- package/dist/ServiceIdentifier.js +18 -0
- package/dist/ServiceIdentifier.js.map +1 -0
- package/dist/builders/NafMessageBuilder.d.ts +242 -0
- package/dist/builders/NafMessageBuilder.d.ts.map +1 -0
- package/dist/builders/NafMessageBuilder.js +288 -0
- package/dist/builders/NafMessageBuilder.js.map +1 -0
- package/dist/errors/animation-errors.d.ts +41 -0
- package/dist/errors/animation-errors.d.ts.map +1 -0
- package/dist/errors/animation-errors.js +60 -0
- package/dist/errors/animation-errors.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/IAnimationService.d.ts +42 -0
- package/dist/interfaces/IAnimationService.d.ts.map +1 -0
- package/dist/interfaces/IAnimationService.js +5 -0
- package/dist/interfaces/IAnimationService.js.map +1 -0
- package/dist/interfaces/IAppSettings.d.ts +11 -0
- package/dist/interfaces/IAppSettings.d.ts.map +1 -0
- package/dist/interfaces/IAppSettings.js +5 -0
- package/dist/interfaces/IAppSettings.js.map +1 -0
- package/dist/interfaces/IAuthenticationService.d.ts +20 -0
- package/dist/interfaces/IAuthenticationService.d.ts.map +1 -0
- package/dist/interfaces/IAuthenticationService.js +5 -0
- package/dist/interfaces/IAuthenticationService.js.map +1 -0
- package/dist/interfaces/IAvatarController.d.ts +54 -0
- package/dist/interfaces/IAvatarController.d.ts.map +1 -0
- package/dist/interfaces/IAvatarController.js +5 -0
- package/dist/interfaces/IAvatarController.js.map +1 -0
- package/dist/interfaces/IConfigurationProvider.d.ts +39 -0
- package/dist/interfaces/IConfigurationProvider.d.ts.map +1 -0
- package/dist/interfaces/IConfigurationProvider.js +5 -0
- package/dist/interfaces/IConfigurationProvider.js.map +1 -0
- package/dist/interfaces/IConnectionManager.d.ts +23 -0
- package/dist/interfaces/IConnectionManager.d.ts.map +1 -0
- package/dist/interfaces/IConnectionManager.js +5 -0
- package/dist/interfaces/IConnectionManager.js.map +1 -0
- package/dist/interfaces/IEventBus.d.ts +28 -0
- package/dist/interfaces/IEventBus.d.ts.map +1 -0
- package/dist/interfaces/IEventBus.js +31 -0
- package/dist/interfaces/IEventBus.js.map +1 -0
- package/dist/interfaces/IMessageService.d.ts +25 -0
- package/dist/interfaces/IMessageService.d.ts.map +1 -0
- package/dist/interfaces/IMessageService.js +5 -0
- package/dist/interfaces/IMessageService.js.map +1 -0
- package/dist/interfaces/IOrganizationService.d.ts +58 -0
- package/dist/interfaces/IOrganizationService.d.ts.map +1 -0
- package/dist/interfaces/IOrganizationService.js +5 -0
- package/dist/interfaces/IOrganizationService.js.map +1 -0
- package/dist/interfaces/IPresenceManager.d.ts +20 -0
- package/dist/interfaces/IPresenceManager.d.ts.map +1 -0
- package/dist/interfaces/IPresenceManager.js +5 -0
- package/dist/interfaces/IPresenceManager.js.map +1 -0
- package/dist/interfaces/IUserAvatarManager.d.ts +88 -0
- package/dist/interfaces/IUserAvatarManager.d.ts.map +1 -0
- package/dist/interfaces/IUserAvatarManager.js +5 -0
- package/dist/interfaces/IUserAvatarManager.js.map +1 -0
- package/dist/interfaces/IWebSocketConnectionManager.d.ts +14 -0
- package/dist/interfaces/IWebSocketConnectionManager.d.ts.map +1 -0
- package/dist/interfaces/IWebSocketConnectionManager.js +2 -0
- package/dist/interfaces/IWebSocketConnectionManager.js.map +1 -0
- package/dist/logging/LogEventEmitter.d.ts +38 -0
- package/dist/logging/LogEventEmitter.d.ts.map +1 -0
- package/dist/logging/LogEventEmitter.js +54 -0
- package/dist/logging/LogEventEmitter.js.map +1 -0
- package/dist/logging/index.d.ts +22 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +10 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/providers/default.d.ts +22 -0
- package/dist/logging/providers/default.d.ts.map +1 -0
- package/dist/logging/providers/default.js +175 -0
- package/dist/logging/providers/default.js.map +1 -0
- package/dist/logging/spi.d.ts +35 -0
- package/dist/logging/spi.d.ts.map +1 -0
- package/dist/logging/spi.js +25 -0
- package/dist/logging/spi.js.map +1 -0
- package/dist/services/AnimationService.d.ts +38 -0
- package/dist/services/AnimationService.d.ts.map +1 -0
- package/dist/services/AnimationService.js +157 -0
- package/dist/services/AnimationService.js.map +1 -0
- package/dist/services/AppSettings.d.ts +14 -0
- package/dist/services/AppSettings.d.ts.map +1 -0
- package/dist/services/AppSettings.js +48 -0
- package/dist/services/AppSettings.js.map +1 -0
- package/dist/services/AuthenticationService.d.ts +13 -0
- package/dist/services/AuthenticationService.d.ts.map +1 -0
- package/dist/services/AuthenticationService.js +44 -0
- package/dist/services/AuthenticationService.js.map +1 -0
- package/dist/services/AvatarController.d.ts +50 -0
- package/dist/services/AvatarController.d.ts.map +1 -0
- package/dist/services/AvatarController.js +409 -0
- package/dist/services/AvatarController.js.map +1 -0
- package/dist/services/ChannelService.d.ts +19 -0
- package/dist/services/ChannelService.d.ts.map +1 -0
- package/dist/services/ChannelService.js +113 -0
- package/dist/services/ChannelService.js.map +1 -0
- package/dist/services/ConfigurationProvider.d.ts +13 -0
- package/dist/services/ConfigurationProvider.d.ts.map +1 -0
- package/dist/services/ConfigurationProvider.js +49 -0
- package/dist/services/ConfigurationProvider.js.map +1 -0
- package/dist/services/EventBus.d.ts +11 -0
- package/dist/services/EventBus.d.ts.map +1 -0
- package/dist/services/EventBus.js +54 -0
- package/dist/services/EventBus.js.map +1 -0
- package/dist/services/IChannelService.d.ts +57 -0
- package/dist/services/IChannelService.d.ts.map +1 -0
- package/dist/services/IChannelService.js +6 -0
- package/dist/services/IChannelService.js.map +1 -0
- package/dist/services/MessageService.d.ts +23 -0
- package/dist/services/MessageService.d.ts.map +1 -0
- package/dist/services/MessageService.js +141 -0
- package/dist/services/MessageService.js.map +1 -0
- package/dist/services/OrganizationService.d.ts +11 -0
- package/dist/services/OrganizationService.d.ts.map +1 -0
- package/dist/services/OrganizationService.js +121 -0
- package/dist/services/OrganizationService.js.map +1 -0
- package/dist/services/PresenceManager.d.ts +21 -0
- package/dist/services/PresenceManager.d.ts.map +1 -0
- package/dist/services/PresenceManager.js +143 -0
- package/dist/services/PresenceManager.js.map +1 -0
- package/dist/services/UserAvatarManager.d.ts +61 -0
- package/dist/services/UserAvatarManager.d.ts.map +1 -0
- package/dist/services/UserAvatarManager.js +466 -0
- package/dist/services/UserAvatarManager.js.map +1 -0
- package/dist/services/WebSocketConnectionManager.d.ts +26 -0
- package/dist/services/WebSocketConnectionManager.d.ts.map +1 -0
- package/dist/services/WebSocketConnectionManager.js +223 -0
- package/dist/services/WebSocketConnectionManager.js.map +1 -0
- package/dist/services/resolvers/CompositeUserIdResolver.d.ts +20 -0
- package/dist/services/resolvers/CompositeUserIdResolver.d.ts.map +1 -0
- package/dist/services/resolvers/CompositeUserIdResolver.js +46 -0
- package/dist/services/resolvers/CompositeUserIdResolver.js.map +1 -0
- package/dist/services/resolvers/CreatorMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/CreatorMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/CreatorMatchResolver.js +31 -0
- package/dist/services/resolvers/CreatorMatchResolver.js.map +1 -0
- package/dist/services/resolvers/ExactMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/ExactMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/ExactMatchResolver.js +28 -0
- package/dist/services/resolvers/ExactMatchResolver.js.map +1 -0
- package/dist/services/resolvers/IUserIdResolver.d.ts +53 -0
- package/dist/services/resolvers/IUserIdResolver.d.ts.map +1 -0
- package/dist/services/resolvers/IUserIdResolver.js +6 -0
- package/dist/services/resolvers/IUserIdResolver.js.map +1 -0
- package/dist/services/resolvers/OwnerMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/OwnerMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/OwnerMatchResolver.js +31 -0
- package/dist/services/resolvers/OwnerMatchResolver.js.map +1 -0
- package/dist/services/resolvers/PrefixMatchResolver.d.ts +17 -0
- package/dist/services/resolvers/PrefixMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/PrefixMatchResolver.js +36 -0
- package/dist/services/resolvers/PrefixMatchResolver.js.map +1 -0
- package/dist/services/resolvers/index.d.ts +10 -0
- package/dist/services/resolvers/index.d.ts.map +1 -0
- package/dist/services/resolvers/index.js +9 -0
- package/dist/services/resolvers/index.js.map +1 -0
- package/dist/types/animation.d.ts +92 -0
- package/dist/types/animation.d.ts.map +1 -0
- package/dist/types/animation.js +31 -0
- package/dist/types/animation.js.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/naf.d.ts +229 -0
- package/dist/types/naf.d.ts.map +1 -0
- package/dist/types/naf.js +93 -0
- package/dist/types/naf.js.map +1 -0
- package/dist/utils/nafParser.d.ts +64 -0
- package/dist/utils/nafParser.d.ts.map +1 -0
- package/dist/utils/nafParser.js +99 -0
- package/dist/utils/nafParser.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VRM Animation Types and Interfaces
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* VRM animation definition
|
|
6
|
+
*/
|
|
7
|
+
export interface VRMAnimation {
|
|
8
|
+
id: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
vrmaFilePath?: string;
|
|
11
|
+
type: 'preset' | 'custom';
|
|
12
|
+
duration?: number;
|
|
13
|
+
loop?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Animation playback options
|
|
17
|
+
*/
|
|
18
|
+
export interface AnimationPlayOptions {
|
|
19
|
+
loop?: boolean;
|
|
20
|
+
fadeIn?: number;
|
|
21
|
+
fadeOut?: number;
|
|
22
|
+
timeScale?: number;
|
|
23
|
+
startTime?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Animation playback result
|
|
27
|
+
*/
|
|
28
|
+
export interface AnimationPlaybackResult {
|
|
29
|
+
playbackId: string;
|
|
30
|
+
animationId: string;
|
|
31
|
+
startedAt: number;
|
|
32
|
+
expectedDuration?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Animation event
|
|
36
|
+
*/
|
|
37
|
+
export interface AnimationEvent {
|
|
38
|
+
type: 'started' | 'completed' | 'failed';
|
|
39
|
+
playbackId: string;
|
|
40
|
+
animationId: string;
|
|
41
|
+
timestamp: number;
|
|
42
|
+
error?: Error;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Animation NAF message structure
|
|
46
|
+
*/
|
|
47
|
+
export interface AnimationNAFMessage {
|
|
48
|
+
dataType: 'animation';
|
|
49
|
+
data: {
|
|
50
|
+
networkId: string;
|
|
51
|
+
owner: string;
|
|
52
|
+
animationId: string;
|
|
53
|
+
playbackId: string;
|
|
54
|
+
options?: AnimationPlayOptions;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Animation loop behavior
|
|
60
|
+
*/
|
|
61
|
+
export declare enum AnimationLoopBehavior {
|
|
62
|
+
NONE = "none",
|
|
63
|
+
LOOP = "loop",
|
|
64
|
+
PING_PONG = "pingPong"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Preset animation IDs
|
|
68
|
+
*/
|
|
69
|
+
export declare enum PresetAnimationId {
|
|
70
|
+
IDLE = "idle",
|
|
71
|
+
WALKING = "walking",
|
|
72
|
+
GREETING = "greeting",
|
|
73
|
+
THANKFUL = "thankful",
|
|
74
|
+
JUMPING = "jumping",
|
|
75
|
+
JUMPING_UP = "jumping_up",
|
|
76
|
+
JUMPING_DOWN = "jumping_down",
|
|
77
|
+
CROUCH = "crouch",
|
|
78
|
+
DANCE = "dance",
|
|
79
|
+
WAVE = "wave",
|
|
80
|
+
NOD = "nod",
|
|
81
|
+
SHAKE_HEAD = "shake_head"
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Animation configuration for SDK
|
|
85
|
+
*/
|
|
86
|
+
export interface AnimationConfig {
|
|
87
|
+
fallbackAnimations?: VRMAnimation[];
|
|
88
|
+
defaultLoopBehavior?: AnimationLoopBehavior;
|
|
89
|
+
enableAnimationEvents?: boolean;
|
|
90
|
+
animationTimeout?: number;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=animation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/types/animation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,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C,EAAE,MAAM,CAAA;CAC1B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VRM Animation Types and Interfaces
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Animation loop behavior
|
|
6
|
+
*/
|
|
7
|
+
export var AnimationLoopBehavior;
|
|
8
|
+
(function (AnimationLoopBehavior) {
|
|
9
|
+
AnimationLoopBehavior["NONE"] = "none";
|
|
10
|
+
AnimationLoopBehavior["LOOP"] = "loop";
|
|
11
|
+
AnimationLoopBehavior["PING_PONG"] = "pingPong";
|
|
12
|
+
})(AnimationLoopBehavior || (AnimationLoopBehavior = {}));
|
|
13
|
+
/**
|
|
14
|
+
* Preset animation IDs
|
|
15
|
+
*/
|
|
16
|
+
export var PresetAnimationId;
|
|
17
|
+
(function (PresetAnimationId) {
|
|
18
|
+
PresetAnimationId["IDLE"] = "idle";
|
|
19
|
+
PresetAnimationId["WALKING"] = "walking";
|
|
20
|
+
PresetAnimationId["GREETING"] = "greeting";
|
|
21
|
+
PresetAnimationId["THANKFUL"] = "thankful";
|
|
22
|
+
PresetAnimationId["JUMPING"] = "jumping";
|
|
23
|
+
PresetAnimationId["JUMPING_UP"] = "jumping_up";
|
|
24
|
+
PresetAnimationId["JUMPING_DOWN"] = "jumping_down";
|
|
25
|
+
PresetAnimationId["CROUCH"] = "crouch";
|
|
26
|
+
PresetAnimationId["DANCE"] = "dance";
|
|
27
|
+
PresetAnimationId["WAVE"] = "wave";
|
|
28
|
+
PresetAnimationId["NOD"] = "nod";
|
|
29
|
+
PresetAnimationId["SHAKE_HEAD"] = "shake_head";
|
|
30
|
+
})(PresetAnimationId || (PresetAnimationId = {}));
|
|
31
|
+
//# sourceMappingURL=animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.js","sourceRoot":"","sources":["../../src/types/animation.ts"],"names":[],"mappings":"AAAA;;GAEG;AA6DH;;GAEG;AACH,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,sCAAa,CAAA;IACb,+CAAsB,CAAA;AACxB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IACnB,8CAAyB,CAAA;IACzB,kDAA6B,CAAA;IAC7B,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,8CAAyB,CAAA;AAC3B,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types used across the SDK
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* NAF (Networked A-Frame) component data
|
|
6
|
+
*/
|
|
7
|
+
export interface NAFComponent {
|
|
8
|
+
networkId: string;
|
|
9
|
+
owner: string;
|
|
10
|
+
creator: string;
|
|
11
|
+
template: string;
|
|
12
|
+
components: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive NAF (Networked A-Frame) type definitions
|
|
3
|
+
* Provides type-safe interfaces for all NAF message components
|
|
4
|
+
*/
|
|
5
|
+
import { NafComponentId } from '../builders/NafMessageBuilder.js';
|
|
6
|
+
/**
|
|
7
|
+
* 3D position in world space
|
|
8
|
+
*/
|
|
9
|
+
export interface Position3D {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
z: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Quaternion rotation
|
|
16
|
+
*/
|
|
17
|
+
export interface Quaternion {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
z: number;
|
|
21
|
+
w: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Euler angles rotation (in radians)
|
|
25
|
+
*/
|
|
26
|
+
export interface EulerRotation {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
z: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 3D scale factors
|
|
33
|
+
*/
|
|
34
|
+
export interface Scale3D {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
z: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Avatar component configuration
|
|
41
|
+
*/
|
|
42
|
+
export interface AvatarComponentData {
|
|
43
|
+
avatarSrc: string;
|
|
44
|
+
avatarType?: string;
|
|
45
|
+
muted?: boolean;
|
|
46
|
+
isSharingAvatarCamera?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Face snapshot data
|
|
50
|
+
*/
|
|
51
|
+
export interface FaceSnapshotData {
|
|
52
|
+
imageData: string;
|
|
53
|
+
timestamp: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Base structure for a NAF component
|
|
57
|
+
*/
|
|
58
|
+
export interface NAFComponent<T = unknown> {
|
|
59
|
+
components?: T;
|
|
60
|
+
forceRender?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Position component (ID: 0)
|
|
64
|
+
*/
|
|
65
|
+
export interface PositionComponent extends NAFComponent<[number, number, number]> {
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Velocity component (ID: 1)
|
|
69
|
+
*/
|
|
70
|
+
export interface VelocityComponent extends NAFComponent<[number, number, number]> {
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Scale component (ID: 2)
|
|
74
|
+
*/
|
|
75
|
+
export interface ScaleComponent extends NAFComponent<[number, number, number]> {
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Avatar component (ID: 3)
|
|
79
|
+
*/
|
|
80
|
+
export interface AvatarComponent extends NAFComponent<AvatarComponentData | string> {
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Head rotation component (ID: 4)
|
|
84
|
+
*/
|
|
85
|
+
export interface HeadRotationComponent extends NAFComponent<[number, number, number]> {
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Hand rotation components (IDs: 5, 6)
|
|
89
|
+
*/
|
|
90
|
+
export interface HandRotationComponent extends NAFComponent<[number, number, number, number]> {
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Hand position components (IDs: 7, 8)
|
|
94
|
+
*/
|
|
95
|
+
export interface HandPositionComponent extends NAFComponent<[number, number, number]> {
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Hand raised component (ID: 9)
|
|
99
|
+
*/
|
|
100
|
+
export interface HandRaisedComponent extends NAFComponent<boolean> {
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Pin position component (ID: 10)
|
|
104
|
+
*/
|
|
105
|
+
export interface PinPositionComponent extends NAFComponent<[number, number, number]> {
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Pin scale component (ID: 11)
|
|
109
|
+
*/
|
|
110
|
+
export interface PinScaleComponent extends NAFComponent<[number, number, number]> {
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Face snapshot enabled component (ID: 12)
|
|
114
|
+
*/
|
|
115
|
+
export interface FaceSnapshotEnabledComponent extends NAFComponent<boolean> {
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Face snapshot component (ID: 13)
|
|
119
|
+
*/
|
|
120
|
+
export interface FaceSnapshotComponent extends NAFComponent<FaceSnapshotData> {
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Body rotation component (ID: 14)
|
|
124
|
+
*/
|
|
125
|
+
export interface BodyRotationComponent extends NAFComponent<[number, number, number]> {
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Type-safe mapping of component IDs to their respective types
|
|
129
|
+
*/
|
|
130
|
+
export interface NAFComponentMap {
|
|
131
|
+
[NafComponentId.Position]?: PositionComponent;
|
|
132
|
+
[NafComponentId.Velocity]?: VelocityComponent;
|
|
133
|
+
[NafComponentId.Scale]?: ScaleComponent;
|
|
134
|
+
[NafComponentId.Avatar]?: AvatarComponent;
|
|
135
|
+
[NafComponentId.HeadRotation]?: HeadRotationComponent;
|
|
136
|
+
[NafComponentId.LeftHandRotation]?: HandRotationComponent;
|
|
137
|
+
[NafComponentId.RightHandRotation]?: HandRotationComponent;
|
|
138
|
+
[NafComponentId.LeftHandPosition]?: HandPositionComponent;
|
|
139
|
+
[NafComponentId.RightHandPosition]?: HandPositionComponent;
|
|
140
|
+
[NafComponentId.HandRaised]?: HandRaisedComponent;
|
|
141
|
+
[NafComponentId.PinPosition]?: PinPositionComponent;
|
|
142
|
+
[NafComponentId.PinScale]?: PinScaleComponent;
|
|
143
|
+
[NafComponentId.FaceSnapshotEnabled]?: FaceSnapshotEnabledComponent;
|
|
144
|
+
[NafComponentId.FaceSnapshot]?: FaceSnapshotComponent;
|
|
145
|
+
[NafComponentId.BodyRotation]?: BodyRotationComponent;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* NAF message data types
|
|
149
|
+
* - 'u': Create/update entity
|
|
150
|
+
* - 'um': Update multiple entities
|
|
151
|
+
* - 'r': Remove entity
|
|
152
|
+
*/
|
|
153
|
+
export type NAFDataType = 'u' | 'um' | 'r';
|
|
154
|
+
/**
|
|
155
|
+
* Base NAF entity data
|
|
156
|
+
*/
|
|
157
|
+
export interface NAFEntityData {
|
|
158
|
+
networkId: string;
|
|
159
|
+
owner: string;
|
|
160
|
+
creator: string;
|
|
161
|
+
lastOwnerTime: number;
|
|
162
|
+
template: string;
|
|
163
|
+
persistent: boolean;
|
|
164
|
+
parent?: unknown;
|
|
165
|
+
components: NAFComponentMap;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* NAF create/update message ('u' type)
|
|
169
|
+
*/
|
|
170
|
+
export interface NAFCreateMessage {
|
|
171
|
+
dataType: 'u';
|
|
172
|
+
data: NAFEntityData & {
|
|
173
|
+
isFirstSync?: boolean;
|
|
174
|
+
forceRender?: boolean;
|
|
175
|
+
megaphone?: boolean;
|
|
176
|
+
temporaryMegaphone?: boolean;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* NAF multi-update message ('um' type)
|
|
181
|
+
*/
|
|
182
|
+
export interface NAFMultiUpdateMessage {
|
|
183
|
+
dataType: 'um';
|
|
184
|
+
data: {
|
|
185
|
+
d: NAFEntityData[];
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* NAF remove message ('r' type)
|
|
190
|
+
*/
|
|
191
|
+
export interface NAFRemoveMessage {
|
|
192
|
+
dataType: 'r';
|
|
193
|
+
data: {
|
|
194
|
+
networkId: string;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Union type for all NAF message types
|
|
199
|
+
*/
|
|
200
|
+
export type TypedNAFMessage = NAFCreateMessage | NAFMultiUpdateMessage | NAFRemoveMessage;
|
|
201
|
+
/**
|
|
202
|
+
* Type guard for NAF create message
|
|
203
|
+
*/
|
|
204
|
+
export declare function isNAFCreateMessage(msg: unknown): msg is NAFCreateMessage;
|
|
205
|
+
/**
|
|
206
|
+
* Type guard for NAF multi-update message
|
|
207
|
+
*/
|
|
208
|
+
export declare function isNAFMultiUpdateMessage(msg: unknown): msg is NAFMultiUpdateMessage;
|
|
209
|
+
/**
|
|
210
|
+
* Type guard for NAF remove message
|
|
211
|
+
*/
|
|
212
|
+
export declare function isNAFRemoveMessage(msg: unknown): msg is NAFRemoveMessage;
|
|
213
|
+
/**
|
|
214
|
+
* Type guard for any typed NAF message
|
|
215
|
+
*/
|
|
216
|
+
export declare function isTypedNAFMessage(msg: unknown): msg is TypedNAFMessage;
|
|
217
|
+
/**
|
|
218
|
+
* Extract position from NAF components
|
|
219
|
+
*/
|
|
220
|
+
export declare function extractPosition(components: NAFComponentMap): Position3D | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Extract avatar data from NAF components
|
|
223
|
+
*/
|
|
224
|
+
export declare function extractAvatarData(components: NAFComponentMap): AvatarComponentData | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* Extract body rotation from NAF components
|
|
227
|
+
*/
|
|
228
|
+
export declare function extractBodyRotation(components: NAFComponentMap): EulerRotation | undefined;
|
|
229
|
+
//# sourceMappingURL=naf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naf.d.ts","sourceRoot":"","sources":["../../src/types/naf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAMjE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CA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AAA;QACnB,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAC7B,CAAA;CACF;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,IAAI,CAAA;IACd,IAAI,EAAE;QACJ,CAAC,EAAE,aAAa,EAAE,CAAA;KACnB,CAAA;CACF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,GAAG,CAAA;IACb,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,gBAAgB,CAAA;AAMzF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,gBAAgB,CASxE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,qBAAqB,CAYlF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,gBAAgB,CAWxE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAEtE;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,eAAe,GAAG,UAAU,GAAG,SAAS,CAOnF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,eAAe,GAAG,mBAAmB,GAAG,SAAS,CAW9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS,CAO1F"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive NAF (Networked A-Frame) type definitions
|
|
3
|
+
* Provides type-safe interfaces for all NAF message components
|
|
4
|
+
*/
|
|
5
|
+
import { NafComponentId } from '../builders/NafMessageBuilder.js';
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Type Guards
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/**
|
|
10
|
+
* Type guard for NAF create message
|
|
11
|
+
*/
|
|
12
|
+
export function isNAFCreateMessage(msg) {
|
|
13
|
+
return (typeof msg === 'object' &&
|
|
14
|
+
msg !== null &&
|
|
15
|
+
'dataType' in msg &&
|
|
16
|
+
msg.dataType === 'u' &&
|
|
17
|
+
'data' in msg &&
|
|
18
|
+
typeof msg.data === 'object');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Type guard for NAF multi-update message
|
|
22
|
+
*/
|
|
23
|
+
export function isNAFMultiUpdateMessage(msg) {
|
|
24
|
+
return (typeof msg === 'object' &&
|
|
25
|
+
msg !== null &&
|
|
26
|
+
'dataType' in msg &&
|
|
27
|
+
msg.dataType === 'um' &&
|
|
28
|
+
'data' in msg &&
|
|
29
|
+
typeof msg.data === 'object' &&
|
|
30
|
+
msg.data !== null &&
|
|
31
|
+
'd' in msg.data &&
|
|
32
|
+
Array.isArray(msg.data.d));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Type guard for NAF remove message
|
|
36
|
+
*/
|
|
37
|
+
export function isNAFRemoveMessage(msg) {
|
|
38
|
+
return (typeof msg === 'object' &&
|
|
39
|
+
msg !== null &&
|
|
40
|
+
'dataType' in msg &&
|
|
41
|
+
msg.dataType === 'r' &&
|
|
42
|
+
'data' in msg &&
|
|
43
|
+
typeof msg.data === 'object' &&
|
|
44
|
+
msg.data !== null &&
|
|
45
|
+
'networkId' in msg.data);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Type guard for any typed NAF message
|
|
49
|
+
*/
|
|
50
|
+
export function isTypedNAFMessage(msg) {
|
|
51
|
+
return isNAFCreateMessage(msg) || isNAFMultiUpdateMessage(msg) || isNAFRemoveMessage(msg);
|
|
52
|
+
}
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Helper Functions
|
|
55
|
+
// ============================================================================
|
|
56
|
+
/**
|
|
57
|
+
* Extract position from NAF components
|
|
58
|
+
*/
|
|
59
|
+
export function extractPosition(components) {
|
|
60
|
+
const posComponent = components[NafComponentId.Position];
|
|
61
|
+
if (posComponent?.components && Array.isArray(posComponent.components)) {
|
|
62
|
+
const [x = 0, y = 0, z = 0] = posComponent.components;
|
|
63
|
+
return { x, y, z };
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Extract avatar data from NAF components
|
|
69
|
+
*/
|
|
70
|
+
export function extractAvatarData(components) {
|
|
71
|
+
const avatarComponent = components[NafComponentId.Avatar];
|
|
72
|
+
if (avatarComponent?.components) {
|
|
73
|
+
if (typeof avatarComponent.components === 'string') {
|
|
74
|
+
return { avatarSrc: avatarComponent.components };
|
|
75
|
+
}
|
|
76
|
+
if (typeof avatarComponent.components === 'object') {
|
|
77
|
+
return avatarComponent.components;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Extract body rotation from NAF components
|
|
84
|
+
*/
|
|
85
|
+
export function extractBodyRotation(components) {
|
|
86
|
+
const rotComponent = components[NafComponentId.BodyRotation];
|
|
87
|
+
if (rotComponent?.components && Array.isArray(rotComponent.components)) {
|
|
88
|
+
const [x = 0, y = 0, z = 0] = rotComponent.components;
|
|
89
|
+
return { x, y, z };
|
|
90
|
+
}
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=naf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naf.js","sourceRoot":"","sources":["../../src/types/naf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAmOjE,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,kBAAkB,C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AC,EAAE,CAAA;IACpB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NAF (Networked A-Frame) message parser utilities
|
|
3
|
+
* Uses strongly-typed NAF component definitions for type-safe parsing
|
|
4
|
+
*/
|
|
5
|
+
import type { EulerRotation, NAFComponentMap, Position3D, Quaternion } from '../types/naf.js';
|
|
6
|
+
export interface ParsedNAFData {
|
|
7
|
+
position?: Position3D;
|
|
8
|
+
rotation?: Quaternion;
|
|
9
|
+
avatarId?: string;
|
|
10
|
+
nickname?: string;
|
|
11
|
+
headRotation?: EulerRotation;
|
|
12
|
+
bodyRotation?: EulerRotation;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Parse NAF message components into structured data
|
|
16
|
+
* @param components The components object from NAF message
|
|
17
|
+
* @returns Parsed NAF data
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseNAFComponents(components: Record<string, unknown> | NAFComponentMap): ParsedNAFData;
|
|
20
|
+
/**
|
|
21
|
+
* Convert Euler angles to quaternion
|
|
22
|
+
* @param x Rotation around X axis (radians)
|
|
23
|
+
* @param y Rotation around Y axis (radians)
|
|
24
|
+
* @param z Rotation around Z axis (radians)
|
|
25
|
+
* @returns Quaternion representation
|
|
26
|
+
*/
|
|
27
|
+
export declare function eulerToQuaternion(x: number, y: number, z: number): {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
z: number;
|
|
31
|
+
w: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Normalize a quaternion
|
|
35
|
+
* @param q Quaternion to normalize
|
|
36
|
+
* @returns Normalized quaternion
|
|
37
|
+
*/
|
|
38
|
+
export declare function normalizeQuaternion(q: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
z: number;
|
|
42
|
+
w: number;
|
|
43
|
+
}): {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
z: number;
|
|
47
|
+
w: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Calculate distance between two 3D positions
|
|
51
|
+
* @param pos1 First position
|
|
52
|
+
* @param pos2 Second position
|
|
53
|
+
* @returns Distance between positions
|
|
54
|
+
*/
|
|
55
|
+
export declare function calculateDistance(pos1: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
z: number;
|
|
59
|
+
}, pos2: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
z: number;
|
|
63
|
+
}): number;
|
|
64
|
+
//# sourceMappingURL=nafParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nafParser.d.ts","sourceRoot":"","sources":["../../src/utils/nafParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAG7F,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,YAAY,CAAC,EAAE,aAAa,CAAA;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,GACpD,aAAa,CAqCf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAqBhD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IACtF,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAaA;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EACzC,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC,MAAM,CAKR"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NAF (Networked A-Frame) message parser utilities
|
|
3
|
+
* Uses strongly-typed NAF component definitions for type-safe parsing
|
|
4
|
+
*/
|
|
5
|
+
import { NafComponentId } from '../builders/NafMessageBuilder.js';
|
|
6
|
+
import { extractAvatarData, extractBodyRotation, extractPosition } from '../types/naf.js';
|
|
7
|
+
/**
|
|
8
|
+
* Parse NAF message components into structured data
|
|
9
|
+
* @param components The components object from NAF message
|
|
10
|
+
* @returns Parsed NAF data
|
|
11
|
+
*/
|
|
12
|
+
export function parseNAFComponents(components) {
|
|
13
|
+
const result = {};
|
|
14
|
+
// Use type-safe component map
|
|
15
|
+
const typedComponents = components;
|
|
16
|
+
// Parse position using type-safe helper
|
|
17
|
+
result.position = extractPosition(typedComponents);
|
|
18
|
+
// Parse head rotation
|
|
19
|
+
const headRotComponent = typedComponents[NafComponentId.HeadRotation];
|
|
20
|
+
if (headRotComponent?.components && Array.isArray(headRotComponent.components)) {
|
|
21
|
+
const [x = 0, y = 0, z = 0] = headRotComponent.components;
|
|
22
|
+
result.headRotation = { x, y, z };
|
|
23
|
+
}
|
|
24
|
+
// Parse body rotation and convert to quaternion
|
|
25
|
+
const bodyRotation = extractBodyRotation(typedComponents);
|
|
26
|
+
if (bodyRotation) {
|
|
27
|
+
result.bodyRotation = bodyRotation;
|
|
28
|
+
result.rotation = eulerToQuaternion(bodyRotation.x, bodyRotation.y, bodyRotation.z);
|
|
29
|
+
}
|
|
30
|
+
// Parse avatar component using type-safe helper
|
|
31
|
+
const avatarData = extractAvatarData(typedComponents);
|
|
32
|
+
if (avatarData) {
|
|
33
|
+
// Extract avatar ID from src URL if present
|
|
34
|
+
const match = avatarData.avatarSrc.match(/avatar_id=([^&]+)/);
|
|
35
|
+
if (match) {
|
|
36
|
+
result.avatarId = match[1];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Note: Nickname is not part of standard NAF components in our schema
|
|
40
|
+
// It may be in a custom component or separate message
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Convert Euler angles to quaternion
|
|
45
|
+
* @param x Rotation around X axis (radians)
|
|
46
|
+
* @param y Rotation around Y axis (radians)
|
|
47
|
+
* @param z Rotation around Z axis (radians)
|
|
48
|
+
* @returns Quaternion representation
|
|
49
|
+
*/
|
|
50
|
+
export function eulerToQuaternion(x, y, z) {
|
|
51
|
+
// Half angles
|
|
52
|
+
const hx = x * 0.5;
|
|
53
|
+
const hy = y * 0.5;
|
|
54
|
+
const hz = z * 0.5;
|
|
55
|
+
// Trigonometric values
|
|
56
|
+
const cx = Math.cos(hx);
|
|
57
|
+
const cy = Math.cos(hy);
|
|
58
|
+
const cz = Math.cos(hz);
|
|
59
|
+
const sx = Math.sin(hx);
|
|
60
|
+
const sy = Math.sin(hy);
|
|
61
|
+
const sz = Math.sin(hz);
|
|
62
|
+
// Quaternion components
|
|
63
|
+
return {
|
|
64
|
+
x: sx * cy * cz - cx * sy * sz,
|
|
65
|
+
y: cx * sy * cz + sx * cy * sz,
|
|
66
|
+
z: cx * cy * sz - sx * sy * cz,
|
|
67
|
+
w: cx * cy * cz + sx * sy * sz,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Normalize a quaternion
|
|
72
|
+
* @param q Quaternion to normalize
|
|
73
|
+
* @returns Normalized quaternion
|
|
74
|
+
*/
|
|
75
|
+
export function normalizeQuaternion(q) {
|
|
76
|
+
const magnitude = Math.sqrt(q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w);
|
|
77
|
+
if (magnitude === 0) {
|
|
78
|
+
return { x: 0, y: 0, z: 0, w: 1 };
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
x: q.x / magnitude,
|
|
82
|
+
y: q.y / magnitude,
|
|
83
|
+
z: q.z / magnitude,
|
|
84
|
+
w: q.w / magnitude,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Calculate distance between two 3D positions
|
|
89
|
+
* @param pos1 First position
|
|
90
|
+
* @param pos2 Second position
|
|
91
|
+
* @returns Distance between positions
|
|
92
|
+
*/
|
|
93
|
+
export function calculateDistance(pos1, pos2) {
|
|
94
|
+
const dx = pos1.x - pos2.x;
|
|
95
|
+
const dy = pos1.y - pos2.y;
|
|
96
|
+
const dz = pos1.z - pos2.z;
|
|
97
|
+
return Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=nafParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nafParser.js","sourceRoot":"","sources":["../../src/utils/nafParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEjE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;A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