@incodetech/core 0.0.0-dev-20260727-4e22043f → 0.0.0-dev-20260727-6d540cf0
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/{Face2DProvider-xWUeSJZI.esm.js → Face2DProvider-BZCsS_sf.esm.js} +16 -4
- package/dist/PrivacyLensProvider-DA3rp6sf.esm.js +727 -0
- package/dist/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CqcUarZL.esm.js → authenticationManager-BugCSsnK.esm.js} +2 -2
- package/dist/{authenticationManager-Ce1nLm5y.d.ts → authenticationManager-DqyCzK3H.d.ts} +1 -1
- package/dist/{authenticationStateMachine-C65ym-xr.esm.js → authenticationStateMachine-B15J5KEE.esm.js} +2 -2
- package/dist/avatar.esm.js +1 -1
- package/dist/avatarStats-BIB3SREM.esm.js +146 -0
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
- package/dist/{createFaceAvatar-CwVapQiu.esm.js → createFaceAvatar-x5aaJwVM.esm.js} +2 -2
- package/dist/{deepsightLoader-P9BYMXpo.esm.js → deepsightLoader-3f48VAWS.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-viscdI3d.esm.js → ekybManager-D86lOKbu.esm.js} +1 -1
- package/dist/{ekybStateMachine-DR_8mE1j.esm.js → ekybStateMachine-CscfKZxA.esm.js} +1 -1
- package/dist/extensibility.d.ts +8 -8
- package/dist/extensibility.esm.js +6 -6
- package/dist/{faceCaptureManagerFactory-BUE6z9iY.d.ts → faceCaptureManagerFactory-BpVpExwX.d.ts} +0 -6
- package/dist/{faceCaptureManagerFactory-BVZ3fonQ.esm.js → faceCaptureManagerFactory-CWqmMqXq.esm.js} +1 -2
- package/dist/{faceCaptureSetup-DWPFfh6J.esm.js → faceCaptureSetup-DJSy9KIH.esm.js} +3 -11
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +1 -1
- package/dist/{flowServices-DR1uBo_E.esm.js → flowServices-BxqjVAV0.esm.js} +2 -2
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +2 -2
- package/dist/{idCaptureManager-DZjNKCN0.esm.js → idCaptureManager-CpqVWwfk.esm.js} +1 -2
- package/dist/{idCaptureManager-CtsYvX-Z.d.ts → idCaptureManager-DECjdrKj.d.ts} +1 -2
- package/dist/{idCaptureStateMachine-CXMJ1Yjg.esm.js → idCaptureStateMachine-f9guPQn1.esm.js} +6 -19
- package/dist/{idOcrManager-DlYG277_.d.ts → idOcrManager-5vi0uwLZ.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-BobEyNBc.d.ts → mandatoryConsentManager-Ck2e2W4o.d.ts} +4 -4
- package/dist/{onDeviceFaceResults-Ck6PjuaN.esm.js → onDeviceFaceResults-CXPJhFPL.esm.js} +1 -1
- package/dist/personhood.esm.js +2 -2
- package/dist/{recordingService-C37o41ar.esm.js → recordingService-rNoh1PIz.esm.js} +1 -1
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +4 -4
- package/dist/{selfieManager-CUSnS_Ty.esm.js → selfieManager-Br-jyeHB.esm.js} +2 -2
- package/dist/{selfieManager-LabfZln4.d.ts → selfieManager-DR-EIsRb.d.ts} +1 -1
- package/dist/{selfieStateMachine-CSTR3bTY.esm.js → selfieStateMachine-BKelTRVc.esm.js} +2 -2
- package/dist/session-Dvgjq8G1.esm.js +1 -0
- package/dist/session.esm.js +2 -2
- package/dist/{sessionInitializer-B_GKYIAU.esm.js → sessionInitializer-JZoRl_kK.esm.js} +1 -1
- package/dist/{setup-Dr_yQTok.esm.js → setup-D8Ptyi5X.esm.js} +2 -2
- package/dist/{types-D0ohdBDu.d.ts → types-B02qlnfB.d.ts} +0 -4
- package/dist/video-selfie.esm.js +3 -3
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.esm.js +6 -6
- package/package.json +1 -1
- package/dist/PrivacyLensProvider-BrYSd1dr.esm.js +0 -336
- package/dist/session-DTuRfMtr.esm.js +0 -1
- /package/dist/{types-CBJI9n6h.d.ts → types-CBJI9n6h2.d.ts} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as createHiddenVideoElement } from "./video-BtSWtHy1.esm.js";
|
|
2
2
|
import { n as createFaceLandmarker, r as dtAlpha, t as asRvfc } from "./mediapipeShared-B0iQQ5k7.esm.js";
|
|
3
|
+
import { a as createFramePacer, r as isAvatarStatsEnabled, t as createAvatarStatsReporter } from "./avatarStats-BIB3SREM.esm.js";
|
|
3
4
|
//#region ../infra/src/avatar/2d-default-avatar/assets.ts
|
|
4
5
|
/**
|
|
5
6
|
* 2D avatar MediaPipe asset resolution — **self-contained** (no shared
|
|
@@ -528,7 +529,9 @@ var Avatar2DProvider = class {
|
|
|
528
529
|
this.inputCtx = null;
|
|
529
530
|
this.rafId = null;
|
|
530
531
|
this.lastFrameAt = 0;
|
|
531
|
-
this.
|
|
532
|
+
this.dtSeedMs = 1e3 / DEFAULT_MAX_FPS;
|
|
533
|
+
this.pacer = createFramePacer(DEFAULT_MAX_FPS);
|
|
534
|
+
this.stats = createAvatarStatsReporter("avatar-2d");
|
|
532
535
|
this.stopped = false;
|
|
533
536
|
this.mediapipeModulePath = "";
|
|
534
537
|
this.mediapipeWasmPath = "";
|
|
@@ -570,9 +573,14 @@ var Avatar2DProvider = class {
|
|
|
570
573
|
this.loop = (now) => {
|
|
571
574
|
if (this.stopped) return;
|
|
572
575
|
this.scheduleNextFrame();
|
|
573
|
-
if (
|
|
574
|
-
|
|
576
|
+
if (!this.pacer.shouldRender(now)) {
|
|
577
|
+
this.stats.frameDropped();
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
const dtMs = clamp(this.lastFrameAt > 0 ? now - this.lastFrameAt : this.dtSeedMs, 1, 100);
|
|
575
581
|
this.lastFrameAt = now;
|
|
582
|
+
const measure = isAvatarStatsEnabled();
|
|
583
|
+
const frameStart = measure ? performance.now() : 0;
|
|
576
584
|
const video = this.videoHandle?.element;
|
|
577
585
|
if (!video || video.readyState < 2 || !this.landmarker) {
|
|
578
586
|
this.renderer.render(this.current);
|
|
@@ -603,6 +611,7 @@ var Avatar2DProvider = class {
|
|
|
603
611
|
if (now - this.lastFaceAt > FACE_LOST_MS) this.target = structuredClonePose(AVATAR2D_NEUTRAL_POSE);
|
|
604
612
|
this.smoothTowardTarget(dtMs);
|
|
605
613
|
this.renderer.render(this.current);
|
|
614
|
+
if (measure) this.stats.frameRendered(now, void 0, performance.now() - frameStart);
|
|
606
615
|
};
|
|
607
616
|
}
|
|
608
617
|
getCanvas() {
|
|
@@ -620,7 +629,9 @@ var Avatar2DProvider = class {
|
|
|
620
629
|
this.mediapipeModulePath = assets.mediapipeModulePath;
|
|
621
630
|
this.mediapipeWasmPath = assets.mediapipeWasmPath;
|
|
622
631
|
this.faceLandmarkerModelPath = assets.faceLandmarkerModelPath;
|
|
623
|
-
|
|
632
|
+
const maxFps = options.maxFps ?? DEFAULT_MAX_FPS;
|
|
633
|
+
this.dtSeedMs = 1e3 / maxFps;
|
|
634
|
+
this.pacer = createFramePacer(maxFps);
|
|
624
635
|
this.videoHandle = createHiddenVideoElement(stream, { keepStreamAlive: true });
|
|
625
636
|
try {
|
|
626
637
|
this.renderer.init();
|
|
@@ -648,6 +659,7 @@ var Avatar2DProvider = class {
|
|
|
648
659
|
}
|
|
649
660
|
stop() {
|
|
650
661
|
this.stopped = true;
|
|
662
|
+
this.stats.dispose();
|
|
651
663
|
if (this.rafId != null) {
|
|
652
664
|
cancelAnimationFrame(this.rafId);
|
|
653
665
|
this.rafId = null;
|