@viji-dev/core 0.8.3 → 0.8.4
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/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +1 -1
- package/dist/artist-global.d.ts +1 -1
- package/dist/assets/{viji.worker-Ds0fC23y.js → viji.worker-BQ4vNMJ0.js} +38 -10
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-BATCANag.js → essentia-wasm.web-H69T-_AQ.js} +2 -2
- package/dist/{index-BzW31blh.js → index-DF_IFS3A.js} +40 -5
- package/dist/index.d.ts +29 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2654,7 +2654,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
|
|
|
2654
2654
|
/** Returned by `on*` listener registration calls; invoke to unsubscribe. */
|
|
2655
2655
|
export declare type Unsubscribe = () => void;
|
|
2656
2656
|
|
|
2657
|
-
export declare const VERSION = "0.8.
|
|
2657
|
+
export declare const VERSION = "0.8.3";
|
|
2658
2658
|
|
|
2659
2659
|
/**
|
|
2660
2660
|
* Real-time video API: drawable frame, dimensions, and the source-side
|
|
@@ -3067,6 +3067,7 @@ export declare class VijiCore {
|
|
|
3067
3067
|
private performanceSnapshotListeners;
|
|
3068
3068
|
private capabilityTransitionListeners;
|
|
3069
3069
|
private capabilityReportingEnabled;
|
|
3070
|
+
private renderLoopPaused;
|
|
3070
3071
|
constructor(config: VijiCoreConfig);
|
|
3071
3072
|
/**
|
|
3072
3073
|
* Capture current scene frame
|
|
@@ -3811,6 +3812,33 @@ export declare class VijiCore {
|
|
|
3811
3812
|
* Gets current performance statistics
|
|
3812
3813
|
*/
|
|
3813
3814
|
getStats(): PerformanceStats;
|
|
3815
|
+
/**
|
|
3816
|
+
* Pauses the scene render loop — stops the worker from rendering. Intended to
|
|
3817
|
+
* be driven from the host on `document.hidden`, so a hidden tab doesn't keep
|
|
3818
|
+
* rasterizing a heavy scene (which otherwise pegs the GPU and causes a freeze
|
|
3819
|
+
* on return).
|
|
3820
|
+
*
|
|
3821
|
+
* Only the rendering stops. The scene clock keeps running on real wall-clock,
|
|
3822
|
+
* and audio analysis, video/audio streams, CV, parameters and all scene state
|
|
3823
|
+
* keep running too — so audio you can still hear is still analyzed. On
|
|
3824
|
+
* {@link resumeRenderLoop}, `viji.time` reflects the **real** elapsed time
|
|
3825
|
+
* (including the hidden duration) and the first frame's `viji.deltaTime` is the
|
|
3826
|
+
* **real** time-away gap. (That gap can be large; the scene sees true time, not
|
|
3827
|
+
* a frozen clock.) Idempotent.
|
|
3828
|
+
*
|
|
3829
|
+
* For a live compositor *source* feeding a visible mixer, do NOT pause it
|
|
3830
|
+
* while its own tab is hidden — it must keep rendering. Pause is per-core and
|
|
3831
|
+
* host-controlled.
|
|
3832
|
+
*/
|
|
3833
|
+
pauseRenderLoop(): void;
|
|
3834
|
+
/**
|
|
3835
|
+
* Resumes the scene render loop after {@link pauseRenderLoop} (e.g. on the tab
|
|
3836
|
+
* becoming visible). The scene resumes on real wall-clock time, so the first
|
|
3837
|
+
* frame's `viji.deltaTime` is the elapsed time-away gap. Idempotent.
|
|
3838
|
+
*/
|
|
3839
|
+
resumeRenderLoop(): void;
|
|
3840
|
+
/** Whether the render loop is currently paused (see {@link pauseRenderLoop}). */
|
|
3841
|
+
isRenderLoopPaused(): boolean;
|
|
3814
3842
|
/**
|
|
3815
3843
|
* Runs an on-demand fenced benchmark: the worker renders `frameCount` frames,
|
|
3816
3844
|
* fencing each to capture fence-accurate CPU + GPU time per frame, and
|
package/dist/index.js
CHANGED