@spatialwalk/avatarkit 1.0.0-beta.87 → 1.0.0-beta.89
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 +32 -0
- package/dist/{StreamingAudioPlayer-CCQgsR1j.js → StreamingAudioPlayer-BSZxueCh.js} +1 -1
- package/dist/assets/cpu-benchmark-worker-C6iFEUSO.js +36 -0
- package/dist/avatar_core_wasm-Dv943JJl.js +1 -1
- package/dist/avatar_core_wasm-e68766db.wasm +0 -0
- package/dist/core/Avatar.d.ts +2 -0
- package/dist/core/AvatarController.d.ts +13 -1
- package/dist/core/AvatarManager.d.ts +2 -1
- package/dist/core/AvatarSDK.d.ts +24 -1
- package/dist/core/AvatarView.d.ts +5 -3
- package/dist/{index-BNATNpKA.js → index-Cq6e5BSB.js} +1282 -436
- package/dist/index.js +1 -1
- package/dist/performance/FrameRateMonitor.d.ts +85 -0
- package/dist/types/character.d.ts +2 -0
- package/dist/types/index.d.ts +3 -2
- package/package.json +21 -18
- package/dist/benchmark-demo/src/main.d.ts +0 -1
- package/dist/marble-test/src/billboard.d.ts +0 -22
- package/dist/marble-test/src/main.d.ts +0 -6
- package/dist/marble-test/src/spzLoader.d.ts +0 -18
- package/dist/marble-test/vite.config.d.ts +0 -2
- package/dist/tools/capture-messages/capture.d.ts +0 -15
- package/dist/tools/capture-messages/verify.d.ts +0 -5
- package/dist/tools/replay-web/vite.config.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### ⚡ Breaking Changes
|
|
11
|
+
|
|
12
|
+
- **Enum Rename** — `ConversationState.pausing` renamed to `ConversationState.paused` for cross-SDK consistency
|
|
13
|
+
- **FrameRateInfo** — Unified as pre-computed fields; sub-stage data (decode/render/present) now available via `FrameRenderInfo`
|
|
14
|
+
|
|
15
|
+
### ✨ Features
|
|
16
|
+
|
|
17
|
+
- **FrameRateMonitor** — Unified public API for frame rate monitoring with enable/disable switch
|
|
18
|
+
- **Device Benchmark** — `deviceScore` and `isDeviceSupported` APIs for runtime device capability assessment
|
|
19
|
+
- **Telemetry Enhancements** — `avatar_playback_fps` now reports `cpu_score`, `gpu_score`, and `renderer_backend` (webgl/webgpu)
|
|
20
|
+
- **Deprecation Reset** — Deprecation warnings reset on `initialize()` to avoid stale state across re-init cycles
|
|
21
|
+
- **Compressed Model (Beta)** — `load()` accepts optional `useCompressedModel` parameter (default `false`); when `true`, prefers compressed model resource (~30% of original size, minor quality degradation), falls back to standard resource if unavailable。此功能目前为 Beta,请务必验证渲染效果后再用于生产环境
|
|
22
|
+
|
|
23
|
+
### ⚡ Performance
|
|
24
|
+
|
|
25
|
+
- **Audio-Clock-Driven Scheduling** — Speaking playback now uses audio clock for tick scheduling, replacing RAF-based timing for more accurate frame pacing
|
|
26
|
+
- **Idle Present Frame Resubmission** — Idle state uses `presentFrameOnly()` to resubmit the current frame, reducing GPU re-computation
|
|
27
|
+
|
|
28
|
+
### 🐛 Bugfixes
|
|
29
|
+
|
|
30
|
+
- **Build Packaging** — WASM binary missing from dist in beta.87; added benchmark-demo and marble-test to dts exclude
|
|
31
|
+
- **Deprecation State** — Fixed stale deprecation warnings persisting across SDK re-initialization
|
|
32
|
+
|
|
33
|
+
## [1.0.0-beta.88] - 2026-03-10
|
|
34
|
+
|
|
35
|
+
### 🐛 Bugfixes
|
|
36
|
+
|
|
37
|
+
- **Build Packaging Fix** - WASM binary was missing from dist in beta.87 npm package; added `benchmark-demo` and `marble-test` to dts exclude to prevent type declaration leakage
|
|
38
|
+
- **Release Workflow** - Added build artifact verification step (WASM presence + no leaked directories)
|
|
39
|
+
|
|
8
40
|
## [1.0.0-beta.87] - 2026-03-09
|
|
9
41
|
|
|
10
42
|
### 🔧 Performance
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { A as APP_CONFIG, l as logger, e as errorToMessage, a as logEvent } from "./index-
|
|
4
|
+
import { A as APP_CONFIG, l as logger, e as errorToMessage, a as logEvent } from "./index-Cq6e5BSB.js";
|
|
5
5
|
class StreamingAudioPlayer {
|
|
6
6
|
// Mark if AudioContext is being resumed, avoid concurrent resume requests
|
|
7
7
|
constructor(options) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
const MATRIX_SIZE = 128;
|
|
4
|
+
const A = new Float32Array(MATRIX_SIZE * MATRIX_SIZE);
|
|
5
|
+
const B = new Float32Array(MATRIX_SIZE * MATRIX_SIZE);
|
|
6
|
+
const C = new Float32Array(MATRIX_SIZE * MATRIX_SIZE);
|
|
7
|
+
for (let i = 0; i < A.length; i++) {
|
|
8
|
+
A[i] = i % 100 / 100;
|
|
9
|
+
B[i] = i * 7 % 100 / 100;
|
|
10
|
+
}
|
|
11
|
+
function benchmarkMatrixMultiply() {
|
|
12
|
+
const N = MATRIX_SIZE;
|
|
13
|
+
for (let i = 0; i < N; i++) {
|
|
14
|
+
for (let j = 0; j < N; j++) {
|
|
15
|
+
let sum = 0;
|
|
16
|
+
for (let k = 0; k < N; k++) {
|
|
17
|
+
sum += A[i * N + k] * B[k * N + j];
|
|
18
|
+
}
|
|
19
|
+
C[i * N + j] = sum;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
self.onmessage = () => {
|
|
24
|
+
const warmupEnd = performance.now() + 1e3;
|
|
25
|
+
while (performance.now() < warmupEnd) {
|
|
26
|
+
benchmarkMatrixMultiply();
|
|
27
|
+
}
|
|
28
|
+
let iterations = 0;
|
|
29
|
+
const measureEnd = performance.now() + 1e3;
|
|
30
|
+
while (performance.now() < measureEnd) {
|
|
31
|
+
benchmarkMatrixMultiply();
|
|
32
|
+
iterations++;
|
|
33
|
+
}
|
|
34
|
+
self.postMessage({ cpuScore: iterations });
|
|
35
|
+
};
|
|
36
|
+
})();
|