supervision 0.2.5 → 0.2.7
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/depth-preview-probe-DG7McQEN.js +314 -0
- package/dist/depth-preview-probe-DG7McQEN.js.map +1 -0
- package/dist/depth-preview-track-BvgwNEE9.js +612 -0
- package/dist/depth-preview-track-BvgwNEE9.js.map +1 -0
- package/dist/detections/chunked-detection-frame-source.d.ts.map +1 -1
- package/dist/editing.d.ts +1 -1
- package/dist/editing.d.ts.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9845 -4759
- package/dist/index.js.map +1 -1
- package/dist/mask-preparation.worker.js +788 -25
- package/dist/mask-preparation.worker.js.map +1 -1
- package/dist/media/decoder-deadline.d.ts +18 -0
- package/dist/media/decoder-deadline.d.ts.map +1 -0
- package/dist/media/depth-preview-probe.d.ts +65 -0
- package/dist/media/depth-preview-probe.d.ts.map +1 -0
- package/dist/media/depth-preview-track.d.ts +96 -0
- package/dist/media/depth-preview-track.d.ts.map +1 -0
- package/dist/media/media-normalization.d.ts.map +1 -1
- package/dist/media/media-source.d.ts +7 -0
- package/dist/media/media-source.d.ts.map +1 -1
- package/dist/media/mediabunny-frame-clock.d.ts +7 -0
- package/dist/media/mediabunny-frame-clock.d.ts.map +1 -0
- package/dist/media/mediabunny-media-source.d.ts +3 -0
- package/dist/media/mediabunny-media-source.d.ts.map +1 -1
- package/dist/media/track-frame-index.d.ts +14 -0
- package/dist/media/track-frame-index.d.ts.map +1 -0
- package/dist/media/video-engine-media-source.d.ts.map +1 -1
- package/dist/media/video-engine-media-source.js +1 -1
- package/dist/render-preparation/depth/clip-preview.d.ts +41 -0
- package/dist/render-preparation/depth/clip-preview.d.ts.map +1 -0
- package/dist/render-preparation/depth/clip-timing.d.ts +18 -0
- package/dist/render-preparation/depth/clip-timing.d.ts.map +1 -0
- package/dist/render-preparation/depth/clip.d.ts +14 -0
- package/dist/render-preparation/depth/clip.d.ts.map +1 -0
- package/dist/render-preparation/depth/exact-at-rest.d.ts +44 -0
- package/dist/render-preparation/depth/exact-at-rest.d.ts.map +1 -0
- package/dist/render-preparation/depth/exact-playback.d.ts +40 -0
- package/dist/render-preparation/depth/exact-playback.d.ts.map +1 -0
- package/dist/render-preparation/depth/files.d.ts +55 -0
- package/dist/render-preparation/depth/files.d.ts.map +1 -0
- package/dist/render-preparation/depth/frame-decode.d.ts +20 -0
- package/dist/render-preparation/depth/frame-decode.d.ts.map +1 -0
- package/dist/render-preparation/depth/frame-preparer.d.ts +51 -0
- package/dist/render-preparation/depth/frame-preparer.d.ts.map +1 -0
- package/dist/render-preparation/depth/frame-window.d.ts +146 -0
- package/dist/render-preparation/depth/frame-window.d.ts.map +1 -0
- package/dist/render-preparation/depth/options.d.ts +37 -0
- package/dist/render-preparation/depth/options.d.ts.map +1 -0
- package/dist/render-preparation/depth/png16.d.ts +40 -0
- package/dist/render-preparation/depth/png16.d.ts.map +1 -0
- package/dist/render-preparation/depth/preview-luma-copier.d.ts +12 -0
- package/dist/render-preparation/depth/preview-luma-copier.d.ts.map +1 -0
- package/dist/render-preparation/depth/preview-luma.d.ts +48 -0
- package/dist/render-preparation/depth/preview-luma.d.ts.map +1 -0
- package/dist/render-preparation/depth/source.d.ts +123 -0
- package/dist/render-preparation/depth/source.d.ts.map +1 -0
- package/dist/render-preparation/depth/worker-protocol.d.ts +76 -0
- package/dist/render-preparation/depth/worker-protocol.d.ts.map +1 -0
- package/dist/render-preparation/mask-frame-artifact.d.ts +10 -0
- package/dist/render-preparation/mask-frame-artifact.d.ts.map +1 -1
- package/dist/render-preparation/mask-frame-compositor.d.ts +2 -1
- package/dist/render-preparation/mask-frame-compositor.d.ts.map +1 -1
- package/dist/render-preparation/mask-frame-preparer.d.ts.map +1 -1
- package/dist/render-preparation/mask-outline-paths.d.ts +3 -0
- package/dist/render-preparation/mask-outline-paths.d.ts.map +1 -0
- package/dist/render-preparation/mask-preparation-worker-protocol.d.ts +2 -1
- package/dist/render-preparation/mask-preparation-worker-protocol.d.ts.map +1 -1
- package/dist/render-preparation/playhead-motion.d.ts +67 -0
- package/dist/render-preparation/playhead-motion.d.ts.map +1 -0
- package/dist/render-preparation/prepared-render-window.d.ts +12 -0
- package/dist/render-preparation/prepared-render-window.d.ts.map +1 -1
- package/dist/renderers/depth-textures.d.ts +79 -0
- package/dist/renderers/depth-textures.d.ts.map +1 -0
- package/dist/renderers/detection-render-order.d.ts +4 -0
- package/dist/renderers/detection-render-order.d.ts.map +1 -0
- package/dist/renderers/id-mask-stroke-coverage.d.ts +3 -0
- package/dist/renderers/id-mask-stroke-coverage.d.ts.map +1 -0
- package/dist/renderers/media-renderer-core.d.ts.map +1 -1
- package/dist/renderers/media-renderer-scene.d.ts +16 -2
- package/dist/renderers/media-renderer-scene.d.ts.map +1 -1
- package/dist/renderers/pixi-batch-texture-bindings.d.ts +9 -0
- package/dist/renderers/pixi-batch-texture-bindings.d.ts.map +1 -0
- package/dist/renderers/pixi-box-layer.d.ts +1 -0
- package/dist/renderers/pixi-box-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-depth-layer.d.ts +76 -0
- package/dist/renderers/pixi-depth-layer.d.ts.map +1 -0
- package/dist/renderers/pixi-depth-shader.d.ts +76 -0
- package/dist/renderers/pixi-depth-shader.d.ts.map +1 -0
- package/dist/renderers/pixi-focus-layer.d.ts +1 -0
- package/dist/renderers/pixi-focus-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-frame-present.d.ts +1 -0
- package/dist/renderers/pixi-frame-present.d.ts.map +1 -1
- package/dist/renderers/pixi-id-mask-shader.d.ts +1 -0
- package/dist/renderers/pixi-id-mask-shader.d.ts.map +1 -1
- package/dist/renderers/pixi-interaction-layer.d.ts +1 -1
- package/dist/renderers/pixi-interaction-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-interaction-presentation-layer.d.ts +1 -0
- package/dist/renderers/pixi-interaction-presentation-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-brush-preview.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-halo.d.ts +1 -0
- package/dist/renderers/pixi-mask-halo.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-layer.d.ts +8 -2
- package/dist/renderers/pixi-mask-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-screen-stroke.d.ts +17 -0
- package/dist/renderers/pixi-mask-screen-stroke.d.ts.map +1 -0
- package/dist/renderers/pixi-media-scene.d.ts.map +1 -1
- package/dist/renderers/pixi-region-coverage-mask.d.ts +1 -0
- package/dist/renderers/pixi-region-coverage-mask.d.ts.map +1 -1
- package/dist/renderers/pixi-region-layer.d.ts +1 -0
- package/dist/renderers/pixi-region-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-scene-layer-slot.d.ts +1 -0
- package/dist/renderers/pixi-scene-layer-slot.d.ts.map +1 -1
- package/dist/renderers/pixi-vector-layer.d.ts +1 -0
- package/dist/renderers/pixi-vector-layer.d.ts.map +1 -1
- package/dist/renderers/prepared-annotation-window.d.ts +1 -0
- package/dist/renderers/prepared-annotation-window.d.ts.map +1 -1
- package/dist/renderers/render-preparation-report.d.ts +23 -0
- package/dist/renderers/render-preparation-report.d.ts.map +1 -0
- package/dist/sessions/media-session-defaults.d.ts.map +1 -1
- package/dist/sessions/media-session-state.d.ts.map +1 -1
- package/dist/sessions/media-session.d.ts.map +1 -1
- package/dist/tracking.worker.js +64 -0
- package/dist/tracking.worker.js.map +1 -1
- package/dist/types/media-depth.d.ts +55 -0
- package/dist/types/media-depth.d.ts.map +1 -0
- package/dist/types/media-renderer.d.ts +33 -0
- package/dist/types/media-renderer.d.ts.map +1 -1
- package/dist/types/media-session.d.ts +21 -0
- package/dist/types/media-session.d.ts.map +1 -1
- package/dist/types/render-preparation.d.ts +105 -3
- package/dist/types/render-preparation.d.ts.map +1 -1
- package/dist/{video-engine-media-source-DR-x1UfK.js → video-engine-media-source-DOFsuGS4.js} +35 -29
- package/dist/video-engine-media-source-DOFsuGS4.js.map +1 -0
- package/dist/web-video-engine/analysis.js +6 -43
- package/dist/web-video-engine/cache-budget.d.ts +4 -7
- package/dist/web-video-engine/constants.d.ts +3 -4
- package/dist/web-video-engine/create-scrub-cursor.d.ts +1 -0
- package/dist/web-video-engine/decode-resolution-fynpRIAG.js +109 -0
- package/dist/web-video-engine/decode-scheduler.d.ts +1 -0
- package/dist/web-video-engine/engine-core.d.ts +4 -2
- package/dist/web-video-engine/engine.js +8 -6
- package/dist/web-video-engine/engine.worker.js +164 -66
- package/dist/web-video-engine/frame-cache.d.ts +9 -0
- package/dist/web-video-engine/frame-index.d.ts +1 -0
- package/dist/web-video-engine/frame-index.js +97 -0
- package/dist/web-video-engine/{frame-timeline-DreEwsRY.js → frame-timeline-CYgzzmpA.js} +1 -109
- package/dist/web-video-engine/frame-timeline-reader.d.ts +21 -0
- package/dist/web-video-engine/video-engine.d.ts +9 -4
- package/node_modules/supervision-js-core/THIRD_PARTY_NOTICES.md +132 -0
- package/node_modules/supervision-js-core/dist/detections/buffered-detection-timeline.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.d.ts +8 -3
- package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.js +1172 -70
- package/node_modules/supervision-js-core/dist/index.js.map +1 -1
- package/node_modules/supervision-js-core/dist/interactions/annotation-editing-engine.d.ts +2 -2
- package/node_modules/supervision-js-core/dist/interactions/annotation-editing-engine.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/interactions/annotation-handles.d.ts +2 -2
- package/node_modules/supervision-js-core/dist/interactions/annotation-handles.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/interactions/detection-picker.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/interactions/viewport-controller.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-presentation.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-registry.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts +50 -3
- package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/depth-map.d.ts +203 -0
- package/node_modules/supervision-js-core/dist/types/depth-map.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/types/detections.d.ts +2 -1
- package/node_modules/supervision-js-core/dist/types/detections.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/editing.d.ts +9 -0
- package/node_modules/supervision-js-core/dist/types/editing.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/interaction.d.ts +4 -0
- package/node_modules/supervision-js-core/dist/types/interaction.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/mask-style.d.ts +3 -0
- package/node_modules/supervision-js-core/dist/types/mask-style.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +3 -0
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/viewport.d.ts +3 -0
- package/node_modules/supervision-js-core/dist/types/viewport.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/utils/depth-color-mapping.d.ts +91 -0
- package/node_modules/supervision-js-core/dist/utils/depth-color-mapping.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/utils/depth-colormap-tables.d.ts +30 -0
- package/node_modules/supervision-js-core/dist/utils/depth-colormap-tables.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/utils/depth-colormaps.d.ts +16 -0
- package/node_modules/supervision-js-core/dist/utils/depth-colormaps.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/utils/depth-manifest.d.ts +23 -0
- package/node_modules/supervision-js-core/dist/utils/depth-manifest.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/utils/depth-readout.d.ts +14 -0
- package/node_modules/supervision-js-core/dist/utils/depth-readout.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts +21 -0
- package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts +3 -7
- package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts.map +1 -1
- package/node_modules/supervision-js-core/package.json +2 -1
- package/package.json +6 -1
- package/dist/video-engine-media-source-DR-x1UfK.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-preparation-worker-protocol.d.ts","sourceRoot":"","sources":["../../src/render-preparation/mask-preparation-worker-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,EAChC,MAAM,uBAAuB,CAAC;AAE/B,oBAAY,gCAAgC;IAC1C,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,iEAAiE;IACjE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,aAAa,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,2BAA2B,GACnC,CAAC,iCAAiC,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B,CAAC,GACF,CAAC,iCAAiC,GAAG;IACnC,QAAQ,CAAC,IA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AQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACnD,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC,QAAQ,CAAC;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC;CACvD;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC;CACvD;AAED,MAAM,MAAM,4BAA4B,GAAG,mCAAmC,CAAC;AAE/E,MAAM,MAAM,6BAA6B,GACrC,oCAAoC,GACpC,iCAAiC,GACjC,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"mask-preparation-worker-protocol.d.ts","sourceRoot":"","sources":["../../src/render-preparation/mask-preparation-worker-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,EAChC,MAAM,uBAAuB,CAAC;AAE/B,oBAAY,gCAAgC;IAC1C,QAAQ,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K,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC;CACvD;AAED,MAAM,MAAM,4BAA4B,GAAG,mCAAmC,CAAC;AAE/E,MAAM,MAAM,6BAA6B,GACrC,oCAAoC,GACpC,iCAAiC,GACjC,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the playhead is moving, read from where it lands: playing forward at a
|
|
3
|
+
* cadence, dragged, or stepped, and which way. Every prepared window that
|
|
4
|
+
* works ahead of the playhead reads it here, so a drag or a fast rate reads
|
|
5
|
+
* the same to each.
|
|
6
|
+
*/
|
|
7
|
+
/** The widest stride a present is taken to move: 8x of a 30 fps clip on 60 Hz. */
|
|
8
|
+
export declare const MAX_PRESENTED_FRAME_STRIDE = 4;
|
|
9
|
+
/**
|
|
10
|
+
* Share of a window spent the way the playhead is heading, as the engine's
|
|
11
|
+
* scrub window spends it. The rest covers the ground just behind, which is
|
|
12
|
+
* what a reversal lands on before the new heading is established.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WINDOW_LEAD_FRACTION = 0.75;
|
|
15
|
+
export interface PlayheadMotion {
|
|
16
|
+
/**
|
|
17
|
+
* The playhead landed at `position`. `settledAdvance` is the widest
|
|
18
|
+
* forward step playback makes, in the same unit; a move past it, or any
|
|
19
|
+
* move back, is a jump.
|
|
20
|
+
*/
|
|
21
|
+
observe(position: number, settledAdvance: number): void;
|
|
22
|
+
/**
|
|
23
|
+
* False while the playhead is dragged: it jumped twice in a row. A single
|
|
24
|
+
* jump is a seek that lands, and the window may lead it at once.
|
|
25
|
+
*/
|
|
26
|
+
readonly settled: boolean;
|
|
27
|
+
/** Which way the playhead travels: 1, -1, or 0 without enough to say. */
|
|
28
|
+
heading(): -1 | 0 | 1;
|
|
29
|
+
/** Playback started or stopped: the gesture that moved the playhead is over. */
|
|
30
|
+
endGesture(): void;
|
|
31
|
+
}
|
|
32
|
+
export declare function createPlayheadMotion(now?: () => number): PlayheadMotion;
|
|
33
|
+
/**
|
|
34
|
+
* How many frames each present moves, from the last few that moved. A
|
|
35
|
+
* cadence counts only once it has repeated, which is what separates it from
|
|
36
|
+
* a seek.
|
|
37
|
+
*/
|
|
38
|
+
export interface PresentedFrameStride {
|
|
39
|
+
observe(step: number): void;
|
|
40
|
+
/** The narrowest of the repeated strides, 1 until there are enough. */
|
|
41
|
+
narrowest(): number;
|
|
42
|
+
/** How far presents move on average, 1 until there are enough. */
|
|
43
|
+
average(): number;
|
|
44
|
+
/**
|
|
45
|
+
* The stride every recent present moved, or 1 when they differ: a cadence
|
|
46
|
+
* that alternates lands on frames no single stride names.
|
|
47
|
+
*/
|
|
48
|
+
uniform(): number;
|
|
49
|
+
reset(): void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `sampleCount` is how many moves a cadence has to repeat over. A cadence
|
|
53
|
+
* that is not a whole number of frames, 3.2 at 8x of 24 fps on 60 Hz, moves
|
|
54
|
+
* 3, 3, 3, 3 and then 4, so a reading that skips frames on it needs more
|
|
55
|
+
* than four moves to see that.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createPresentedFrameStride(sampleCount?: number): PresentedFrameStride;
|
|
58
|
+
/**
|
|
59
|
+
* The playhead's own frame plus one schedule batch ahead. A batch is the most
|
|
60
|
+
* a window commits to in one pass, so a resting playhead holds a single pass
|
|
61
|
+
* of work, and a step forward still lands on a frame already prepared.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getPausedPreparedWindowFrameCount(options: {
|
|
64
|
+
readonly prefetchFrameCount: number;
|
|
65
|
+
readonly scheduleBatchSize: number;
|
|
66
|
+
}): number;
|
|
67
|
+
//# sourceMappingURL=playhead-motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playhead-motion.d.ts","sourceRoot":"","sources":["../../src/render-preparation/playhead-motion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,kFAAkF;AAClF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAS5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACxD;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,gFAAgF;IAChF,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAClC,GAAG,GAAE,MAAM,MAAgC,GAC1C,cAAc,CA+EhB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,SAAS,IAAI,MAAM,CAAC;IACpB,kEAAkE;IAClE,OAAO,IAAI,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,IAAI,MAAM,CAAC;IAClB,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,SAAsC,GAChD,oBAAoB,CAqBtB;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE;IACzD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC,UAEA"}
|
|
@@ -5,6 +5,11 @@ import { type BufferedDetectionTimeline } from "supervision-js-core";
|
|
|
5
5
|
import type { DetectionFrame } from "supervision-js-core";
|
|
6
6
|
import type { MaskStyle } from "supervision-js-core";
|
|
7
7
|
import { RenderPreparationArtifactKind, type RenderPreparationOptions, type ResolvedRenderPreparationGateThresholds } from "#types/render-preparation";
|
|
8
|
+
export declare enum PreparedRasterTier {
|
|
9
|
+
Coarse = "coarse",
|
|
10
|
+
Fine = "fine"
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_MASK_SCHEDULE_BATCH_SIZE = 2;
|
|
8
13
|
export interface PreparedRenderFrame {
|
|
9
14
|
readonly detectionFrame: DetectionFrame;
|
|
10
15
|
readonly key: string;
|
|
@@ -19,6 +24,10 @@ export declare enum PreparedRenderFrameMaskStatus {
|
|
|
19
24
|
}
|
|
20
25
|
export interface PreparedRenderWindow {
|
|
21
26
|
getFrame(mediaTime: number): PreparedRenderFrame | undefined;
|
|
27
|
+
/** Revision of the prepared artifact, including replacements at the same time. */
|
|
28
|
+
getArtifactRevision(mediaTime: number): number;
|
|
29
|
+
/** Recooks the active frame and its targets after the display raster size changes. */
|
|
30
|
+
invalidateRasterSize(): void;
|
|
22
31
|
/**
|
|
23
32
|
* Whether this window's artifact for a media time is cooked, scheduling
|
|
24
33
|
* nothing. True when there is nothing to cook: no style, no frame there.
|
|
@@ -65,6 +74,9 @@ export declare function createPreparedRenderWindow(options: {
|
|
|
65
74
|
readonly detectionTimeline: BufferedDetectionTimeline;
|
|
66
75
|
readonly maskStyle?: MaskStyle | null;
|
|
67
76
|
readonly maxMaskFrameCacheSize?: number;
|
|
77
|
+
readonly maxMaskFrameCacheBytes?: number;
|
|
78
|
+
/** Reserves renderer backing before a prepared frame can be drawn. */
|
|
79
|
+
readonly resolveMaskFrameBackingBytes?: (frame: PreparedMaskFrame) => number;
|
|
68
80
|
readonly onMaskFrameEvicted?: (key: string) => void;
|
|
69
81
|
readonly onMaskFramePrepared?: (maskFrame: PreparedMaskFrame) => void;
|
|
70
82
|
readonly onMaskFramesCleared?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-render-window.d.ts","sourceRoot":"","sources":["../../src/render-preparation/prepared-render-window.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"prepared-render-window.d.ts","sourceRoot":"","sources":["../../src/render-preparation/prepared-render-window.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAOxG,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAGL,6BAA6B,EAI7B,KAAK,wBAAwB,EAC7B,KAAK,uCAAuC,EAC7C,MAAM,2BAA2B,CAAC;AAMnC,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AA8BD,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAqBlD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAC;CACpD;AAED,oBAAY,6BAA6B;IACvC,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAC;IAC7D,kFAAkF;IAClF,mBAAmB,CAAC,SAAS,EAA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,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,sEAAsE;IACtE,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,CAAC;IAC7E,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1C,8DAA8D;IAC9D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,iCAAiC,CAAC,EAAE,MAAM,CAAC;IACpD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE;QACvC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;QAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;QAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,KAAK,SAAS,2BAA2B,EAAE,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CAC3D,GAAG,oBAAoB,CA+pDvB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { DepthColormap, DepthMap } from "supervision-js-core";
|
|
2
|
+
import type { BufferImageSource as PixiBufferImageSource } from "pixi.js";
|
|
3
|
+
export type DepthTextureFormat = "rg8unorm" | "r8unorm";
|
|
4
|
+
export type DepthBufferImageSourceConstructor = new (options: {
|
|
5
|
+
alphaMode?: "no-premultiply-alpha";
|
|
6
|
+
autoGenerateMipmaps?: boolean;
|
|
7
|
+
dynamic: boolean;
|
|
8
|
+
format: DepthTextureFormat | "rgba8unorm";
|
|
9
|
+
height: number;
|
|
10
|
+
resource: Uint8Array;
|
|
11
|
+
scaleMode?: "linear" | "nearest";
|
|
12
|
+
width: number;
|
|
13
|
+
}) => PixiBufferImageSource;
|
|
14
|
+
export interface DepthTextureUpload {
|
|
15
|
+
readonly bytes: Uint8Array;
|
|
16
|
+
readonly format: DepthTextureFormat;
|
|
17
|
+
/** Texels per row, which can exceed the map width by row padding. */
|
|
18
|
+
readonly textureWidth: number;
|
|
19
|
+
}
|
|
20
|
+
export interface DepthDisplaySize {
|
|
21
|
+
readonly width: number;
|
|
22
|
+
readonly height: number;
|
|
23
|
+
}
|
|
24
|
+
export interface DepthMapUpload extends DepthTextureUpload {
|
|
25
|
+
readonly displaySize: DepthDisplaySize;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* With a `displaySize` smaller than the map, the bytes are a decimated copy;
|
|
29
|
+
* the map keeps its full samples for readouts.
|
|
30
|
+
*/
|
|
31
|
+
export declare function rememberPreparedDepthUpload(map: DepthMap, upload: DepthTextureUpload & {
|
|
32
|
+
readonly displaySize?: DepthDisplaySize;
|
|
33
|
+
}): void;
|
|
34
|
+
/**
|
|
35
|
+
* Exact samples go up as two unorm bytes per texel, low byte in red, and the
|
|
36
|
+
* shader rebuilds `red + 256 * green`. Pixi cannot upload a 16-bit integer
|
|
37
|
+
* texture on WebGL, and a half float cannot hold every 1/256 step.
|
|
38
|
+
* Every supported browser runs little-endian, where a `Uint16Array` already
|
|
39
|
+
* is those bytes, so aligned rows go up without a copy.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createPackedDepthUpload(values: Uint16Array, width: number, height: number, acceptsUnalignedRows: boolean): DepthTextureUpload;
|
|
42
|
+
export declare function createPreviewUpload(codes: Uint8Array, width: number, height: number, acceptsUnalignedRows: boolean): DepthTextureUpload;
|
|
43
|
+
/**
|
|
44
|
+
* A map larger than `maxTextureSize` on either side goes up as a
|
|
45
|
+
* nearest-decimated copy that fits; the full-resolution samples stay on the
|
|
46
|
+
* map for readouts.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createDepthMapUpload(map: DepthMap, acceptsUnalignedRows: boolean, maxTextureSize?: number): DepthMapUpload;
|
|
49
|
+
export interface DepthTextureSlot {
|
|
50
|
+
readonly source: PixiBufferImageSource;
|
|
51
|
+
readonly textureWidth: number;
|
|
52
|
+
/** The map size the texture holds, smaller than the map's when decimated. */
|
|
53
|
+
readonly displaySize: DepthDisplaySize;
|
|
54
|
+
}
|
|
55
|
+
export interface DepthTextureRing {
|
|
56
|
+
/**
|
|
57
|
+
* The texture holding `map`, uploading it into the stalest slot if needed.
|
|
58
|
+
* A slot holding a map in `keep` is reused only when every slot does.
|
|
59
|
+
*/
|
|
60
|
+
acquire(map: DepthMap, keep?: ReadonlySet<DepthMap>): DepthTextureSlot;
|
|
61
|
+
has(map: DepthMap): boolean;
|
|
62
|
+
destroy(): void;
|
|
63
|
+
}
|
|
64
|
+
export declare function createDepthTextureRing(options: {
|
|
65
|
+
readonly BufferImageSource: DepthBufferImageSourceConstructor;
|
|
66
|
+
readonly acceptsUnalignedTextureRows: () => boolean;
|
|
67
|
+
readonly maxTextureSize?: () => number;
|
|
68
|
+
readonly size?: number;
|
|
69
|
+
}): DepthTextureRing;
|
|
70
|
+
export declare function createDepthLutCache(BufferImageSource: DepthBufferImageSourceConstructor): {
|
|
71
|
+
get(name: DepthColormap): PixiBufferImageSource;
|
|
72
|
+
destroy(): void;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* An unreadable limit falls back to the minimum each backend guarantees:
|
|
76
|
+
* 2048 on WebGL 2, 8192 on WebGPU.
|
|
77
|
+
*/
|
|
78
|
+
export declare function queryMaxTextureSize(renderer: unknown): number;
|
|
79
|
+
//# sourceMappingURL=depth-textures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth-textures.d.ts","sourceRoot":"","sources":["../../src/render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AAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAmB7D"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DetectionFrame } from "supervision-js-core";
|
|
2
|
+
/** Dense ranks preserve zIndex and frame-order ties across retained shape layers. */
|
|
3
|
+
export declare function detectionRenderOrder(frame: DetectionFrame): readonly number[];
|
|
4
|
+
//# sourceMappingURL=detection-render-order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detection-render-order.d.ts","sourceRoot":"","sources":["../../src/renderers/detection-render-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAgB7E"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const idMaskStrokeCoverageGlsl = "\nfloat subtexelStrokeCoverage(float distance, float width, float pixelWidth) {\n \n return clamp(0.5 + (width - distance) / pixelWidth, 0.0, 1.0)\n - clamp(0.5 - (width + distance) / pixelWidth, 0.0, 1.0);\n\n}\n\nfloat neighborCellDistance(float offset, float position) {\n \n return max(max(offset - position, position - offset - 1.0), 0.0);\n\n}\n\nfloat strokeScanRadius(float maxWidth, float fractionalWidth, float pixelWidth) {\n \n if (fractionalWidth > 0.0) {\n return min(max(floor(maxWidth), ceil(fractionalWidth + pixelWidth * 0.5)), 16.0);\n }\n return min(floor(maxWidth), 16.0);\n\n}\n\nbool isBoundary(float centerId, vec2 texel) {\n return\n differs(sampleMaskId(vUV + vec2(texel.x, 0.0)), centerId) ||\n differs(sampleMaskId(vUV + vec2(-texel.x, 0.0)), centerId) ||\n differs(sampleMaskId(vUV + vec2(0.0, texel.y)), centerId) ||\n differs(sampleMaskId(vUV + vec2(0.0, -texel.y)), centerId);\n}\n\nfloat innerStrokeCoverage(float centerId, vec2 texel, vec2 cell, float width, float pixelWidth) {\n if (width >= 1.0) {\n return isBoundary(centerId, texel) ? 1.0 : 0.0;\n }\n\n float coverage = 0.0;\n if (differs(sampleMaskId(vUV + vec2(texel.x, 0.0)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(1.0 - cell.x, width, pixelWidth));\n }\n if (differs(sampleMaskId(vUV + vec2(-texel.x, 0.0)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(cell.x, width, pixelWidth));\n }\n if (differs(sampleMaskId(vUV + vec2(0.0, texel.y)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(1.0 - cell.y, width, pixelWidth));\n }\n if (differs(sampleMaskId(vUV + vec2(0.0, -texel.y)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(cell.y, width, pixelWidth));\n }\n return coverage;\n}\n\n// Descending offsets give the outer border its palette priority.\nvec2 findNeighborStroke(float centerId, vec2 texel, vec2 cell, float pixelWidth) {\n int radius = int(strokeScanRadius(uMaxStrokeWidth, uMaxFractionalStrokeWidth, pixelWidth));\n\n for (int offsetY = radius; offsetY >= -radius; offsetY -= 1) {\n for (int offsetX = radius; offsetX >= -radius; offsetX -= 1) {\n if (offsetX == 0 && offsetY == 0) {\n continue;\n }\n\n float maskId = sampleMaskId(vUV + vec2(float(offsetX), float(offsetY)) * texel);\n if (maskId < 0.5 || !differs(maskId, centerId)) {\n continue;\n }\n\n float width = readStrokeWidth(maskId);\n if (width >= 1.0) {\n float distance = max(abs(float(offsetX)), abs(float(offsetY)));\n if (width >= distance && readStroke(maskId).a > 0.0) {\n return vec2(maskId, 1.0);\n }\n } else if (width > 0.0 && readStroke(maskId).a > 0.0) {\n float distance = max(\n neighborCellDistance(float(offsetX), cell.x),\n neighborCellDistance(float(offsetY), cell.y)\n );\n float coverage = subtexelStrokeCoverage(distance, width, pixelWidth);\n if (coverage > 0.0) {\n return vec2(maskId, coverage);\n }\n }\n }\n }\n\n return vec2(0.0);\n}\n";
|
|
2
|
+
export declare const idMaskStrokeCoverageWgsl = "\nfn subtexelStrokeCoverage(distance: f32, width: f32, pixelWidth: f32) -> f32 {\n \n return clamp(0.5 + (width - distance) / pixelWidth, 0.0, 1.0)\n - clamp(0.5 - (width + distance) / pixelWidth, 0.0, 1.0);\n\n}\n\nfn neighborCellDistance(offset: f32, position: f32) -> f32 {\n \n return max(max(offset - position, position - offset - 1.0), 0.0);\n\n}\n\nfn strokeScanRadius(maxWidth: f32, fractionalWidth: f32, pixelWidth: f32) -> f32 {\n \n if (fractionalWidth > 0.0) {\n return min(max(floor(maxWidth), ceil(fractionalWidth + pixelWidth * 0.5)), 16.0);\n }\n return min(floor(maxWidth), 16.0);\n\n}\n\nfn isBoundary(uv: vec2<f32>, centerId: f32, texel: vec2<f32>) -> bool {\n return\n differs(sampleMaskId(uv + vec2<f32>(texel.x, 0.0)), centerId) ||\n differs(sampleMaskId(uv + vec2<f32>(-texel.x, 0.0)), centerId) ||\n differs(sampleMaskId(uv + vec2<f32>(0.0, texel.y)), centerId) ||\n differs(sampleMaskId(uv + vec2<f32>(0.0, -texel.y)), centerId);\n}\n\nfn innerStrokeCoverage(uv: vec2<f32>, centerId: f32, texel: vec2<f32>, cell: vec2<f32>, width: f32, pixelWidth: f32) -> f32 {\n if (width >= 1.0) {\n if (isBoundary(uv, centerId, texel)) {\n return 1.0;\n }\n return 0.0;\n }\n\n var coverage = 0.0;\n if (differs(sampleMaskId(uv + vec2<f32>(texel.x, 0.0)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(1.0 - cell.x, width, pixelWidth));\n }\n if (differs(sampleMaskId(uv + vec2<f32>(-texel.x, 0.0)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(cell.x, width, pixelWidth));\n }\n if (differs(sampleMaskId(uv + vec2<f32>(0.0, texel.y)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(1.0 - cell.y, width, pixelWidth));\n }\n if (differs(sampleMaskId(uv + vec2<f32>(0.0, -texel.y)), centerId)) {\n coverage = max(coverage, subtexelStrokeCoverage(cell.y, width, pixelWidth));\n }\n return coverage;\n}\n\n// Descending offsets give the outer border its palette priority.\nfn findNeighborStroke(uv: vec2<f32>, centerId: f32, texel: vec2<f32>, cell: vec2<f32>, pixelWidth: f32) -> vec2<f32> {\n let radius = i32(strokeScanRadius(maskUniforms.uMaxStrokeWidth, maskUniforms.uMaxFractionalStrokeWidth, pixelWidth));\n\n for (var offsetY = radius; offsetY >= -radius; offsetY -= 1) {\n for (var offsetX = radius; offsetX >= -radius; offsetX -= 1) {\n if (offsetX == 0 && offsetY == 0) {\n continue;\n }\n\n let maskId = sampleMaskId(uv + vec2<f32>(f32(offsetX), f32(offsetY)) * texel);\n if (maskId < 0.5 || !differs(maskId, centerId)) {\n continue;\n }\n\n let width = readStrokeWidth(maskId);\n if (width >= 1.0) {\n let distance = max(abs(f32(offsetX)), abs(f32(offsetY)));\n if (width >= distance && readStroke(maskId).a > 0.0) {\n return vec2<f32>(maskId, 1.0);\n }\n } else if (width > 0.0 && readStroke(maskId).a > 0.0) {\n let distance = max(\n neighborCellDistance(f32(offsetX), cell.x),\n neighborCellDistance(f32(offsetY), cell.y)\n );\n let coverage = subtexelStrokeCoverage(distance, width, pixelWidth);\n if (coverage > 0.0) {\n return vec2<f32>(maskId, coverage);\n }\n }\n }\n }\n\n return vec2<f32>(0.0);\n}\n";
|
|
3
|
+
//# sourceMappingURL=id-mask-stroke-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-mask-stroke-coverage.d.ts","sourceRoot":"","sources":["../../src/renderers/id-mask-stroke-coverage.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,wBAAwB,0jGA8EpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,+uGAiFpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-renderer-core.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-core.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-renderer-core.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-core.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAqC/B,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAOhC;;;;;;;GAOG;AACH,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,CASR;AAsBD,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,WAAW,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC9E;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,aAAa,CAAC,CA89CxB"}
|
|
@@ -3,7 +3,7 @@ import type { BoxStyle } from "supervision-js-core";
|
|
|
3
3
|
import type { BoxCornerStyle } from "supervision-js-core";
|
|
4
4
|
import type { EllipseStyle } from "supervision-js-core";
|
|
5
5
|
import type { BufferedDetectionTimeline, DetectionBufferState } from "supervision-js-core";
|
|
6
|
-
import type { DetectionLabelBounds, MediaFrameCapture, MediaFrameCaptureOptions, MediaRendererDiagnosticsOptions, MediaFrameRenderTimings, MediaRendererFit, MediaRendererPresentation } from "#types/media-renderer";
|
|
6
|
+
import type { DetectionLabelBounds, MediaFrameCapture, MediaFrameCaptureOptions, MediaRendererDiagnosticsOptions, MediaFrameRenderTimings, MediaRendererFit, MediaRendererPresentation, MediaRendererOptions } from "#types/media-renderer";
|
|
7
7
|
import type { DetectionPickResult, DetectionSelectionOptions, MediaInteractionOptions } from "supervision-js-core";
|
|
8
8
|
import type { FocusStyle } from "supervision-js-core";
|
|
9
9
|
import type { InteractionStyle } from "supervision-js-core";
|
|
@@ -12,19 +12,23 @@ import type { MaskHaloStyle, MaskStyle } from "supervision-js-core";
|
|
|
12
12
|
import type { MarkerStyle } from "supervision-js-core";
|
|
13
13
|
import type { OrientedBoxStyle } from "supervision-js-core";
|
|
14
14
|
import type { PercentageBarStyle } from "supervision-js-core";
|
|
15
|
-
import type { RegionAnnotationRenderer, HeatmapAnnotationRenderer, PolygonStyle, PolylineStyle, ShapeStyle, KeypointStyle } from "supervision-js-core";
|
|
15
|
+
import type { RegionAnnotationRenderer, DepthAnnotationRenderer, HeatmapAnnotationRenderer, PolygonStyle, PolylineStyle, ShapeStyle, KeypointStyle } from "supervision-js-core";
|
|
16
16
|
import type { MediaDisplayAdjustments } from "supervision-js-core";
|
|
17
17
|
import type { Point, ViewportTransform } from "supervision-js-core";
|
|
18
18
|
import type { AnnotationEditingEngine, AnnotationOverlayStyle, PreviewOverlayData } from "supervision-js-core";
|
|
19
19
|
import type { RenderPreparationOptions, ResolvedRenderPreparationGateThresholds } from "#types/render-preparation";
|
|
20
20
|
import type { MaskBrushPreviewOptions } from "#editing/mask-brush-editor";
|
|
21
|
+
import type { DepthFrameProvider } from "#render-preparation/depth/source";
|
|
22
|
+
import type { ActiveDepthMap } from "#types/media-depth";
|
|
21
23
|
import type { PresentedFrameSource } from "./presented-frame-channel";
|
|
22
24
|
import type { PreparedAnnotationWindowSnapshot } from "./prepared-annotation-window";
|
|
25
|
+
import type { MediaRendererDisplay } from "#types/media-renderer-display";
|
|
23
26
|
export interface MediaRendererSceneOptions {
|
|
24
27
|
readonly container: HTMLElement;
|
|
25
28
|
readonly backgroundColor: MediaRendererPresentation["backgroundColor"];
|
|
26
29
|
readonly fit: MediaRendererFit;
|
|
27
30
|
readonly maxDevicePixelRatio: number | undefined;
|
|
31
|
+
readonly pixelInspection?: MediaRendererOptions["pixelInspection"];
|
|
28
32
|
readonly detectionTimeline: BufferedDetectionTimeline;
|
|
29
33
|
readonly boxStyle: BoxStyle | null | undefined;
|
|
30
34
|
readonly boxCornerStyle: BoxCornerStyle | null | undefined;
|
|
@@ -46,6 +50,7 @@ export interface MediaRendererSceneOptions {
|
|
|
46
50
|
readonly keypointStyle: KeypointStyle | null | undefined;
|
|
47
51
|
readonly regionRenderers: readonly RegionAnnotationRenderer[];
|
|
48
52
|
readonly heatmapRenderers?: readonly HeatmapAnnotationRenderer[];
|
|
53
|
+
readonly depthRenderers?: readonly DepthAnnotationRenderer[];
|
|
49
54
|
readonly interaction: MediaInteractionOptions | undefined;
|
|
50
55
|
readonly interactionStyle: InteractionStyle | null | undefined;
|
|
51
56
|
readonly canInteract: () => boolean;
|
|
@@ -58,6 +63,8 @@ export interface MediaRendererSceneOptions {
|
|
|
58
63
|
readonly previewOverlay: (() => PreviewOverlayData | null) | undefined;
|
|
59
64
|
/** Propagates renderer-owned asynchronous visual changes into runtime state. */
|
|
60
65
|
readonly onPresentationUpdate?: (sample: PresentedMediaSample) => void;
|
|
66
|
+
/** Propagates the fitted display and pixel ratio to the decoder. */
|
|
67
|
+
readonly onDisplayChange?: (display: MediaRendererDisplay) => void;
|
|
61
68
|
/**
|
|
62
69
|
* Present plane of a media source that decides for itself which frame is on
|
|
63
70
|
* screen. Given one, the scene presents what the producer announces instead
|
|
@@ -108,6 +115,8 @@ export interface MediaRendererScene {
|
|
|
108
115
|
* again.
|
|
109
116
|
*/
|
|
110
117
|
setPlaybackActive?(active: boolean): void;
|
|
118
|
+
/** While a drag holds the playhead, work ahead of it follows the hand. */
|
|
119
|
+
setScrubbing?(scrubbing: boolean): void;
|
|
111
120
|
setTimelineContext?(context: MediaRendererSceneTimelineContext): void;
|
|
112
121
|
presentSample(sample: DecodedVideoSample): PresentedMediaSample;
|
|
113
122
|
/**
|
|
@@ -141,6 +150,11 @@ export interface MediaRendererScene {
|
|
|
141
150
|
zoomViewportFromWheel?(point: Point, deltaY: number): void;
|
|
142
151
|
setPresentation(presentation: MediaRendererPresentation, mediaTime: number): PresentedMediaSample | void;
|
|
143
152
|
setSelectedDetection?(selection: DetectionSelectionOptions | null, mediaTime: number): DetectionPickResult | null;
|
|
153
|
+
/** Redraws the frame on screen with the new depth; null removes it. */
|
|
154
|
+
setDepthSource?(source: DepthFrameProvider | null): void;
|
|
155
|
+
getActiveDepth?(): ActiveDepthMap | null;
|
|
156
|
+
/** Called on every playhead move, never from inside a present. */
|
|
157
|
+
prefetchDepth?(mediaTime: number): void;
|
|
144
158
|
destroy(): void;
|
|
145
159
|
}
|
|
146
160
|
export interface MediaRendererSceneTimelineContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-renderer-scene.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"media-renderer-scene.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,K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AE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,cAAc,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD,qBAAqB,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D,eAAe,CACb,YAAY,EAAE,yBAAyB,EACvC,SAAS,EAAE,MAAM,GAChB,oBAAoB,GAAG,IAAI,CAAC;IAC/B,oBAAoB,CAAC,CACnB,SAAS,EAAE,yBAAyB,GAAG,IAAI,EAC3C,SAAS,EAAE,MAAM,GAChB,mBAAmB,GAAG,IAAI,CAAC;IAC9B,uEAAuE;IACvE,cAAc,CAAC,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,IAAI,CAAC;IACzD,cAAc,CAAC,IAAI,cAAc,GAAG,IAAI,CAAC;IACzC,kEAAkE;IAClE,aAAa,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Renderer } from "pixi.js";
|
|
2
|
+
type PixiBatchResources = Pick<typeof import("pixi.js"), "BindGroup" | "Texture">;
|
|
3
|
+
/**
|
|
4
|
+
* Discarding video and heatmap textures leaves Pixi's global batch cache bound
|
|
5
|
+
* to them. This scene owns groups that retire with a texture or the scene.
|
|
6
|
+
*/
|
|
7
|
+
export declare function installPixiBatchTextureBindings(pixi: PixiBatchResources, renderer: Renderer): () => void;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=pixi-batch-texture-bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixi-batch-texture-bindings.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-batch-texture-bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,QAAQ,EAAiB,MAAM,SAAS,CAAC;AAE5E,KAAK,kBAAkB,GAAG,IAAI,CAC5B,cAAc,SAAS,CAAC,EACxB,WAAW,GAAG,SAAS,CACxB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,QAAQ,GACjB,MAAM,IAAI,CA8EZ"}
|
|
@@ -27,6 +27,7 @@ export declare function createPixiBoxLayer(options: {
|
|
|
27
27
|
readonly detectionTimeline: BufferedDetectionTimeline;
|
|
28
28
|
readonly boxStyle: BoxStyle | null | undefined;
|
|
29
29
|
readonly Container?: new () => PixiContainer;
|
|
30
|
+
readonly container?: PixiContainer;
|
|
30
31
|
readonly Graphics?: new () => PixiGraphics;
|
|
31
32
|
readonly resolveContextState?: (detection: Detection) => Partial<AnnotationStyleContext>;
|
|
32
33
|
}): PixiBoxLayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixi-box-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-box-layer.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{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AE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACxE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,aAAa,CAAC;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,YAAY,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAC7B,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,GAAG,YAAY,CA2If"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type DepthAnnotationRenderer } from "supervision-js-core";
|
|
2
|
+
import type { BufferImageSource as PixiBufferImageSource, Container as PixiContainer, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader } from "pixi.js";
|
|
3
|
+
import type { DepthFrameProvider } from "#render-preparation/depth/source";
|
|
4
|
+
import type { InjectedMeshConstructor, InjectedMeshGeometryConstructor, InjectedShaderFactory } from "#renderers/injected-pixi";
|
|
5
|
+
import type { ActiveDepthMap } from "#types/media-depth";
|
|
6
|
+
import type { ResolvedRenderPreparationGateThresholds } from "#types/render-preparation";
|
|
7
|
+
import { type DepthBufferImageSourceConstructor } from "./depth-textures";
|
|
8
|
+
import { createPixiDepthShaderRenderer } from "./pixi-depth-shader";
|
|
9
|
+
type PixiDepthMesh = PixiMesh<PixiMeshGeometry, PixiShader>;
|
|
10
|
+
type DepthShaderOptions = Parameters<typeof createPixiDepthShaderRenderer>[0];
|
|
11
|
+
/**
|
|
12
|
+
* All depth renderers share one upload of each map; a renderer change rewrites
|
|
13
|
+
* the shader's uniforms and uploads nothing. A media time with no map hides
|
|
14
|
+
* every mesh, so a stale map never sits over new pixels.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createPixiDepthLayer(options: {
|
|
17
|
+
readonly BufferImageSource: DepthBufferImageSourceConstructor;
|
|
18
|
+
readonly Container: new () => PixiContainer;
|
|
19
|
+
readonly ImageSource: DepthShaderOptions["ImageSource"];
|
|
20
|
+
readonly Mesh: InjectedMeshConstructor<PixiDepthMesh>;
|
|
21
|
+
readonly MeshGeometry: InjectedMeshGeometryConstructor;
|
|
22
|
+
readonly Shader: InjectedShaderFactory;
|
|
23
|
+
readonly UniformGroup: DepthShaderOptions["UniformGroup"];
|
|
24
|
+
readonly acceptsUnalignedTextureRows: () => boolean;
|
|
25
|
+
readonly maxTextureSize?: () => number;
|
|
26
|
+
readonly getMediaSize: () => {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Gives a texture its GPU copy now. Pixi otherwise creates one lazily, at
|
|
32
|
+
* the first render that draws it, which is inside a present.
|
|
33
|
+
*/
|
|
34
|
+
readonly prepareTexture?: (source: PixiBufferImageSource) => void;
|
|
35
|
+
readonly renderers: readonly DepthAnnotationRenderer[];
|
|
36
|
+
readonly source?: DepthFrameProvider | null;
|
|
37
|
+
readonly hidden?: boolean;
|
|
38
|
+
}): {
|
|
39
|
+
createContainer: () => PixiContainer<import("pixi.js").ContainerChild>;
|
|
40
|
+
setRenderers(next: readonly DepthAnnotationRenderer[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* Nothing draws, the playback gate stops waiting for depth and nothing
|
|
43
|
+
* decodes ahead. The source and what it decoded are kept.
|
|
44
|
+
*/
|
|
45
|
+
setHidden(next: boolean): void;
|
|
46
|
+
setDepthSource(next: DepthFrameProvider | null): void;
|
|
47
|
+
drawFrame(mediaTime: number): void;
|
|
48
|
+
getActiveDepth(): ActiveDepthMap | null;
|
|
49
|
+
prefetch(mediaTime: number): void;
|
|
50
|
+
/**
|
|
51
|
+
* Uploads the maps of the next frames into spare textures, so the
|
|
52
|
+
* presents that draw them only bind. Call it after a present, never in
|
|
53
|
+
* one: the frame on screen keeps its own texture.
|
|
54
|
+
*
|
|
55
|
+
* At a pace that is not a whole number of frames a present, a present
|
|
56
|
+
* moves the whole part or one more; those two frames are what go up.
|
|
57
|
+
*/
|
|
58
|
+
uploadAhead(mediaTime: number): void;
|
|
59
|
+
needsRenderPreparationWait(mediaTime: number, thresholds: ResolvedRenderPreparationGateThresholds): boolean;
|
|
60
|
+
waitForRenderPreparation(mediaTime: number, thresholds: ResolvedRenderPreparationGateThresholds, signal?: AbortSignal): Promise<void>;
|
|
61
|
+
getPreparationProgress(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the depth a draw of `mediaTime` would show is decoded, asking
|
|
64
|
+
* nothing to load. True where there is nothing to wait for.
|
|
65
|
+
*/
|
|
66
|
+
isArtifactPrepared(mediaTime: number): boolean;
|
|
67
|
+
getUploadCounts(): {
|
|
68
|
+
ahead: number;
|
|
69
|
+
inPresent: number;
|
|
70
|
+
};
|
|
71
|
+
getContentKey(): string;
|
|
72
|
+
destroy(): void;
|
|
73
|
+
};
|
|
74
|
+
export type PixiDepthLayer = ReturnType<typeof createPixiDepthLayer>;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=pixi-depth-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixi-depth-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-depth-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,uBAAuB,EAI7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,iBAAiB,IAAI,qBAAqB,EAC1C,SAAS,IAAI,aAAa,EAC1B,IAAI,IAAI,QAAQ,EAChB,YAAY,IAAI,gBAAgB,EAChC,MAAM,IAAI,UAAU,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAEV,kBAAkB,EACnB,M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AK,IAAI,CAAC;IAClE,QAAQ,CAAC,SAAS,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;;uBA4MsB,SAAS,uBAAuB,EAAE;IAIrD;;;OAGG;oBACa,OAAO;yBAIF,kBAAkB,GAAG,IAAI;yBAczB,MAAM;sBAiDT,cAAc,GAAG,IAAI;wBAInB,MAAM;IAI1B;;;;;;;OAOG;2BACoB,MAAM;0CAiChB,MAAM,cACL,uCAAuC,GAClD,OAAO;wCAQG,MAAM,cACL,uCAAuC,WAC1C,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC;8BAMU,MAAM;IAIhC;;;OAGG;kCAC2B,MAAM,GAAG,OAAO;;;;;qBAU7B,MAAM;;EAa1B;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type DepthAnnotationRenderer, type DepthColorMapping, type DepthMap } from "supervision-js-core";
|
|
2
|
+
import type { InjectedMeshConstructor, InjectedMeshGeometryConstructor, InjectedShaderFactory } from "#renderers/injected-pixi";
|
|
3
|
+
import type { ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, TextureSource as PixiTextureSource, UniformGroup as PixiUniformGroup } from "pixi.js";
|
|
4
|
+
type PixiDepthMesh = PixiMesh<PixiMeshGeometry, PixiShader>;
|
|
5
|
+
/**
|
|
6
|
+
* Relative jump between neighbouring samples above which the edge-aware
|
|
7
|
+
* filter treats them as two surfaces and keeps the nearest one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEPTH_EDGE_RATIO = 0.05;
|
|
10
|
+
type ImageSourceConstructor = new (options: {
|
|
11
|
+
autoGenerateMipmaps?: boolean;
|
|
12
|
+
dynamic: boolean;
|
|
13
|
+
height: number;
|
|
14
|
+
resource: HTMLCanvasElement;
|
|
15
|
+
scaleMode?: "linear" | "nearest";
|
|
16
|
+
width: number;
|
|
17
|
+
}) => PixiImageSource;
|
|
18
|
+
type UniformGroupConstructor = new (uniforms: Record<string, {
|
|
19
|
+
type: "f32";
|
|
20
|
+
value: number;
|
|
21
|
+
} | {
|
|
22
|
+
type: "vec2<f32>" | "vec4<f32>";
|
|
23
|
+
value: Float32Array;
|
|
24
|
+
}>) => PixiUniformGroup;
|
|
25
|
+
export interface DepthShaderUniforms {
|
|
26
|
+
readonly uEdgeRatio: number;
|
|
27
|
+
readonly uEncoding: number;
|
|
28
|
+
readonly uInnerOffset: number;
|
|
29
|
+
readonly uInvScale: number;
|
|
30
|
+
readonly uMapSize: Float32Array;
|
|
31
|
+
readonly uNearIsLow: number;
|
|
32
|
+
readonly uNoDepthColor: Float32Array;
|
|
33
|
+
readonly uNumerator: number;
|
|
34
|
+
readonly uOuterOffset: number;
|
|
35
|
+
readonly uPreviewHi: number;
|
|
36
|
+
readonly uPreviewLo: number;
|
|
37
|
+
/** The preview code that stands for `uPreviewHi`: 255, or 235 in TV range. */
|
|
38
|
+
readonly uPreviewTop: number;
|
|
39
|
+
readonly uRangeHi: number;
|
|
40
|
+
readonly uRangeLo: number;
|
|
41
|
+
readonly uReciprocal: number;
|
|
42
|
+
readonly uReservedMax: number;
|
|
43
|
+
readonly uSampling: number;
|
|
44
|
+
readonly uWipe: number;
|
|
45
|
+
}
|
|
46
|
+
export interface PixiDepthShaderRenderer {
|
|
47
|
+
readonly mesh: PixiDepthMesh;
|
|
48
|
+
render(depthTexture: PixiTextureSource, lutTexture: PixiTextureSource, uniforms: DepthShaderUniforms): void;
|
|
49
|
+
setOpacity(opacity: number): void;
|
|
50
|
+
hide(): void;
|
|
51
|
+
clearTexture(): void;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* `texels` is the size of the image the texture holds, smaller than the map
|
|
56
|
+
* when a map too large for the GPU went up decimated.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveDepthShaderUniforms(map: DepthMap, mapping: DepthColorMapping, renderer: DepthAnnotationRenderer, media: {
|
|
59
|
+
readonly width: number;
|
|
60
|
+
readonly height: number;
|
|
61
|
+
}, texels?: {
|
|
62
|
+
readonly width: number;
|
|
63
|
+
readonly height: number;
|
|
64
|
+
}): DepthShaderUniforms;
|
|
65
|
+
/** Opacity rides the mesh alpha, so changing it writes no uniform. */
|
|
66
|
+
export declare function createPixiDepthShaderRenderer(options: {
|
|
67
|
+
readonly ImageSource: ImageSourceConstructor;
|
|
68
|
+
readonly Mesh: InjectedMeshConstructor<PixiDepthMesh>;
|
|
69
|
+
readonly MeshGeometry: InjectedMeshGeometryConstructor;
|
|
70
|
+
readonly Shader: InjectedShaderFactory;
|
|
71
|
+
readonly UniformGroup: UniformGroupConstructor;
|
|
72
|
+
readonly mediaHeight: number;
|
|
73
|
+
readonly mediaWidth: number;
|
|
74
|
+
}): PixiDepthShaderRenderer;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=pixi-depth-shader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixi-depth-shader.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-depth-shader.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,uBAAuB,EACvB,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AASlC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QAAQ,EAChB,YAAY,IAAI,gBAAgB,EAChC,MAAM,IAAI,UAAU,EACpB,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EACjC,MAAM,SAAS,CAAC;AAEjB,KA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YAAY,EAAE,uBAAuB,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,GAAG,uBAAuB,CAmI1B"}
|
|
@@ -91,6 +91,7 @@ export interface PixiFocusLayer {
|
|
|
91
91
|
readonly height: number;
|
|
92
92
|
}): PixiContainer | PixiFocusGraphics;
|
|
93
93
|
drawFrame(context: PixiFocusLayerFrameContext): void;
|
|
94
|
+
releaseMaskTexture(texture: PixiTexture): void;
|
|
94
95
|
tick(timestamp: number): void;
|
|
95
96
|
setFocusStyle(focusStyle: FocusStyle | null | undefined): void;
|
|
96
97
|
destroy(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixi-focus-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-focus-layer.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAGnF,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI/D,OAAO,KAAK,EACV,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QAAQ,EAChB,YAAY,IAAI,gBAAgB,EAChC,MAAM,IAAI,UAAU,EACpB,OAAO,IAAI,WAAW,EACtB,YAAY,IAAI,gBAAgB,EACjC,MAAM,SAAS,CAAC;AAiBjB,KAAK,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;AAwB5D,KAAK,mBAAmB,GAAG,UAAU,iBAAiB,CAAC;AACvD,KAAK,oBAAoB,GAAG,UAAU,aAAa,CAAC;AACpD,KAAK,sBAAsB,GAAG,KAAK,OAAO,EAAE;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB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IACtC,SAAS,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACrD,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/C,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAC5B,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAAC,KACxC,OAAO,CAAC;CACd,GAAG,cAAc,CAkjBjB"}
|
|
@@ -14,6 +14,7 @@ type PresentedFrameStamp = Pick<PresentedVideoFrame, "frameId" | "mediaTimeS">;
|
|
|
14
14
|
* at a resting playhead both have a media time and no frame identity.
|
|
15
15
|
*/
|
|
16
16
|
export interface FramePresentLayers {
|
|
17
|
+
readonly drawDepth?: (mediaTime: number) => void;
|
|
17
18
|
readonly drawHeatmap?: (mediaTime: number) => void;
|
|
18
19
|
readonly drawMask: ((mediaTime: number, presentedFrameId: PresentedFrameId | null) => void) | undefined;
|
|
19
20
|
readonly drawBox: (mediaTime: number) => PixiBoxLayerState;
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