@viji-dev/core 0.8.14 → 0.8.15
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/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-CN4UhEyR.js → essentia-wasm.web-DScJyWoX.js} +2 -2
- package/dist/{index-BvlTOvkN.js → index-CI49eH6U.js} +23 -4
- package/dist/index.d.ts +49 -58
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -766,9 +766,9 @@ export declare type CanvasContextType = '2d' | 'webgl' | 'webgl2';
|
|
|
766
766
|
* of the ~1s performance snapshot.
|
|
767
767
|
*/
|
|
768
768
|
export declare interface CapabilityTransition {
|
|
769
|
-
capability:
|
|
769
|
+
capability: InputCapabilityKey | 'cv';
|
|
770
770
|
/** Present when `capability` is `'cv'`. */
|
|
771
|
-
cvType?:
|
|
771
|
+
cvType?: CVFeatureKey;
|
|
772
772
|
/** Present when `capability` is `'cv'` — which CV level transitioned. */
|
|
773
773
|
level?: 'active' | 'meaningful';
|
|
774
774
|
/** The new state. */
|
|
@@ -937,6 +937,13 @@ export declare interface CountPair {
|
|
|
937
937
|
falseCount: number;
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
+
/**
|
|
941
|
+
* Runtime-enumerable identifiers for the computer-vision features. These are the
|
|
942
|
+
* keys under the `cv` member of {@link SceneCapabilities}, {@link FrameCapabilities},
|
|
943
|
+
* and {@link PeriodCapabilityCounts}.
|
|
944
|
+
*/
|
|
945
|
+
export declare const CV_FEATURE_KEYS: readonly ["faceDetection", "faceMesh", "emotion", "handTracking", "poseDetection", "segmentation"];
|
|
946
|
+
|
|
940
947
|
/** Per-CV-feature live activity: `active` = model loaded + first inference completed (cost is being paid); `meaningful` = last result was non-empty. */
|
|
941
948
|
export declare interface CVActivity {
|
|
942
949
|
/** Feature is running/inferring (model loaded, first inference completed). */
|
|
@@ -951,6 +958,9 @@ export declare interface CVActivity {
|
|
|
951
958
|
*/
|
|
952
959
|
declare type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation' | 'emotionDetection';
|
|
953
960
|
|
|
961
|
+
/** A single CV feature identifier. @see {@link CV_FEATURE_KEYS} */
|
|
962
|
+
export declare type CVFeatureKey = typeof CV_FEATURE_KEYS[number];
|
|
963
|
+
|
|
954
964
|
/**
|
|
955
965
|
* Computer-vision processing rate relative to the input video stream rate.
|
|
956
966
|
* `'full'` runs CV on every delivered video frame, `'half'` every other frame,
|
|
@@ -1234,25 +1244,13 @@ export declare interface FaceData {
|
|
|
1234
1244
|
* capabilities (audio/video/sensors/devices) reflect `isConnected`;
|
|
1235
1245
|
* interaction-class (mouse/keyboard/pointer/touch) reflect active use of the
|
|
1236
1246
|
* specific inputs the scene reads; CV reports `{active, meaningful}` per type.
|
|
1247
|
+
*
|
|
1248
|
+
* A flag per {@link INPUT_CAPABILITY_KEYS} entry, plus per-{@link CV_FEATURE_KEYS}
|
|
1249
|
+
* activity — derived from those arrays so it cannot drift from them.
|
|
1237
1250
|
*/
|
|
1238
|
-
export declare
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
mouse: boolean;
|
|
1242
|
-
keyboard: boolean;
|
|
1243
|
-
pointer: boolean;
|
|
1244
|
-
touch: boolean;
|
|
1245
|
-
sensors: boolean;
|
|
1246
|
-
devices: boolean;
|
|
1247
|
-
cv: {
|
|
1248
|
-
faceDetection: CVActivity;
|
|
1249
|
-
faceMesh: CVActivity;
|
|
1250
|
-
emotion: CVActivity;
|
|
1251
|
-
handTracking: CVActivity;
|
|
1252
|
-
poseDetection: CVActivity;
|
|
1253
|
-
segmentation: CVActivity;
|
|
1254
|
-
};
|
|
1255
|
-
}
|
|
1251
|
+
export declare type FrameCapabilities = Record<InputCapabilityKey, boolean> & {
|
|
1252
|
+
cv: Record<CVFeatureKey, CVActivity>;
|
|
1253
|
+
};
|
|
1256
1254
|
|
|
1257
1255
|
/** One per-frame performance + capability record. */
|
|
1258
1256
|
export declare interface FramePerfSample {
|
|
@@ -1417,6 +1415,21 @@ declare interface ImageParameter {
|
|
|
1417
1415
|
category: ParameterCategory;
|
|
1418
1416
|
}
|
|
1419
1417
|
|
|
1418
|
+
/**
|
|
1419
|
+
* Runtime-enumerable identifiers for the **input / interaction** capabilities
|
|
1420
|
+
* tracked live per rendered frame. This is the live capability vocabulary — the
|
|
1421
|
+
* keys of {@link FrameCapabilities} and {@link PeriodCapabilityCounts}, and the
|
|
1422
|
+
* single source of truth those types derive from.
|
|
1423
|
+
*
|
|
1424
|
+
* Note: `parameters` is intentionally absent. It is a *declared-only* tag on
|
|
1425
|
+
* {@link SceneCapabilities} (the scene defines tunable parameters), not a live
|
|
1426
|
+
* consumed signal, so it is not part of the per-frame capability set.
|
|
1427
|
+
*/
|
|
1428
|
+
export declare const INPUT_CAPABILITY_KEYS: readonly ["audio", "video", "mouse", "keyboard", "pointer", "touch", "sensors", "devices"];
|
|
1429
|
+
|
|
1430
|
+
/** A single input/interaction capability identifier. @see {@link INPUT_CAPABILITY_KEYS} */
|
|
1431
|
+
export declare type InputCapabilityKey = typeof INPUT_CAPABILITY_KEYS[number];
|
|
1432
|
+
|
|
1420
1433
|
export declare interface InstrumentSerialized {
|
|
1421
1434
|
mode: OnsetMode;
|
|
1422
1435
|
muted: boolean;
|
|
@@ -1720,43 +1733,17 @@ export declare interface PerformanceStats {
|
|
|
1720
1733
|
/**
|
|
1721
1734
|
* Per-capability frame counts over the report period. CV types report
|
|
1722
1735
|
* separate `active` and `meaningful` pairs.
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
faceDetection: {
|
|
1735
|
-
active: CountPair;
|
|
1736
|
-
meaningful: CountPair;
|
|
1737
|
-
};
|
|
1738
|
-
faceMesh: {
|
|
1739
|
-
active: CountPair;
|
|
1740
|
-
meaningful: CountPair;
|
|
1741
|
-
};
|
|
1742
|
-
emotion: {
|
|
1743
|
-
active: CountPair;
|
|
1744
|
-
meaningful: CountPair;
|
|
1745
|
-
};
|
|
1746
|
-
handTracking: {
|
|
1747
|
-
active: CountPair;
|
|
1748
|
-
meaningful: CountPair;
|
|
1749
|
-
};
|
|
1750
|
-
poseDetection: {
|
|
1751
|
-
active: CountPair;
|
|
1752
|
-
meaningful: CountPair;
|
|
1753
|
-
};
|
|
1754
|
-
segmentation: {
|
|
1755
|
-
active: CountPair;
|
|
1756
|
-
meaningful: CountPair;
|
|
1757
|
-
};
|
|
1758
|
-
};
|
|
1759
|
-
}
|
|
1736
|
+
*
|
|
1737
|
+
* A {@link CountPair} per {@link INPUT_CAPABILITY_KEYS} entry, plus active +
|
|
1738
|
+
* meaningful pairs per {@link CV_FEATURE_KEYS} — derived from those arrays so it
|
|
1739
|
+
* cannot drift from them.
|
|
1740
|
+
*/
|
|
1741
|
+
export declare type PeriodCapabilityCounts = Record<InputCapabilityKey, CountPair> & {
|
|
1742
|
+
cv: Record<CVFeatureKey, {
|
|
1743
|
+
active: CountPair;
|
|
1744
|
+
meaningful: CountPair;
|
|
1745
|
+
}>;
|
|
1746
|
+
};
|
|
1760
1747
|
|
|
1761
1748
|
/**
|
|
1762
1749
|
* Phase-Locked Loop for stable beat phase tracking
|
|
@@ -1898,6 +1885,10 @@ export declare type Resolution = {
|
|
|
1898
1885
|
* but a rarely-ambiguous case may show an extra one. Shader scenes are
|
|
1899
1886
|
* detected from built-in uniform usage (exact); native/p5 scenes from
|
|
1900
1887
|
* `viji.*` usage tokens.
|
|
1888
|
+
*
|
|
1889
|
+
* The input keys here are pinned to {@link INPUT_CAPABILITY_KEYS} and the `cv`
|
|
1890
|
+
* keys to {@link CV_FEATURE_KEYS} by a compile-time guard (below), so this shape
|
|
1891
|
+
* cannot drift from the runtime vocabulary.
|
|
1901
1892
|
*/
|
|
1902
1893
|
export declare interface SceneCapabilities {
|
|
1903
1894
|
/** Scene reads audio analysis (volume, bands, beat, FFT/waveform, or audio streams). */
|
|
@@ -2674,7 +2665,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
|
|
|
2674
2665
|
/** Returned by `on*` listener registration calls; invoke to unsubscribe. */
|
|
2675
2666
|
export declare type Unsubscribe = () => void;
|
|
2676
2667
|
|
|
2677
|
-
export declare const VERSION = "0.8.
|
|
2668
|
+
export declare const VERSION = "0.8.14";
|
|
2678
2669
|
|
|
2679
2670
|
/**
|
|
2680
2671
|
* Real-time video API: drawable frame, dimensions, and the source-side
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as s, C as o, I as E, V as i, a as A, b as C } from "./index-CI49eH6U.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
s as AudioSystem,
|
|
4
|
+
o as CV_FEATURE_KEYS,
|
|
5
|
+
E as INPUT_CAPABILITY_KEYS,
|
|
4
6
|
i as VERSION,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
A as VijiCore,
|
|
8
|
+
C as VijiCoreError
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=index.js.map
|