@vincentt-xr/sdk 2.0.0-alpha.7 → 2.0.0-alpha.8
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/GROUNDING.md +1109 -13
- package/dist/{DebuggerUI-BjOMr8q_.js → DebuggerUI-C-ldiozL.js} +1 -1
- package/dist/{DebuggerUI-B6bP6P9r.cjs → DebuggerUI-CWX5EtQv.cjs} +1 -1
- package/dist/FaceMeshRenderer-BEEXZwS6.cjs +158 -0
- package/dist/FaceMeshRenderer-UuH5sTXG.js +1322 -0
- package/dist/FaceRetouch-C7h7x9kd.js +683 -0
- package/dist/FaceRetouch-DqftT26Y.cjs +134 -0
- package/dist/GLTFLoader-C5q63sKO.js +1633 -0
- package/dist/GLTFLoader-Cb_CRwmG.cjs +1 -0
- package/dist/SegmentationOverlay-DQuW3dsc.js +133 -0
- package/dist/SegmentationOverlay-aWVod8Kl.cjs +1 -0
- package/dist/assets/cache.d.ts +99 -0
- package/dist/assets/estimate.d.ts +11 -0
- package/dist/assets/index.d.ts +7 -0
- package/dist/assets/loaders.d.ts +28 -0
- package/dist/assets/react.d.ts +33 -0
- package/dist/calibration/calibration.d.ts +70 -0
- package/dist/calibration/index.d.ts +6 -0
- package/dist/calibration/storage.d.ts +13 -0
- package/dist/calibration/types.d.ts +53 -0
- package/dist/calibration/useXRCalibration.d.ts +46 -0
- package/dist/camera/CameraPermissionGate.d.ts +26 -0
- package/dist/camera/devices.d.ts +26 -0
- package/dist/camera/index.d.ts +8 -0
- package/dist/camera/permission.d.ts +86 -0
- package/dist/camera/useCameraPermission.d.ts +35 -0
- package/dist/capabilities/detect.d.ts +45 -0
- package/dist/capabilities/index.d.ts +5 -0
- package/dist/capabilities/types.d.ts +120 -0
- package/dist/capabilities/useXRCapabilities.d.ts +18 -0
- package/dist/compat/environment.d.ts +5 -0
- package/dist/compat/index.d.ts +4 -0
- package/dist/compat/run.d.ts +18 -0
- package/dist/compat/scenarios.d.ts +10 -0
- package/dist/compat/types.d.ts +101 -0
- package/dist/components/BodyTracker/index.d.ts +9 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +33 -3
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +12 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
- package/dist/components/FaceMesh/index.d.ts +1 -1
- package/dist/components/GestureListener/index.d.ts +11 -0
- package/dist/components/HandTracker/index.d.ts +10 -0
- package/dist/components/HolisticTracker/index.d.ts +69 -0
- package/dist/components/HolisticTracker/settings.d.ts +58 -0
- package/dist/components/HolisticTracker/signals.d.ts +49 -0
- package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
- package/dist/components/IrisEffect/index.d.ts +51 -0
- package/dist/components/IrisEffect/settings.d.ts +117 -0
- package/dist/components/LipEffect/LipEffect.d.ts +7 -1
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +43 -7
- package/dist/components/LipEffect/LipEffects.d.ts +9 -0
- package/dist/components/LipEffect/defaults.d.ts +27 -4
- package/dist/components/LipEffect/index.d.ts +11 -3
- package/dist/components/LipEffect/settings.d.ts +271 -0
- package/dist/components/LipEffect/types.d.ts +56 -9
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +11 -0
- package/dist/components/LipEffect/uvGuide.d.ts +59 -0
- package/dist/components/PersonCutout/index.d.ts +50 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +1 -1
- package/dist/components/ScreenImage/index.d.ts +3 -1
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/source.d.ts +6 -0
- package/dist/components/ScreenImage/types.d.ts +18 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/constants/index.d.ts +4 -1
- package/dist/contexts-CO0sd4JQ.cjs +1 -0
- package/dist/{contexts-ByhzppYl.js → contexts-FzlnnMYD.js} +252 -246
- package/dist/coordinates/feed.d.ts +52 -0
- package/dist/coordinates/index.d.ts +5 -0
- package/dist/coordinates/spaces.d.ts +49 -0
- package/dist/coordinates/viewport.d.ts +22 -0
- package/dist/coordinates/world.d.ts +15 -0
- package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +14 -0
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/product-hotspots/index.d.ts +24 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +25 -0
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2057 -1687
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/entries/core.d.ts +18 -1
- package/dist/entries/face-effects.d.ts +11 -3
- package/dist/entries/low-level.d.ts +22 -3
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/tracking.d.ts +24 -1
- package/dist/face-effects.cjs +155 -1
- package/dist/face-effects.js +1134 -2197
- package/dist/gestures/definitions.d.ts +85 -0
- package/dist/gestures/detector.d.ts +87 -0
- package/dist/gestures/index.d.ts +8 -0
- package/dist/gestures/measures.d.ts +101 -0
- package/dist/gestures/settings.d.ts +49 -0
- package/dist/{getFaceInfo-C4QpCQIY.js → getFaceInfo-BkZfaQs-.js} +5 -5
- package/dist/{getFaceInfo-fA1bFBub.cjs → getFaceInfo-ahPxQFGu.cjs} +1 -1
- package/dist/hooks/selectors.d.ts +68 -1
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceInfo.d.ts +13 -1
- package/dist/hooks/useFaceInfos.d.ts +1 -1
- package/dist/hooks/useGesture.d.ts +32 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +7 -0
- package/dist/hooks/useXRSession/facade.d.ts +42 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +3 -1
- package/dist/hooks/useXRSession/registry.d.ts +14 -0
- package/dist/hooks/useXRSession/store.d.ts +52 -3
- package/dist/index--RgGzZ6X.cjs +47 -0
- package/dist/{index-VJ0SJwmG.js → index-CHVbH0hz.js} +4 -4
- package/dist/index-CeVkgsag.cjs +1 -0
- package/dist/index-CnGox6Xr.js +3054 -0
- package/dist/{index-ByoNj0QP.js → index-CsUdQ-pn.js} +113 -111
- package/dist/{index-BjmTe9eM.cjs → index-DKBAh6hV.cjs} +1 -1
- package/dist/index-DsZwTfG0.cjs +1 -0
- package/dist/index-Dw6tj2Mi.js +144 -0
- package/dist/index-OCPjOaeP.cjs +1 -0
- package/dist/{index-DXT3WccE.js → index-s9pF4zkG.js} +1065 -1101
- package/dist/internal-BYza1h8_.cjs +1 -0
- package/dist/{internal-Dmk1cTXq.js → internal-vsfNQycj.js} +15 -16
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +2 -2
- package/dist/iris/compute.d.ts +25 -0
- package/dist/iris/index.d.ts +4 -0
- package/dist/iris/lead.d.ts +19 -0
- package/dist/iris/types.d.ts +87 -0
- package/dist/landmarkMask-CbTFzBYG.js +224 -0
- package/dist/landmarkMask-u7es2k4X.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1085 -634
- package/dist/main.cjs +1 -1
- package/dist/main.js +1519 -465
- package/dist/measures-9dQPdw96.js +154 -0
- package/dist/measures-KfJzpvod.cjs +1 -0
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +1 -1
- package/dist/models/Face/index.d.ts +1 -1
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +1 -1
- package/dist/models/Holistic/index.d.ts +49 -0
- package/dist/models/Holistic/result.d.ts +68 -0
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/product/ProductDimensions.d.ts +16 -0
- package/dist/product/ProductHotspot.d.ts +16 -0
- package/dist/product/ProductViewer.d.ts +9 -0
- package/dist/product/details.d.ts +53 -0
- package/dist/product/index.d.ts +14 -0
- package/dist/product/loadModelViewer.d.ts +4 -0
- package/dist/product/types.d.ts +71 -0
- package/dist/product/useProductAr.d.ts +37 -0
- package/dist/product/useProductDetails.d.ts +60 -0
- package/dist/product.cjs +1 -0
- package/dist/product.js +414 -0
- package/dist/providers-C0Dlhh9Z.js +365 -0
- package/dist/providers-YNwkmNeK.cjs +62 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/{renderGroups-KZk6eRiY.js → renderGroups-CN1cGFUo.js} +1 -1
- package/dist/{renderGroups-80H3DpTl.cjs → renderGroups-O4KmaMl9.cjs} +1 -1
- package/dist/renderPasses-Cg-zqmEz.cjs +21 -0
- package/dist/renderPasses-NnKZVfBy.js +1460 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/screenTransform-BenfCtZt.js +44 -0
- package/dist/screenTransform-BiXdpVf0.cjs +1 -0
- package/dist/segmentation-9PhSvc-R.cjs +1 -0
- package/dist/segmentation-CeOTKemr.js +5 -0
- package/dist/segmentation2d/faceMemory.d.ts +28 -0
- package/dist/segmentation2d/faceRegions.d.ts +24 -0
- package/dist/segmentation2d/index.d.ts +9 -0
- package/dist/segmentation2d/maskUv.d.ts +23 -0
- package/dist/segmentation2d/rasterize.d.ts +14 -0
- package/dist/segmentation2d/types.d.ts +46 -0
- package/dist/selectors-C5G1PMYL.js +195 -0
- package/dist/selectors-Du_PsVnW.cjs +1 -0
- package/dist/{session-CpkiK5YA.cjs → session-BBr0yN8h.cjs} +7 -7
- package/dist/{session-DLFN_VII.js → session-Cy0m7l7-.js} +76 -76
- package/dist/settings-DRR7-snV.cjs +1 -0
- package/dist/settings-aQk845NJ.js +73 -0
- package/dist/subjects/index.d.ts +2 -0
- package/dist/subjects/select.d.ts +62 -0
- package/dist/subjects/types.d.ts +55 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +1 -1
- package/dist/tracking.js +1056 -383
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +27 -2
- package/dist/types/segmentation.d.ts +19 -0
- package/dist/types/session.d.ts +41 -3
- package/dist/useFaceInfo-Blf7FCu3.js +303 -0
- package/dist/useFaceInfo-C5mO8NQY.cjs +1 -0
- package/dist/useXRCapabilities-B1R2ghy-.cjs +1 -0
- package/dist/useXRCapabilities-C68v__wB.js +30 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/integrity.d.ts +4 -1
- package/dist/utils/updateThrottle.d.ts +2 -0
- package/dist/utils/useStableUniforms.d.ts +18 -0
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/camera-permission.mdx +142 -0
- package/docs/api/coordinate-spaces.mdx +165 -0
- package/docs/api/cross-camera.mdx +88 -0
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/face-effects.mdx +6 -0
- package/docs/api/face-mesh.mdx +4 -2
- package/docs/api/gestures.mdx +173 -0
- package/docs/api/holistic-tracker.mdx +159 -0
- package/docs/api/iris-tracking.mdx +242 -0
- package/docs/api/multi-subject.mdx +95 -0
- package/docs/api/person-cutout.mdx +136 -0
- package/docs/api/product-ar.mdx +111 -0
- package/docs/api/product-details.mdx +78 -0
- package/docs/api/screen-space-coordinates.mdx +4 -1
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/trackers.mdx +5 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +23 -1
- package/docs/examples/lip-shaders.mdx +224 -0
- package/docs/guides/lip-effect-textures.mdx +292 -0
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -0
- package/package.json +13 -1
- package/dist/FaceMeshRenderer-C5l6VLdO.cjs +0 -155
- package/dist/FaceMeshRenderer-wjAHrJzP.js +0 -1270
- package/dist/FaceRetouch-BkJzoA79.cjs +0 -134
- package/dist/FaceRetouch-DwbKQJAN.js +0 -551
- package/dist/contexts-Dr62It_K.cjs +0 -1
- package/dist/index-9dlAQAhy.js +0 -1462
- package/dist/index-BpEf2BBb.cjs +0 -1
- package/dist/index-CyUUurQT.cjs +0 -1
- package/dist/index-DCiMbxC3.cjs +0 -1
- package/dist/index-DpI-qo5X.cjs +0 -17
- package/dist/index-DyVF4vEW.js +0 -111
- package/dist/internal-Cq-TEQ5Y.cjs +0 -1
- package/dist/renderLayers-lDtL0_43.cjs +0 -1
- package/dist/renderLayers-zrK2pv5O.js +0 -13
- package/dist/renderPasses-BOoBSr8z.cjs +0 -21
- package/dist/renderPasses-BcquyVtu.js +0 -1500
- package/dist/selectors-B8H97CKA.js +0 -59
- package/dist/selectors-CZLKT2Iv.cjs +0 -1
- package/dist/useFaceInfo-BJ8-_MOs.cjs +0 -1
- package/dist/useFaceInfo-Dk426LTu.js +0 -62
- package/dist/useFaceResults-CtetsO9M.js +0 -19
- package/dist/useFaceResults-wBJF3zyp.cjs +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FeedPoint, FeedSourceKind, PixelSize, SourceOrientation, SourcePoint } from './spaces';
|
|
2
|
+
/** A cover/contain fit of `source` into `destination`: scale and centred offset in destination pixels. */
|
|
3
|
+
export type FitLayout = {
|
|
4
|
+
scale: number;
|
|
5
|
+
drawWidth: number;
|
|
6
|
+
drawHeight: number;
|
|
7
|
+
offsetX: number;
|
|
8
|
+
offsetY: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Scale and centred offset that fits `source` into `destination`. `cover`
|
|
12
|
+
* fills the destination and crops the excess; `contain` shows all of the
|
|
13
|
+
* source and letterboxes. `zoom` (> 1) enlarges the draw rect about the
|
|
14
|
+
* centre, cropping more of the edges — the session's `cameraZoom`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const computeFitLayout: (source: PixelSize, destination: PixelSize, fit?: "cover" | "contain", zoom?: number) => FitLayout | null;
|
|
17
|
+
/**
|
|
18
|
+
* How the session turns a source frame into the feed: cover-crop to the
|
|
19
|
+
* render size, framing `zoom`, and a horizontal mirror for the webcam.
|
|
20
|
+
* This is the one description of that transform; the blit loop, the
|
|
21
|
+
* segmentation mask fit and every point conversion derive from it.
|
|
22
|
+
*/
|
|
23
|
+
export type FeedCrop = FitLayout & {
|
|
24
|
+
source: PixelSize;
|
|
25
|
+
feed: PixelSize;
|
|
26
|
+
zoom: number;
|
|
27
|
+
mirrored: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** The session mirrors the (front) webcam feed only; the rear camera, images and videos are drawn straight. An unknown kind is treated as the webcam. */
|
|
30
|
+
export declare const isMirroredSourceKind: (kind: FeedSourceKind) => boolean;
|
|
31
|
+
export declare const computeFeedCrop: ({ source, feed, zoom, mirrored, }: {
|
|
32
|
+
source: PixelSize;
|
|
33
|
+
feed: PixelSize;
|
|
34
|
+
zoom?: number;
|
|
35
|
+
mirrored?: boolean;
|
|
36
|
+
}) => FeedCrop | null;
|
|
37
|
+
/** Source pixel → feed normalized. Mirrors first (the session flips the frame before cropping). */
|
|
38
|
+
export declare const sourceToFeed: (point: SourcePoint, crop: FeedCrop, target?: FeedPoint) => FeedPoint;
|
|
39
|
+
/** Feed normalized → source pixel (the inverse of `sourceToFeed`; may fall outside the source when cropped). */
|
|
40
|
+
export declare const feedToSource: (point: FeedPoint, crop: FeedCrop, target?: SourcePoint) => SourcePoint;
|
|
41
|
+
/** True when a feed point lies inside the part of the source the crop kept. */
|
|
42
|
+
export declare const isFeedPointInSource: (point: FeedPoint, crop: FeedCrop) => boolean;
|
|
43
|
+
/** Flip a feed point horizontally (x → 1 − x). Positions in the feed never need this; use it for *direction* signs. */
|
|
44
|
+
export declare const mirrorFeedX: <P extends FeedPoint>(point: P, target?: FeedPoint) => FeedPoint;
|
|
45
|
+
/**
|
|
46
|
+
* Rotate a source pixel by the clockwise `orientation` the frame was given
|
|
47
|
+
* before use (a native capture delivered sideways). Returns the point in the
|
|
48
|
+
* rotated frame, whose size is `width`×`height` swapped for 90 / 270.
|
|
49
|
+
*/
|
|
50
|
+
export declare const orientSourcePoint: (point: SourcePoint, size: PixelSize, orientation: SourceOrientation, target?: SourcePoint) => SourcePoint;
|
|
51
|
+
/** Size of a frame after `orientSourcePoint`'s rotation. */
|
|
52
|
+
export declare const orientedSize: (size: PixelSize, orientation: SourceOrientation) => PixelSize;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { FeedPoint, FeedSourceKind, PixelSize, SourceOrientation, SourcePoint, ViewportPoint, } from './spaces';
|
|
2
|
+
export { computeFeedCrop, computeFitLayout, feedToSource, isFeedPointInSource, isMirroredSourceKind, mirrorFeedX, orientSourcePoint, orientedSize, sourceToFeed, } from './feed';
|
|
3
|
+
export type { FeedCrop, FitLayout } from './feed';
|
|
4
|
+
export { feedToWorld, trackerToWorld, worldToFeed, worldToTracker } from './world';
|
|
5
|
+
export { feedToScreenPixels, feedToTracker, feedToViewport, screenPixelsToFeed, trackerToFeed, viewportToFeed, } from './viewport';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The coordinate spaces a tracking consumer meets, named once.
|
|
3
|
+
*
|
|
4
|
+
* source ──cover-crop + zoom (+ mirror for webcam)──▶ feed ◀──identity per axis──▶ viewport
|
|
5
|
+
* │ │
|
|
6
|
+
* ▼ ▼
|
|
7
|
+
* tracker screen (design px)
|
|
8
|
+
* │
|
|
9
|
+
* ▼ (camera, z = 0 plane)
|
|
10
|
+
* world
|
|
11
|
+
*
|
|
12
|
+
* - **source**: the raw media frame (webcam, video, image) in pixels; top-left
|
|
13
|
+
* origin, Y down. Never mirrored.
|
|
14
|
+
* - **feed**: the session camera texture, i.e. the source cover-cropped to
|
|
15
|
+
* the render size with `cameraZoom` and, for the webcam only, mirrored.
|
|
16
|
+
* Normalized 0..1, top-left origin, Y down. Every landmark and every SDK
|
|
17
|
+
* mask lives here; MediaPipe's `z` rides along as tracker-relative depth.
|
|
18
|
+
* - **tracker**: feed remapped to center origin, X right, Y up, Z toward the
|
|
19
|
+
* viewer (`TrackerPoint`); what hand, body and holistic nodes publish.
|
|
20
|
+
* - **viewport**: the rendered canvas in CSS pixels, top-left, Y down. The
|
|
21
|
+
* feed fills it exactly, so feed and viewport agree per axis.
|
|
22
|
+
* - **screen**: SDK design pixels (720×1280 by default), center origin, Y up.
|
|
23
|
+
* - **world**: three.js world space; tracked content sits on the z = 0 plane.
|
|
24
|
+
*/
|
|
25
|
+
/** Pixel size of a frame or surface. */
|
|
26
|
+
export type PixelSize = {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
/** Source-media pixels: top-left origin, Y down, never mirrored. */
|
|
31
|
+
export type SourcePoint = {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
/** Feed (camera texture) coordinates, normalized 0..1, top-left origin, Y down; `z` optional depth. */
|
|
36
|
+
export type FeedPoint = {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
z?: number;
|
|
40
|
+
};
|
|
41
|
+
/** Viewport pixels: top-left origin, Y down. */
|
|
42
|
+
export type ViewportPoint = {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
/** The session media kinds; `undefined` is treated as the webcam. Only `webcam` (and undefined) is mirrored. */
|
|
47
|
+
export type FeedSourceKind = "webcam" | "rear-camera" | "image" | "video" | undefined;
|
|
48
|
+
/** Clockwise rotation applied to a source frame before it is used, in degrees. */
|
|
49
|
+
export type SourceOrientation = 0 | 90 | 180 | 270;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ScreenPixelPoint } from '../screen2d/coordinates';
|
|
2
|
+
import { ScreenTransformRoot } from '../screen2d/screenTransform';
|
|
3
|
+
import { TrackerPoint } from '../types/common';
|
|
4
|
+
import { FeedPoint, PixelSize, ViewportPoint } from './spaces';
|
|
5
|
+
/** Feed point → tracker point (center origin, Y up, Z toward the viewer). */
|
|
6
|
+
export declare const feedToTracker: (point: FeedPoint, target?: TrackerPoint) => TrackerPoint;
|
|
7
|
+
/** Tracker point → feed point. */
|
|
8
|
+
export declare const trackerToFeed: (point: TrackerPoint, target?: FeedPoint) => FeedPoint;
|
|
9
|
+
/** Feed point → viewport pixels. The feed fills the viewport, so this is a per-axis scale. */
|
|
10
|
+
export declare const feedToViewport: (point: FeedPoint, viewport: PixelSize, target?: ViewportPoint) => ViewportPoint;
|
|
11
|
+
/** Viewport pixels → feed point. */
|
|
12
|
+
export declare const viewportToFeed: (point: ViewportPoint, viewport: PixelSize, target?: FeedPoint) => FeedPoint;
|
|
13
|
+
/** Feed point → SDK design pixels (center origin, Y up). */
|
|
14
|
+
export declare const feedToScreenPixels: (point: FeedPoint, viewport: PixelSize, options?: {
|
|
15
|
+
root?: ScreenTransformRoot;
|
|
16
|
+
target?: ScreenPixelPoint;
|
|
17
|
+
}) => ScreenPixelPoint;
|
|
18
|
+
/** SDK design pixels → feed point. */
|
|
19
|
+
export declare const screenPixelsToFeed: (point: ScreenPixelPoint, viewport: PixelSize, options?: {
|
|
20
|
+
root?: ScreenTransformRoot;
|
|
21
|
+
target?: FeedPoint;
|
|
22
|
+
}) => FeedPoint;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TrackerPoint } from '../types/common';
|
|
2
|
+
import { FeedPoint } from './spaces';
|
|
3
|
+
import * as THREE from "three";
|
|
4
|
+
/**
|
|
5
|
+
* Feed point (0..1, top-left, Y down) → world position on the `z = planeZ`
|
|
6
|
+
* plane (default 0, the tracking plane). Depth (`z`) does not move the
|
|
7
|
+
* result: the ray through the pixel is the same at any depth.
|
|
8
|
+
*/
|
|
9
|
+
export declare const feedToWorld: (point: FeedPoint, camera: THREE.Camera, out?: THREE.Vector3, planeZ?: number) => THREE.Vector3;
|
|
10
|
+
/** Tracker point (center origin, Y up) → world position on the `z = planeZ` plane. */
|
|
11
|
+
export declare const trackerToWorld: (point: TrackerPoint, camera: THREE.Camera, out?: THREE.Vector3, planeZ?: number) => THREE.Vector3;
|
|
12
|
+
/** World position → feed point (0..1, top-left, Y down); `z` carries the NDC depth. */
|
|
13
|
+
export declare const worldToFeed: (point: THREE.Vector3Like, camera: THREE.Camera, target?: Required<FeedPoint>) => Required<FeedPoint>;
|
|
14
|
+
/** World position → tracker point (center origin, Y up); `z` carries the NDC depth. */
|
|
15
|
+
export declare const worldToTracker: (point: THREE.Vector3Like, camera: THREE.Camera, target?: TrackerPoint) => TrackerPoint;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GestureSettings } from '../../gestures/settings';
|
|
2
|
+
export type GestureSettingsPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
value: Partial<GestureSettings>;
|
|
5
|
+
/** The gesture's own defaults, so untouched fields show what it really uses. */
|
|
6
|
+
defaults?: GestureSettings;
|
|
7
|
+
onChange: (next: GestureSettings) => void;
|
|
8
|
+
initialPosition?: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/** Live detector controls for one gesture; spread the emitted settings into `useGesture` options. */
|
|
14
|
+
export declare const GestureSettingsPanel: ({ title, value, defaults, onChange, initialPosition, }: GestureSettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HolisticTrackerSettings } from '../../components/HolisticTracker';
|
|
2
|
+
export type HolisticTrackerSettingsPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
value: Partial<HolisticTrackerSettings>;
|
|
5
|
+
onChange: (next: HolisticTrackerSettings) => void;
|
|
6
|
+
initialPosition?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Live controls for `<HolisticTracker>`; map the emitted settings onto the
|
|
13
|
+
* component with `toHolisticTrackerProps`. Hands, hold/predict and the
|
|
14
|
+
* analysis size apply without re-initializing; blendshapes and FPS re-acquire.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HolisticTrackerSettingsPanel: ({ title, value, onChange, initialPosition, }: HolisticTrackerSettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/debug-ui/index.d.ts
CHANGED
|
@@ -33,6 +33,20 @@ export type { FaceWarp3DSettingsPanelProps } from './face-warp-3d';
|
|
|
33
33
|
export { FaceWarp3DSettingsPanel } from './face-warp-3d';
|
|
34
34
|
export type { FaceRetouchSettingsPanelProps } from './face-retouch';
|
|
35
35
|
export { FaceRetouchSettingsPanel } from './face-retouch';
|
|
36
|
+
export type { GestureSettingsPanelProps } from './gesture-settings';
|
|
37
|
+
export { GestureSettingsPanel } from './gesture-settings';
|
|
38
|
+
export type { IrisEffectSettingsPanelProps } from './iris-effect-settings';
|
|
39
|
+
export { IrisEffectSettingsPanel } from './iris-effect-settings';
|
|
40
|
+
export type { LipEffectSettingsPanelProps } from './lip-effect-settings';
|
|
41
|
+
export { LipEffectSettingsPanel } from './lip-effect-settings';
|
|
42
|
+
export type { ProductHotspotPanelProps } from './product-hotspots';
|
|
43
|
+
export { ProductHotspotPanel } from './product-hotspots';
|
|
44
|
+
export type { XRDiagnosticsPanelProps } from './xr-diagnostics';
|
|
45
|
+
export { XRDiagnosticsPanel } from './xr-diagnostics';
|
|
46
|
+
export type { HolisticTrackerSettingsPanelProps } from './holistic-tracker-settings';
|
|
47
|
+
export { HolisticTrackerSettingsPanel } from './holistic-tracker-settings';
|
|
48
|
+
export type { SegmentationOverlaySettingsPanelProps } from './segmentation-overlay-settings';
|
|
49
|
+
export { SegmentationOverlaySettingsPanel } from './segmentation-overlay-settings';
|
|
36
50
|
export type { Transform3DSettingsPanelProps } from './transform-3d-settings';
|
|
37
51
|
export { Transform3DSettingsPanel, Transform3DSettingsSection } from './transform-3d-settings';
|
|
38
52
|
export type { MeshRendererSettingsPanelProps } from './mesh-renderer-settings';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IrisEffectSettings } from '../../components/IrisEffect';
|
|
2
|
+
export type IrisEffectSettingsPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
value: Partial<IrisEffectSettings>;
|
|
5
|
+
onChange: (next: IrisEffectSettings) => void;
|
|
6
|
+
initialPosition?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/** Live controls for `<IrisEffect>`; spread the emitted settings onto the component. */
|
|
12
|
+
export declare const IrisEffectSettingsPanel: ({ title, value, onChange, initialPosition, }: IrisEffectSettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LipEffectSettings } from '../../components/LipEffect';
|
|
2
|
+
export type LipEffectSettingsPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
value: Partial<LipEffectSettings>;
|
|
5
|
+
onChange: (next: LipEffectSettings) => void;
|
|
6
|
+
initialPosition?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Live controls for `LipEffect`: presets, mask mode, material and texture
|
|
13
|
+
* transform. Spread the emitted settings onto `<LipEffect>`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const LipEffectSettingsPanel: ({ title, value, onChange, initialPosition, }: LipEffectSettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../session-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../session-BBr0yN8h.cjs");exports.MediaSourceSwitcher=e.MediaSourceSwitcher;exports.defaultMediaSources=e.defaultMediaSources;exports.sdkImageMediaSources=e.sdkImageMediaSources;exports.sdkVideoMediaSources=e.sdkVideoMediaSources;exports.useFaceTrackingMediaSourceSession=e.useFaceTrackingMediaSourceSession;exports.useMediaSourceSession=e.useMediaSourceSession;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UseProductHotspotsResult } from '../../product/useProductDetails';
|
|
2
|
+
export type ProductHotspotPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
hotspots: UseProductHotspotsResult;
|
|
5
|
+
/** Called when placement mode toggles; the page forwards pointer clicks on the viewer to `placeFromPointer` while on. */
|
|
6
|
+
placing: boolean;
|
|
7
|
+
onPlacingChange: (placing: boolean) => void;
|
|
8
|
+
/** Variants from `useProductVariants`, optional. */
|
|
9
|
+
variants?: {
|
|
10
|
+
variants: string[];
|
|
11
|
+
variant: string | null;
|
|
12
|
+
setVariant: (name: string | null) => void;
|
|
13
|
+
};
|
|
14
|
+
initialPosition?: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Authoring panel for product hotspots (and variants): toggle click-to-place,
|
|
21
|
+
* edit labels, remove, copy the JSON. Debug UI only; the data it produces is
|
|
22
|
+
* what the app ships as `initial` to `useProductHotspots`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ProductHotspotPanel: ({ title, hotspots, placing, onPlacingChange, variants, initialPosition, }: ProductHotspotPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SegmentationOverlaySettings } from '../../components/SegmentationOverlay';
|
|
2
|
+
export type SegmentationOverlaySettingsPanelProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
value: Partial<SegmentationOverlaySettings>;
|
|
5
|
+
onChange: (next: SegmentationOverlaySettings) => void;
|
|
6
|
+
initialPosition?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/** Live controls for `SegmentationOverlay`; spread the emitted settings onto the component. */
|
|
12
|
+
export declare const SegmentationOverlaySettingsPanel: ({ title, value, onChange, initialPosition, }: SegmentationOverlaySettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { XRModel } from '../../constants';
|
|
2
|
+
import { XRDiagnostics } from '../../hooks/useXRDiagnostics';
|
|
3
|
+
export type XRDiagnosticsPanelProps = {
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Sampling period in ms (default 250). */
|
|
6
|
+
intervalMs?: number;
|
|
7
|
+
/** Models to list; default every `XRModel`. */
|
|
8
|
+
models?: XRModel[];
|
|
9
|
+
initialPosition?: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
/** Start collapsed (header only). */
|
|
14
|
+
defaultCollapsed?: boolean;
|
|
15
|
+
/** Called with every sample (for logging / assertions). */
|
|
16
|
+
onSample?: (sample: XRDiagnostics) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Read-only tracking diagnostics: session lifecycle, source and feed, feed
|
|
20
|
+
* frame rate, and one block per model with state, inference time and rate,
|
|
21
|
+
* skipped frames, detections, confidence and the last error. Mount it
|
|
22
|
+
* anywhere under `<XRProvider>` (outside the R3F canvas); it samples on an
|
|
23
|
+
* interval and unmounting stops the sampling.
|
|
24
|
+
*/
|
|
25
|
+
export declare const XRDiagnosticsPanel: ({ title, intervalMs, models, initialPosition, defaultCollapsed, onSample, }: XRDiagnosticsPanelProps) => import("react/jsx-runtime").JSX.Element;
|