@spatius/avatarkit 1.3.5-beta.1 → 1.3.5
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/CHANGELOG.md +7 -0
- package/dist/assets/{OpusDecoderWorker.worker-DkKhJmGs.js → OpusDecoderWorker.worker-BTHlnzwA.js} +8890 -3
- package/dist/assets/{OpusEncoderWorker.worker-Bu8QRO55.js → OpusEncoderWorker.worker-DB_Lvnzc.js} +8890 -3
- package/dist/core/sdk-ref.d.ts +1 -0
- package/dist/index.js +46228 -649
- package/dist/internal-telemetry.js +1 -2
- package/dist/{logger-BCrlTIt2.js → otel-trace-CdspSqI0.js} +5121 -120
- package/dist/{assets/rolldown-runtime-B-1-B7_t.js → rolldown-runtime-FDOR9p9I.js} +1 -10
- package/package.json +1 -1
- package/dist/AvatarDownloader-BLERPef7.js +0 -616
- package/dist/AvatarSDK-DCYDBMwd.js +0 -2048
- package/dist/OpusCodec-BYwstcZb.js +0 -41760
- package/dist/OpusDecoderProxy-DW_SVYwd.js +0 -142
- package/dist/OpusEncoderProxy-CQrj6ZjY.js +0 -170
- package/dist/StreamingAudioPlayer-BORop_1T.js +0 -561
- package/dist/assets/AvatarDownloader-DImd24mo.js +0 -844
- package/dist/assets/AvatarSDK-vQTYP0IB.js +0 -6732
- package/dist/assets/avatar_core_wasm-wdep7Ict.js +0 -2536
- package/dist/assets/logger-CnIdJBOF.js +0 -15542
- package/dist/error-utils-CX5P3vnW.js +0 -85
- package/dist/otel-trace-D2py5nQo.js +0 -5007
- package/dist/pwa-cache-manager-C7su6HpW.js +0 -151
- package/dist/rolldown-runtime-B-1-B7_t.js +0 -33
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { bt as isDebugMode } from "./logger-BCrlTIt2.js";
|
|
2
|
-
//#region config/app-config.ts
|
|
3
|
-
var GLOBAL_FLAME_CDN_BASE = "https://cdn.spatialwalk.cloud/public";
|
|
4
|
-
var CN_FLAME_CDN_BASE = "https://cdn.spatialwalk.top/public";
|
|
5
|
-
function getFlameCdnBase(region) {
|
|
6
|
-
return region.startsWith("cn-") ? CN_FLAME_CDN_BASE : GLOBAL_FLAME_CDN_BASE;
|
|
7
|
-
}
|
|
8
|
-
var APP_CONFIG = {
|
|
9
|
-
testEnv: false,
|
|
10
|
-
get debug() {
|
|
11
|
-
return isDebugMode();
|
|
12
|
-
},
|
|
13
|
-
rendering: {
|
|
14
|
-
/**
|
|
15
|
-
* Sort mode
|
|
16
|
-
* - 'balance': Performance first, sort first frame then reuse (default)
|
|
17
|
-
* - 'quality': Quality first, re-sort every frame
|
|
18
|
-
*/
|
|
19
|
-
sortMode: "balance" },
|
|
20
|
-
camera: {
|
|
21
|
-
position: [
|
|
22
|
-
-.02,
|
|
23
|
-
-.013,
|
|
24
|
-
1.5
|
|
25
|
-
],
|
|
26
|
-
target: [
|
|
27
|
-
0,
|
|
28
|
-
0,
|
|
29
|
-
0
|
|
30
|
-
],
|
|
31
|
-
fov: 22,
|
|
32
|
-
near: .01,
|
|
33
|
-
far: 100
|
|
34
|
-
},
|
|
35
|
-
animation: { fps: 25 },
|
|
36
|
-
audio: { sampleRate: 16e3 },
|
|
37
|
-
avatar: {
|
|
38
|
-
baseAssetsPath: "",
|
|
39
|
-
wasmPath: "./wasm/avatar_core_wasm.js"
|
|
40
|
-
},
|
|
41
|
-
flame: {
|
|
42
|
-
cdnBase: GLOBAL_FLAME_CDN_BASE,
|
|
43
|
-
unifiedModelPath: "unified_model_body.pb.gz"
|
|
44
|
-
},
|
|
45
|
-
wasm: {
|
|
46
|
-
logLevel: "basic",
|
|
47
|
-
enableValidation: false,
|
|
48
|
-
enablePerformanceMetrics: true
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region utils/error-utils.ts
|
|
53
|
-
/**
|
|
54
|
-
* Error Utility Functions
|
|
55
|
-
* Provides consistent error handling and formatting across the application
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* Convert unknown error to a readable error message string
|
|
59
|
-
*
|
|
60
|
-
* @param err - Unknown error object (could be Error, string, object, etc.)
|
|
61
|
-
* @returns Formatted error message string
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* try {
|
|
65
|
-
* riskyOperation()
|
|
66
|
-
* } catch (err) {
|
|
67
|
-
* const message = errorToMessage(err)
|
|
68
|
-
* logger.error('Operation failed:', message)
|
|
69
|
-
* }
|
|
70
|
-
*/
|
|
71
|
-
function errorToMessage(err) {
|
|
72
|
-
if (err instanceof Error) return err.message;
|
|
73
|
-
if (typeof err === "string") return err;
|
|
74
|
-
if (typeof err === "object" && err !== null) {
|
|
75
|
-
if ("message" in err && typeof err.message === "string") return err.message;
|
|
76
|
-
try {
|
|
77
|
-
return JSON.stringify(err);
|
|
78
|
-
} catch {
|
|
79
|
-
return String(err);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return String(err);
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { APP_CONFIG as n, getFlameCdnBase as r, errorToMessage as t };
|