@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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const COMPOSITE_VERTEX_SHADER = "\n attribute vec2 faceUv;\n varying vec2 vUv;\n varying vec2 vFaceUv;\n varying vec3 vNormal;\n\n void main() {\n vUv = uv;\n vFaceUv = faceUv;\n vNormal = normalize(normalMatrix * normal);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n";
|
|
2
|
-
export declare const COMPOSITE_FRAGMENT_SHADER = "\n uniform sampler2D cameraTexture;\n uniform sampler2D canonicalTexture;\n uniform sampler2D alphaMask;\n uniform vec3 textureTint;\n uniform float opacity;\n uniform int blendMode;\n uniform float blendOpacity;\n uniform float useCanonicalTexture;\n uniform float useAlphaMask;\n uniform float alphaOpacity;\n uniform float compositeShading;\n uniform vec3 lightDirection;\n uniform float ambientStrength;\n uniform float directionalStrength;\n varying vec2 vUv;\n varying vec2 vFaceUv;\n varying vec3 vNormal;\n\n vec3 linearToSrgb(vec3 value) {\n vec3 low = value * 12.92;\n vec3 high = 1.055 * pow(max(value, vec3(0.0)), vec3(1.0 / 2.4)) - 0.055;\n return mix(high, low, step(value, vec3(0.0031308)));\n }\n\n vec3 srgbToLinear(vec3 value) {\n vec3 low = value / 12.92;\n vec3 high = pow(max((value + 0.055) / 1.055, vec3(0.0)), vec3(2.4));\n return mix(high, low, step(value, vec3(0.04045)));\n }\n\n float overlayChannel(float base, float blend) {\n return base < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n float hardLightChannel(float base, float blend) {\n return blend < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n float softLightChannel(float base, float blend) {\n if (blend <= 0.5) {\n return base - (1.0 - 2.0 * blend) * base * (1.0 - base);\n }\n\n float d = base <= 0.25\n ? ((16.0 * base - 12.0) * base + 4.0) * base\n : sqrt(base);\n\n return base + (2.0 * blend - 1.0) * (d - base);\n }\n\n vec3 applyBlendMode(vec3 base, vec3 blend, int mode) {\n if (mode == 0) return blend;\n if (mode == 1) return min(base + blend, 1.0);\n if (mode == 2) return max(base - blend, 0.0);\n if (mode == 3) return base * blend;\n if (mode == 4) return 1.0 - (1.0 - base) * (1.0 - blend);\n if (mode == 5) {\n return vec3(\n overlayChannel(base.r, blend.r),\n overlayChannel(base.g, blend.g),\n overlayChannel(base.b, blend.b)\n );\n }\n if (mode == 6) {\n return vec3(\n softLightChannel(base.r, blend.r),\n softLightChannel(base.g, blend.g),\n softLightChannel(base.b, blend.b)\n );\n }\n if (mode == 7) {\n return vec3(\n hardLightChannel(base.r, blend.r),\n hardLightChannel(base.g, blend.g),\n hardLightChannel(base.b, blend.b)\n );\n }\n if (mode == 8) return max(base, blend);\n if (mode == 9) return min(base, blend);\n if (mode == 10) return abs(base - blend);\n return base + blend - 2.0 * base * blend;\n }\n\n void main() {\n vec3 base = linearToSrgb(texture2D(cameraTexture, vFaceUv).rgb);\n vec4 textureSample = texture2D(canonicalTexture, vUv);\n vec3 blend = linearToSrgb(textureSample.rgb) * textureTint;\n float light = ambientStrength + max(dot(normalize(vNormal), normalize(lightDirection)), 0.0) * directionalStrength;\n blend *= mix(1.0, clamp(light, 0.35, 1.35), compositeShading);\n float maskSample = texture2D(alphaMask, vUv).r;\n float mask = useAlphaMask > 0.5 ? mix(1.0, maskSample, alphaOpacity) : 1.0;\n float textureAlpha = useCanonicalTexture > 0.5 ? textureSample.a : 1.0;\n vec3 blended = applyBlendMode(base, blend, blendMode);\n vec3 color = useCanonicalTexture > 0.5 ? mix(base, blended, blendOpacity) : base;\n gl_FragColor = vec4(srgbToLinear(color), opacity * mask * textureAlpha);\n }\n";
|
|
2
|
+
export declare const COMPOSITE_FRAGMENT_SHADER = "\n uniform sampler2D cameraTexture;\n uniform sampler2D canonicalTexture;\n uniform sampler2D alphaMask;\n uniform vec3 textureTint;\n uniform float opacity;\n uniform int blendMode;\n uniform float blendOpacity;\n uniform float useCanonicalTexture;\n uniform float useAlphaMask;\n uniform float alphaOpacity;\n uniform float compositeShading;\n uniform vec3 lightDirection;\n uniform float ambientStrength;\n uniform float directionalStrength;\n varying vec2 vUv;\n varying vec2 vFaceUv;\n varying vec3 vNormal;\n\n vec3 linearToSrgb(vec3 value) {\n vec3 low = value * 12.92;\n vec3 high = 1.055 * pow(max(value, vec3(0.0)), vec3(1.0 / 2.4)) - 0.055;\n return mix(high, low, step(value, vec3(0.0031308)));\n }\n\n vec3 srgbToLinear(vec3 value) {\n vec3 low = value / 12.92;\n vec3 high = pow(max((value + 0.055) / 1.055, vec3(0.0)), vec3(2.4));\n return mix(high, low, step(value, vec3(0.04045)));\n }\n\n float overlayChannel(float base, float blend) {\n return base < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n float hardLightChannel(float base, float blend) {\n return blend < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n float softLightChannel(float base, float blend) {\n if (blend <= 0.5) {\n return base - (1.0 - 2.0 * blend) * base * (1.0 - base);\n }\n\n float d = base <= 0.25\n ? ((16.0 * base - 12.0) * base + 4.0) * base\n : sqrt(base);\n\n return base + (2.0 * blend - 1.0) * (d - base);\n }\n\n vec3 applyBlendMode(vec3 base, vec3 blend, int mode) {\n if (mode == 0) return blend;\n if (mode == 1) return min(base + blend, 1.0);\n if (mode == 2) return max(base - blend, 0.0);\n if (mode == 3) return base * blend;\n if (mode == 4) return 1.0 - (1.0 - base) * (1.0 - blend);\n if (mode == 5) {\n return vec3(\n overlayChannel(base.r, blend.r),\n overlayChannel(base.g, blend.g),\n overlayChannel(base.b, blend.b)\n );\n }\n if (mode == 6) {\n return vec3(\n softLightChannel(base.r, blend.r),\n softLightChannel(base.g, blend.g),\n softLightChannel(base.b, blend.b)\n );\n }\n if (mode == 7) {\n return vec3(\n hardLightChannel(base.r, blend.r),\n hardLightChannel(base.g, blend.g),\n hardLightChannel(base.b, blend.b)\n );\n }\n if (mode == 8) return max(base, blend);\n if (mode == 9) return min(base, blend);\n if (mode == 10) return abs(base - blend);\n return base + blend - 2.0 * base * blend;\n }\n\n void main() {\n vec3 base = linearToSrgb(texture2D(cameraTexture, vFaceUv).rgb);\n vec4 textureSample = texture2D(canonicalTexture, vUv);\n vec3 blend = linearToSrgb(textureSample.rgb) * textureTint;\n float light = ambientStrength + max(dot(normalize(vNormal), normalize(lightDirection)), 0.0) * directionalStrength;\n blend *= mix(1.0, clamp(light, 0.35, 1.35), compositeShading);\n float maskSample = texture2D(alphaMask, vUv).r;\n float mask = useAlphaMask > 0.5 ? mix(1.0, maskSample, alphaOpacity) : 1.0;\n float textureAlpha = useCanonicalTexture > 0.5 ? textureSample.a : 1.0;\n vec3 blended = applyBlendMode(base, blend, blendMode);\n vec3 color = useCanonicalTexture > 0.5 ? mix(base, blended, blendOpacity) : base;\n gl_FragColor = vec4(srgbToLinear(color), opacity * mask * textureAlpha);\n // Blending above runs in sRGB; the result is linear here and three only\n // encodes built-in materials, so encode for the output colour space.\n #include <colorspace_fragment>\n }\n";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FaceMesh, FACE_LANDMARK_Z_SCALE_FACTOR } from './FaceMesh';
|
|
2
2
|
export { CanonicalFaceMeshRenderer } from './canonical/CanonicalFaceMeshRenderer';
|
|
3
|
-
export type { CanonicalFaceMeshRendererProps, FaceMeshMaterialOverride, FaceMeshMaterialOverrideContext, } from './canonical/CanonicalFaceMeshRenderer';
|
|
3
|
+
export type { CanonicalFaceMeshRendererProps, FaceMeshMaterialOverride, FaceMeshMaterialOverrideContext, FaceMeshMaterialOverrideResult, } from './canonical/CanonicalFaceMeshRenderer';
|
|
4
4
|
export { FaceMeshMaterial } from './canonical/FaceMeshMaterial';
|
|
5
5
|
export type { FaceMeshMaterialProps } from './canonical/FaceMeshMaterial';
|
|
6
6
|
export { DEFAULT_FACE_MESH_TRANSFORM, DEFAULT_FACE_MESH_RENDERER, FaceMeshRenderer, mapFaceMeshRendererProps, mapFaceMeshRendererSettingsToProps, resolveFaceMeshRendererSettings, type FaceMeshRendererSettings, type FaceMeshRendererProps, } from './FaceMeshRenderer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseGestureOptions } from '../../hooks/useGesture';
|
|
2
|
+
import { GestureRef } from '../../gestures/definitions';
|
|
3
|
+
export type GestureListenerProps = UseGestureOptions & {
|
|
4
|
+
/** A built-in gesture name (`"pinch"`, `"headNod"`, …) or a `defineGesture` definition. */
|
|
5
|
+
gesture: GestureRef;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Declarative `useGesture`: mount it anywhere inside the scene and act on
|
|
9
|
+
* `onBegin` / `onEnd`. Renders nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare const GestureListener: ({ gesture, ...options }: GestureListenerProps) => null;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { HandData } from '../../types/hand-tracking';
|
|
3
|
+
import { HandTarget } from '../../types/tracking';
|
|
4
|
+
import { XRModelNodeHandTracking } from '../../types/nodes';
|
|
5
|
+
/**
|
|
6
|
+
* MediaPipe HandLandmarker joint indices (21 landmarks per hand).
|
|
7
|
+
* Names follow the MediaPipe convention; the underlying tracker may expose
|
|
8
|
+
* multiple hands, so this component selects the requested one when available.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HAND_LANDMARK_INDEX: Record<HandTarget, number>;
|
|
2
11
|
type HandTrackerProps = PropsWithChildren & {
|
|
3
12
|
/** Which hand to bind to. Prefers the named hand when present. */
|
|
4
13
|
hand?: "left" | "right";
|
|
@@ -20,5 +29,6 @@ type HandTrackerProps = PropsWithChildren & {
|
|
|
20
29
|
*/
|
|
21
30
|
active?: boolean;
|
|
22
31
|
};
|
|
32
|
+
export declare function selectHand(node: XRModelNodeHandTracking | null, hand?: "left" | "right", handIndex?: number): HandData | undefined;
|
|
23
33
|
export declare const HandTracker: ({ children, hand, handIndex, targetFps, active, }: HandTrackerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
34
|
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { HolisticHandSide, HolisticModelOptions, HolisticTrackingStatus } from '../../types/holistic';
|
|
3
|
+
import { XRModelNodeHolisticTracking } from '../../types/nodes';
|
|
4
|
+
/** What `useHolisticTracking()` returns: the shared node plus its lifecycle. */
|
|
5
|
+
export type HolisticTrackingContextValue = {
|
|
6
|
+
node: XRModelNodeHolisticTracking | null;
|
|
7
|
+
/** True once the model is registered and initialized without error. */
|
|
8
|
+
ready: boolean;
|
|
9
|
+
status: HolisticTrackingStatus;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Read the nearest `<HolisticTracker>`'s shared node. Call `node.getResult()`
|
|
14
|
+
* inside `useFrame`; the result object is stable and mutated in place.
|
|
15
|
+
* Outside a provider this returns an inactive context (never throws).
|
|
16
|
+
*/
|
|
17
|
+
export declare const useHolisticTracking: () => HolisticTrackingContextValue;
|
|
18
|
+
export type HolisticTrackerProps = PropsWithChildren & HolisticModelOptions & {
|
|
19
|
+
/**
|
|
20
|
+
* Whether this tracker should run. `false` pauses the shared model's
|
|
21
|
+
* per-frame inference while keeping it initialized, so flipping back to
|
|
22
|
+
* `true` resumes instantly. When several consumers share the model, it
|
|
23
|
+
* runs while any is active. Defaults to `true`.
|
|
24
|
+
*/
|
|
25
|
+
active?: boolean;
|
|
26
|
+
/** Called whenever the lifecycle status changes (`loading` → `ready` / `error`). */
|
|
27
|
+
onStatusChange?: (status: HolisticTrackingStatus, error: Error | null) => void;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* One MediaPipe Holistic inference shared by every descendant. Compose the
|
|
31
|
+
* streams with `<HolisticTracker.Face>`, `<HolisticTracker.Hand hand="left">`
|
|
32
|
+
* and `<HolisticTracker.Body>`, which accept the same `TrackingAnchor`
|
|
33
|
+
* targets as the individual trackers, or read the unified result through
|
|
34
|
+
* `useHolisticTracking()`.
|
|
35
|
+
*/
|
|
36
|
+
declare const HolisticTrackerComponent: ({ children, active, onStatusChange, modelUrl, delegate, minFaceDetectionConfidence, minFacePresenceConfidence, minPoseDetectionConfidence, minPosePresenceConfidence, minHandLandmarksConfidence, outputFaceBlendshapes, targetFps, hands, analysisMaxDimension, holdMs, predictMs, }: HolisticTrackerProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* The face stream: `face.*` anchors. The group origin is face landmark 4, the
|
|
39
|
+
* same landmark `FaceTracker` uses for its position. No head rotation
|
|
40
|
+
* (holistic has no transform matrix).
|
|
41
|
+
*/
|
|
42
|
+
declare const HolisticFace: {
|
|
43
|
+
({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
export type HolisticHandProps = PropsWithChildren & {
|
|
47
|
+
/** Which hand this group follows. Holistic tracks at most one of each. */
|
|
48
|
+
hand: HolisticHandSide;
|
|
49
|
+
};
|
|
50
|
+
/** One hand stream: `hand.*` anchors, group origin at the wrist. */
|
|
51
|
+
declare const HolisticHand: {
|
|
52
|
+
({ hand, children }: HolisticHandProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
/** The pose stream: `body.*` anchors (incl. the synthesized `body.neck`), group origin at the head. */
|
|
56
|
+
declare const HolisticBody: {
|
|
57
|
+
({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
export declare const HolisticTracker: typeof HolisticTrackerComponent & {
|
|
61
|
+
Face: typeof HolisticFace;
|
|
62
|
+
Hand: typeof HolisticHand;
|
|
63
|
+
Body: typeof HolisticBody;
|
|
64
|
+
};
|
|
65
|
+
export { DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS, createHolisticSignals, getHolisticSignals, isHandRaised, isPalmOpen, } from './signals';
|
|
66
|
+
export type { HolisticSignalThresholds, HolisticSignals } from './signals';
|
|
67
|
+
export { DEFAULT_HOLISTIC_TRACKER_SETTINGS, HOLISTIC_HANDS_OPTIONS, HOLISTIC_TRACKER_SETTINGS_FIELDS, patchHolisticTrackerSettings, resolveHolisticTrackerSettings, toHolisticTrackerProps, } from './settings';
|
|
68
|
+
export type { HolisticTrackerSettings } from './settings';
|
|
69
|
+
export { DEFAULT_HOLISTIC_ANALYSIS_MAX_DIMENSION, DEFAULT_HOLISTIC_HOLD_MS, DEFAULT_HOLISTIC_MODEL_URL, DEFAULT_HOLISTIC_PREDICT_MS, } from '../../models/Holistic/result';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HolisticHandsOption, HolisticModelOptions } from '../../types/holistic';
|
|
2
|
+
/** Flat, panel-friendly settings for `<HolisticTracker>`. */
|
|
3
|
+
export type HolisticTrackerSettings = {
|
|
4
|
+
hands: HolisticHandsOption;
|
|
5
|
+
/** Inference cap (fps); `0` = uncapped. */
|
|
6
|
+
targetFps: number;
|
|
7
|
+
analysisMaxDimension: number;
|
|
8
|
+
holdMs: number;
|
|
9
|
+
predictMs: number;
|
|
10
|
+
outputFaceBlendshapes: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const HOLISTIC_HANDS_OPTIONS: readonly ["both", "left", "right", "none"];
|
|
13
|
+
export declare const DEFAULT_HOLISTIC_TRACKER_SETTINGS: HolisticTrackerSettings;
|
|
14
|
+
export declare const HOLISTIC_TRACKER_SETTINGS_FIELDS: [{
|
|
15
|
+
readonly key: "hands";
|
|
16
|
+
readonly label: "Hands";
|
|
17
|
+
readonly type: "select";
|
|
18
|
+
readonly options: {
|
|
19
|
+
label: "none" | "left" | "right" | "both";
|
|
20
|
+
value: "none" | "left" | "right" | "both";
|
|
21
|
+
}[];
|
|
22
|
+
}, {
|
|
23
|
+
readonly key: "targetFps";
|
|
24
|
+
readonly label: "Target FPS (0 = uncapped)";
|
|
25
|
+
readonly type: "number";
|
|
26
|
+
readonly min: 0;
|
|
27
|
+
readonly max: 60;
|
|
28
|
+
readonly step: 1;
|
|
29
|
+
}, {
|
|
30
|
+
readonly key: "analysisMaxDimension";
|
|
31
|
+
readonly label: "Analysis max px";
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly min: 256;
|
|
34
|
+
readonly max: 1280;
|
|
35
|
+
readonly step: 64;
|
|
36
|
+
}, {
|
|
37
|
+
readonly key: "holdMs";
|
|
38
|
+
readonly label: "Hold (ms)";
|
|
39
|
+
readonly type: "number";
|
|
40
|
+
readonly min: 0;
|
|
41
|
+
readonly max: 1000;
|
|
42
|
+
readonly step: 10;
|
|
43
|
+
}, {
|
|
44
|
+
readonly key: "predictMs";
|
|
45
|
+
readonly label: "Predict (ms)";
|
|
46
|
+
readonly type: "number";
|
|
47
|
+
readonly min: 0;
|
|
48
|
+
readonly max: 300;
|
|
49
|
+
readonly step: 10;
|
|
50
|
+
}, {
|
|
51
|
+
readonly key: "outputFaceBlendshapes";
|
|
52
|
+
readonly label: "Face blendshapes (re-inits)";
|
|
53
|
+
readonly type: "boolean";
|
|
54
|
+
}];
|
|
55
|
+
export declare const resolveHolisticTrackerSettings: (value?: Partial<HolisticTrackerSettings>) => HolisticTrackerSettings;
|
|
56
|
+
export declare const patchHolisticTrackerSettings: (current: HolisticTrackerSettings, patch: Partial<HolisticTrackerSettings>) => HolisticTrackerSettings;
|
|
57
|
+
/** Map panel settings onto `<HolisticTracker>` props (`targetFps: 0` → uncapped). */
|
|
58
|
+
export declare const toHolisticTrackerProps: (settings: HolisticTrackerSettings) => HolisticModelOptions;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HolisticHandResult, HolisticHandSide, HolisticResult } from '../../types/holistic';
|
|
2
|
+
export type HolisticSignalThresholds = {
|
|
3
|
+
/** Mean of `mouthSmileLeft` / `mouthSmileRight` at or above which `smiling` is true. Default 0.3. */
|
|
4
|
+
smile: number;
|
|
5
|
+
/** `jawOpen` at or above which `mouthOpen` is true. Default 0.25. */
|
|
6
|
+
mouthOpen: number;
|
|
7
|
+
/** Pose landmarks below this visibility are ignored. Default 0.5. */
|
|
8
|
+
minVisibility: number;
|
|
9
|
+
/** A finger is extended when its tip is this many times farther from the wrist than its base. Default 1.25. */
|
|
10
|
+
fingerExtension: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS: HolisticSignalThresholds;
|
|
13
|
+
/**
|
|
14
|
+
* Derived, per-frame booleans that combine the holistic streams. Plain data
|
|
15
|
+
* so it can be read in `useFrame`, logged, or driven into UI state.
|
|
16
|
+
*/
|
|
17
|
+
export type HolisticSignals = {
|
|
18
|
+
facePresent: boolean;
|
|
19
|
+
leftHandPresent: boolean;
|
|
20
|
+
rightHandPresent: boolean;
|
|
21
|
+
posePresent: boolean;
|
|
22
|
+
/** Mean smile blendshape score, 0..1 (0 without a face). */
|
|
23
|
+
smile: number;
|
|
24
|
+
/** `jawOpen` blendshape score, 0..1 (0 without a face). */
|
|
25
|
+
mouthOpen: number;
|
|
26
|
+
smiling: boolean;
|
|
27
|
+
mouthIsOpen: boolean;
|
|
28
|
+
/** Pose wrist above the same-side shoulder (tracker space, Y up). */
|
|
29
|
+
leftHandRaised: boolean;
|
|
30
|
+
rightHandRaised: boolean;
|
|
31
|
+
/** At least three of index..pinky extended on the holistic hand. */
|
|
32
|
+
leftPalmOpen: boolean;
|
|
33
|
+
rightPalmOpen: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The combined gesture: a raised, open hand while smiling. The right hand
|
|
36
|
+
* wins when both qualify; `null` otherwise.
|
|
37
|
+
*/
|
|
38
|
+
greeting: HolisticHandSide | null;
|
|
39
|
+
};
|
|
40
|
+
export declare const createHolisticSignals: () => HolisticSignals;
|
|
41
|
+
/** True when at least three of index..pinky are extended away from the wrist. */
|
|
42
|
+
export declare const isPalmOpen: (hand: HolisticHandResult | null, fingerExtension?: number) => boolean;
|
|
43
|
+
/** True when the pose wrist on `side` is above its shoulder and both are visible enough. */
|
|
44
|
+
export declare const isHandRaised: (result: HolisticResult, side: HolisticHandSide, minVisibility?: number) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Compute the combined signals for a result. Pass `out` to reuse an object
|
|
47
|
+
* across frames; thresholds default to `DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const getHolisticSignals: (result: HolisticResult, thresholds?: Partial<HolisticSignalThresholds>, out?: HolisticSignals) => HolisticSignals;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { IrisEye } from '../../iris/types';
|
|
2
|
+
import * as THREE from "three";
|
|
3
|
+
/**
|
|
4
|
+
* Uniforms every iris material receives. Values are refreshed in place each
|
|
5
|
+
* frame by `updateIrisUniforms`; keep the object identity stable (three
|
|
6
|
+
* captures it at program compile).
|
|
7
|
+
*/
|
|
8
|
+
export type IrisUniforms = {
|
|
9
|
+
/** Iris center in MediaPipe image space (0..1, top-left origin). */
|
|
10
|
+
irisCenter: {
|
|
11
|
+
value: THREE.Vector2;
|
|
12
|
+
};
|
|
13
|
+
/** Iris radius in image-width units. */
|
|
14
|
+
irisRadius: {
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
/** Iris position inside the eye opening, [-1, 1] per axis (+x person's left, +y up). Not gaze. */
|
|
18
|
+
irisOffset: {
|
|
19
|
+
value: THREE.Vector2;
|
|
20
|
+
};
|
|
21
|
+
/** 0..1 eyelid-opening confidence, scaled by the hold decay. */
|
|
22
|
+
irisConfidence: {
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
/** Eyelid gap / eye width. */
|
|
26
|
+
irisOpenness: {
|
|
27
|
+
value: number;
|
|
28
|
+
};
|
|
29
|
+
/** Seconds since the effect mounted. */
|
|
30
|
+
time: {
|
|
31
|
+
value: number;
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
value: THREE.Color;
|
|
35
|
+
};
|
|
36
|
+
opacity: {
|
|
37
|
+
value: number;
|
|
38
|
+
};
|
|
39
|
+
/** 1 when the material is mirrored horizontally, else 0. */
|
|
40
|
+
mirror: {
|
|
41
|
+
value: number;
|
|
42
|
+
};
|
|
43
|
+
/** 1 to multiply the image by `color` in the image material, else 0. */
|
|
44
|
+
tintImage: {
|
|
45
|
+
value: number;
|
|
46
|
+
};
|
|
47
|
+
/** Image for the image material (null in shader mode). */
|
|
48
|
+
map: {
|
|
49
|
+
value: THREE.Texture | null;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const createIrisUniforms: () => IrisUniforms;
|
|
53
|
+
/** Copy one eye's live values into the uniforms. */
|
|
54
|
+
export declare const updateIrisUniforms: (uniforms: IrisUniforms, eye: IrisEye, options: {
|
|
55
|
+
time: number;
|
|
56
|
+
color?: THREE.ColorRepresentation;
|
|
57
|
+
opacity?: number;
|
|
58
|
+
mirrored?: boolean;
|
|
59
|
+
tintImage?: boolean;
|
|
60
|
+
map?: THREE.Texture | null;
|
|
61
|
+
}) => IrisUniforms;
|
|
62
|
+
export declare const IRIS_VERTEX_SHADER = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n";
|
|
63
|
+
/**
|
|
64
|
+
* Built-in procedural iris: a tinted disc with radial fibre bands, a pupil
|
|
65
|
+
* that follows \`irisOffset\`, a limbal ring, and alpha fading with
|
|
66
|
+
* \`irisConfidence\` so a closing eye dissolves the effect. The quad spans
|
|
67
|
+
* the iris diameter (uv 0.5 is the iris center).
|
|
68
|
+
*/
|
|
69
|
+
export declare const IRIS_SHADER_FRAGMENT = "\n uniform vec2 irisOffset;\n uniform float irisConfidence;\n uniform float time;\n uniform vec3 color;\n uniform float opacity;\n uniform float mirror;\n varying vec2 vUv;\n\n float hash(float n) { return fract(sin(n) * 43758.5453123); }\n\n void main() {\n vec2 p = vUv - 0.5;\n p.x = mix(p.x, -p.x, mirror);\n float r = length(p) * 2.0;\n if (r > 1.0) discard;\n float angle = atan(p.y, p.x);\n // Radial fibres: a few overlapping angular frequencies, slowly rotating.\n float fibres = 0.5\n + 0.25 * sin(angle * 36.0 + time * 0.3)\n + 0.15 * sin(angle * 91.0 - r * 6.0)\n + 0.10 * sin(angle * 17.0 + time * 0.7);\n vec3 base = color * (0.55 + 0.6 * fibres) * (1.1 - 0.5 * r);\n // Limbal ring: darken the outer edge.\n base *= 1.0 - smoothstep(0.78, 1.0, r) * 0.7;\n // Pupil: a soft dark disc offset slightly with the iris position in the eye.\n vec2 pupil = p - irisOffset * 0.08;\n float pupilR = length(pupil) * 2.0;\n float pupilMask = 1.0 - smoothstep(0.26, 0.36, pupilR);\n base = mix(base, vec3(0.02), pupilMask);\n // Specular glint.\n float glint = 1.0 - smoothstep(0.0, 0.14, length(p - vec2(-0.18, 0.2)));\n base += glint * 0.8;\n float edge = 1.0 - smoothstep(0.92, 1.0, r);\n gl_FragColor = vec4(base, opacity * edge * irisConfidence);\n #include <colorspace_fragment>\n }\n";
|
|
70
|
+
/** Image material: the texture covers the quad, tinted by \`color\`, fading with confidence. */
|
|
71
|
+
export declare const IRIS_IMAGE_FRAGMENT = "\n uniform sampler2D map;\n uniform float irisConfidence;\n uniform vec3 color;\n uniform float opacity;\n uniform float mirror;\n uniform float tintImage;\n varying vec2 vUv;\n void main() {\n vec2 uv = vUv;\n uv.x = mix(uv.x, 1.0 - uv.x, mirror);\n vec4 texel = texture2D(map, uv);\n // Image as authored; multiplied by the tint only when tintImage is on.\n vec3 rgb = texel.rgb * mix(vec3(1.0), color, tintImage);\n gl_FragColor = vec4(rgb, texel.a * opacity * irisConfidence);\n #include <colorspace_fragment>\n }\n";
|
|
72
|
+
export declare const createIrisShaderMaterial: (uniforms: IrisUniforms) => THREE.ShaderMaterial;
|
|
73
|
+
export declare const createIrisImageMaterial: (uniforms: IrisUniforms) => THREE.ShaderMaterial;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IrisTrackingHandle } from '../../hooks/useIrisTracking';
|
|
2
|
+
import { IrisResult, IrisSide } from '../../iris/types';
|
|
3
|
+
import { IrisUniforms } from './IrisMaterial';
|
|
4
|
+
import { IrisEffectSettings } from './settings';
|
|
5
|
+
import * as THREE from "three";
|
|
6
|
+
export declare const DEFAULT_IRIS_EFFECT_RENDER_ORDER: 100;
|
|
7
|
+
/** What a custom iris material factory receives, once per eye, when the tracker is ready. */
|
|
8
|
+
export type IrisMaterialContext = {
|
|
9
|
+
side: IrisSide;
|
|
10
|
+
/** Stable uniforms, refreshed in place every frame; wire them into your shader. */
|
|
11
|
+
uniforms: IrisUniforms;
|
|
12
|
+
/** The live result (stable object) for anything the uniforms do not carry. */
|
|
13
|
+
result: IrisResult;
|
|
14
|
+
/** The loaded image in `image` mode, else null. */
|
|
15
|
+
texture: THREE.Texture | null;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A three.js material instance (shared, the caller owns it), or a factory
|
|
19
|
+
* called once per eye for each `material` identity; the effect disposes what
|
|
20
|
+
* a factory created when the factory changes or on unmount. Read the live
|
|
21
|
+
* texture from `uniforms.map`, not from the context, which only carries the
|
|
22
|
+
* texture known when the factory ran.
|
|
23
|
+
*/
|
|
24
|
+
export type IrisMaterialOverride = THREE.Material | ((context: IrisMaterialContext) => THREE.Material);
|
|
25
|
+
export type IrisEffectProps = Partial<IrisEffectSettings> & {
|
|
26
|
+
/** Maximum faces requested from the shared face model. Default `faceIndex + 1`. */
|
|
27
|
+
numFaces?: number;
|
|
28
|
+
/** Pauses the tracker interest. Default true. */
|
|
29
|
+
active?: boolean;
|
|
30
|
+
/** Extrapolate held faces along their velocity for up to this long (ms). Default 0. */
|
|
31
|
+
predictMs?: number;
|
|
32
|
+
/** Pre-loaded image for `image` mode; takes precedence over `textureUrl`. */
|
|
33
|
+
texture?: THREE.Texture | null;
|
|
34
|
+
/** Replace the built-in materials with your own (receives the shared uniforms). */
|
|
35
|
+
material?: IrisMaterialOverride;
|
|
36
|
+
renderOrder?: number;
|
|
37
|
+
/** Called with the handle once per mount, for HUDs that read `handle.result` in `useFrame`. */
|
|
38
|
+
onTracking?: (handle: IrisTrackingHandle) => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Draws a material over each tracked iris: the built-in procedural shader,
|
|
42
|
+
* an image, or your own material fed by the same uniforms. Tracking comes
|
|
43
|
+
* from `useIrisTracking` (the shared face model, hold/predict, smoothing);
|
|
44
|
+
* the quads hide as soon as the face is dropped, so no stale eye effect
|
|
45
|
+
* lingers. `confidence` fades the built-ins as the eye closes.
|
|
46
|
+
*/
|
|
47
|
+
export declare const IrisEffect: ({ numFaces, active, predictMs, texture: textureProp, material, renderOrder, onTracking, ...settingsInput }: IrisEffectProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export { IRIS_IMAGE_FRAGMENT, IRIS_SHADER_FRAGMENT, IRIS_VERTEX_SHADER, createIrisImageMaterial, createIrisShaderMaterial, createIrisUniforms, updateIrisUniforms, } from './IrisMaterial';
|
|
49
|
+
export type { IrisUniforms } from './IrisMaterial';
|
|
50
|
+
export { DEFAULT_IRIS_EFFECT_SETTINGS, IRIS_EFFECT_EYES, IRIS_EFFECT_MODES, IRIS_EFFECT_SETTINGS_FIELDS, patchIrisEffectSettings, resolveIrisEffectSettings, } from './settings';
|
|
51
|
+
export type { IrisEffectEye, IrisEffectMode, IrisEffectSettings } from './settings';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export declare const IRIS_EFFECT_EYES: readonly ["both", "left", "right"];
|
|
2
|
+
export type IrisEffectEye = (typeof IRIS_EFFECT_EYES)[number];
|
|
3
|
+
export declare const IRIS_EFFECT_MODES: readonly ["shader", "image"];
|
|
4
|
+
export type IrisEffectMode = (typeof IRIS_EFFECT_MODES)[number];
|
|
5
|
+
/** Flat, serializable settings for `<IrisEffect>`; the debug panel edits these. */
|
|
6
|
+
export type IrisEffectSettings = {
|
|
7
|
+
eye: IrisEffectEye;
|
|
8
|
+
mode: IrisEffectMode;
|
|
9
|
+
/** Tint for the shader iris, multiplied into the image in `image` mode. */
|
|
10
|
+
color: string;
|
|
11
|
+
/** Image for `image` mode. Empty = none (the effect hides). */
|
|
12
|
+
textureUrl: string;
|
|
13
|
+
/** Multiply the image by `color` in `image` mode. Default false (image as authored). */
|
|
14
|
+
tintImage: boolean;
|
|
15
|
+
/** Multiplier on the tracked iris radius. 1 = cover the iris. */
|
|
16
|
+
scale: number;
|
|
17
|
+
opacity: number;
|
|
18
|
+
/**
|
|
19
|
+
* Inference cap (fps) requested for the shared face model; `0` keeps the
|
|
20
|
+
* session's `perf.targetFps`. The first mounted face consumer wins, so
|
|
21
|
+
* pass the same value everywhere the face model is acquired.
|
|
22
|
+
*/
|
|
23
|
+
targetFps: number;
|
|
24
|
+
/** One Euro smoothing of the iris center and radius (0 = raw). */
|
|
25
|
+
smoothing: number;
|
|
26
|
+
/** Max extrapolation between inference samples (ms); 0 = hold-and-jump. */
|
|
27
|
+
leadMs: number;
|
|
28
|
+
/** Flip the material horizontally (image orientation / shader +x). */
|
|
29
|
+
mirrored: boolean;
|
|
30
|
+
faceIndex: number;
|
|
31
|
+
holdMs: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const DEFAULT_IRIS_EFFECT_SETTINGS: IrisEffectSettings;
|
|
34
|
+
export declare const IRIS_EFFECT_SETTINGS_FIELDS: [{
|
|
35
|
+
readonly key: "eye";
|
|
36
|
+
readonly label: "Eye";
|
|
37
|
+
readonly type: "select";
|
|
38
|
+
readonly options: {
|
|
39
|
+
label: "left" | "right" | "both";
|
|
40
|
+
value: "left" | "right" | "both";
|
|
41
|
+
}[];
|
|
42
|
+
}, {
|
|
43
|
+
readonly key: "mode";
|
|
44
|
+
readonly label: "Material";
|
|
45
|
+
readonly type: "select";
|
|
46
|
+
readonly options: {
|
|
47
|
+
label: "image" | "shader";
|
|
48
|
+
value: "image" | "shader";
|
|
49
|
+
}[];
|
|
50
|
+
}, {
|
|
51
|
+
readonly key: "color";
|
|
52
|
+
readonly label: "Color / tint";
|
|
53
|
+
readonly type: "color";
|
|
54
|
+
}, {
|
|
55
|
+
readonly key: "textureUrl";
|
|
56
|
+
readonly label: "Image URL (image mode)";
|
|
57
|
+
readonly type: "text";
|
|
58
|
+
}, {
|
|
59
|
+
readonly key: "tintImage";
|
|
60
|
+
readonly label: "Tint image with color";
|
|
61
|
+
readonly type: "boolean";
|
|
62
|
+
}, {
|
|
63
|
+
readonly key: "scale";
|
|
64
|
+
readonly label: "Scale (× iris radius)";
|
|
65
|
+
readonly type: "number";
|
|
66
|
+
readonly min: 0.2;
|
|
67
|
+
readonly max: 4;
|
|
68
|
+
readonly step: 0.05;
|
|
69
|
+
}, {
|
|
70
|
+
readonly key: "opacity";
|
|
71
|
+
readonly label: "Opacity";
|
|
72
|
+
readonly type: "number";
|
|
73
|
+
readonly min: 0;
|
|
74
|
+
readonly max: 1;
|
|
75
|
+
readonly step: 0.05;
|
|
76
|
+
}, {
|
|
77
|
+
readonly key: "targetFps";
|
|
78
|
+
readonly label: "Face FPS (0 = session)";
|
|
79
|
+
readonly type: "number";
|
|
80
|
+
readonly min: 0;
|
|
81
|
+
readonly max: 60;
|
|
82
|
+
readonly step: 1;
|
|
83
|
+
}, {
|
|
84
|
+
readonly key: "smoothing";
|
|
85
|
+
readonly label: "Smoothing (0 = raw)";
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
readonly min: 0;
|
|
88
|
+
readonly max: 60;
|
|
89
|
+
readonly step: 1;
|
|
90
|
+
}, {
|
|
91
|
+
readonly key: "leadMs";
|
|
92
|
+
readonly label: "Lead between samples (ms)";
|
|
93
|
+
readonly type: "number";
|
|
94
|
+
readonly min: 0;
|
|
95
|
+
readonly max: 200;
|
|
96
|
+
readonly step: 10;
|
|
97
|
+
}, {
|
|
98
|
+
readonly key: "mirrored";
|
|
99
|
+
readonly label: "Mirror material";
|
|
100
|
+
readonly type: "boolean";
|
|
101
|
+
}, {
|
|
102
|
+
readonly key: "faceIndex";
|
|
103
|
+
readonly label: "Face index";
|
|
104
|
+
readonly type: "number";
|
|
105
|
+
readonly min: 0;
|
|
106
|
+
readonly max: 3;
|
|
107
|
+
readonly step: 1;
|
|
108
|
+
}, {
|
|
109
|
+
readonly key: "holdMs";
|
|
110
|
+
readonly label: "Hold (ms)";
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly min: 0;
|
|
113
|
+
readonly max: 1000;
|
|
114
|
+
readonly step: 10;
|
|
115
|
+
}];
|
|
116
|
+
export declare const resolveIrisEffectSettings: (value?: Partial<IrisEffectSettings>) => IrisEffectSettings;
|
|
117
|
+
export declare const patchIrisEffectSettings: (current: IrisEffectSettings, patch: Partial<IrisEffectSettings>) => IrisEffectSettings;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { LipEffectProps } from './types';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `outer-and-inner-lips` paints only the lip surface: the mouth interior
|
|
4
|
+
* writes the stencil buffer and the lip material skips those pixels.
|
|
5
|
+
* `outer-lips` paints everything inside the outer lip ring, interior included.
|
|
6
|
+
*/
|
|
7
|
+
export declare const shouldWriteMouthStencil: (maskMode: LipEffectProps["maskMode"]) => boolean;
|
|
8
|
+
export declare const LipEffect: ({ faceIndex, designTexture, lowerDesignTexture, material, sharedMaterial, maxUpdateFps, holdMs, predictMs, renderOrder, ...settingsInput }: LipEffectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,46 @@
|
|
|
1
|
+
import { LipEffectSettings } from './settings';
|
|
1
2
|
import { LipEffectMaterialContext } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { LipUvBounds } from './uvGuide';
|
|
4
|
+
import * as THREE from "three";
|
|
5
|
+
/** Everything the built-in lip material reads. */
|
|
6
|
+
export type LipEffectMaterialInputs = Pick<LipEffectMaterialContext, "cameraTexture" | "designTexture"> & {
|
|
7
|
+
settings: LipEffectSettings;
|
|
8
|
+
/** Lower-lip design texture, used when `settings.splitLips` is on. */
|
|
9
|
+
lowerDesignTexture?: THREE.Texture | null;
|
|
10
|
+
/** Lip region of the UV atlas; defaults to the canonical mesh's bounds. */
|
|
11
|
+
lipUvBounds?: LipUvBounds;
|
|
12
|
+
/** Skip pixels the mouth-interior stencil marked (see `LipEffect` mask modes). */
|
|
8
13
|
subtractMouth?: boolean;
|
|
9
14
|
};
|
|
10
|
-
export
|
|
15
|
+
export type LipEffectMaterialProps = LipEffectMaterialInputs;
|
|
16
|
+
export declare const LIP_EFFECT_VERTEX_SHADER = "\nattribute vec2 faceUv;\nattribute float lipEdge;\nvarying vec2 vFaceUv;\nvarying vec2 vUv;\nvarying float vLipEdge;\nvarying vec3 vNormal;\nvarying vec3 vViewDir;\nvoid main() {\n vUv = uv;\n vFaceUv = faceUv;\n vLipEdge = lipEdge;\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n vNormal = normalize(normalMatrix * normal);\n vViewDir = -mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n}";
|
|
17
|
+
export declare const LIP_EFFECT_FRAGMENT_SHADER = "\nuniform sampler2D cameraTexture;\nuniform sampler2D designTexture;\nuniform sampler2D lowerDesignTexture;\nuniform vec3 tint;\nuniform vec3 lowerTint;\nuniform vec3 highlightColor;\nuniform vec3 gradientColor;\nuniform vec3 innerLipColor;\nuniform vec3 lightDirection;\nuniform float opacity;\nuniform float lowerOpacity;\nuniform float intensity;\nuniform float shading;\nuniform float gloss;\nuniform float roughness;\nuniform float gradientAmount;\nuniform float gradientDirection;\nuniform float edgeSoftness;\nuniform float innerLipAmount;\nuniform float innerLipWidth;\nuniform float mouthLineV;\nuniform vec2 lipMin;\nuniform vec2 lipSize;\nuniform mat3 textureTransform;\nvarying vec2 vFaceUv;\nvarying vec2 vUv;\nvarying float vLipEdge;\nvarying vec3 vNormal;\nvarying vec3 vViewDir;\nvoid main() {\n vec3 base = texture2D(cameraTexture, vFaceUv).rgb;\n\n // Upper / lower lip, blended over a thin band at the mouth line so the\n // corners do not show a seam.\n float upper = smoothstep(-0.004, 0.004, vUv.y - mouthLineV);\n vec2 designUv = (textureTransform * vec3(vUv, 1.0)).xy;\n vec4 design = mix(\n texture2D(lowerDesignTexture, designUv),\n texture2D(designTexture, designUv),\n upper\n );\n vec3 lipTint = mix(lowerTint, tint, upper);\n float lipOpacity = mix(lowerOpacity, opacity, upper);\n\n // Gradient: outward from the mouth line, or across the lip box.\n float gradientT = gradientDirection < 0.5\n ? 1.0 - vLipEdge\n : gradientDirection < 1.5\n ? clamp((vUv.y - lipMin.y) / max(lipSize.y, 1e-4), 0.0, 1.0)\n : clamp((vUv.x - lipMin.x) / max(lipSize.x, 1e-4), 0.0, 1.0);\n lipTint = mix(lipTint, gradientColor, gradientT * gradientAmount);\n\n // Inner lip tint, reaching innerLipWidth of the band out from the mouth line.\n float inner = smoothstep(1.0 - max(innerLipWidth, 1e-4), 1.0, vLipEdge);\n lipTint = mix(lipTint, innerLipColor, inner * innerLipAmount);\n\n vec3 painted = mix(design.rgb, design.rgb * lipTint, intensity);\n\n // Keep the lips' own light and shadow under the paint.\n float luminance = dot(base, vec3(0.299, 0.587, 0.114));\n painted = mix(painted, painted * min(luminance * 2.0, 1.5), shading);\n\n // Blinn-Phong highlight; roughness widens and softens it.\n vec3 n = normalize(vNormal);\n if (!gl_FrontFacing) n = -n;\n vec3 h = normalize(normalize(lightDirection) + normalize(vViewDir));\n float shininess = mix(96.0, 4.0, roughness);\n float specular = pow(max(dot(n, h), 0.0), shininess) * gloss;\n\n // Feather the outer boundary.\n float edgeFade = edgeSoftness > 0.0 ? smoothstep(0.0, edgeSoftness, vLipEdge) : 1.0;\n\n float coverage = design.a * lipOpacity * edgeFade;\n vec3 color = mix(base, painted, coverage) + highlightColor * specular * coverage;\n gl_FragColor = vec4(color, coverage);\n // Inputs are linear (sRGB textures decode on sample); encode for the output.\n #include <colorspace_fragment>\n}";
|
|
18
|
+
/**
|
|
19
|
+
* Create the built-in lip material as a plain three.js object. Pair it with
|
|
20
|
+
* `updateLipEffectMaterial`, or let `useLipEffectMaterial` own it. One
|
|
21
|
+
* material can be shared by several faces and lip groups.
|
|
22
|
+
*/
|
|
23
|
+
export declare const createLipEffectMaterial: () => THREE.ShaderMaterial;
|
|
24
|
+
/** Push the current inputs into a material made by `createLipEffectMaterial`. */
|
|
25
|
+
export declare const updateLipEffectMaterial: (material: THREE.ShaderMaterial, { cameraTexture, designTexture, lowerDesignTexture, settings, lipUvBounds, subtractMouth, }: LipEffectMaterialInputs) => THREE.ShaderMaterial;
|
|
26
|
+
/**
|
|
27
|
+
* Like `useLipEffectMaterial`, but allocates nothing while `enabled` is false.
|
|
28
|
+
* Lets a component keep a constant hook order without paying for materials it
|
|
29
|
+
* will not render (for example when a shared or custom material is supplied).
|
|
30
|
+
*/
|
|
31
|
+
export declare const useOptionalLipEffectMaterial: (inputs: LipEffectMaterialInputs, enabled: boolean) => THREE.ShaderMaterial | null;
|
|
32
|
+
/**
|
|
33
|
+
* Own one built-in lip material for the component's lifetime and keep it in
|
|
34
|
+
* sync with the inputs on every render. Pass the result to `LipEffect`'s
|
|
35
|
+
* `sharedMaterial`, return it from a `material` factory, or set it on a mesh.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useLipEffectMaterial: (inputs: LipEffectMaterialInputs) => THREE.ShaderMaterial;
|
|
38
|
+
/**
|
|
39
|
+
* The built-in lip material as a React node: the design texture (canonical
|
|
40
|
+
* face UV space) or a procedural fill, tinted per lip, shaded by the camera
|
|
41
|
+
* pixels under the lips, with gradient, inner-lip tint, feathered edge and
|
|
42
|
+
* specular highlight. Transparent design pixels leave the skin untouched.
|
|
43
|
+
*
|
|
44
|
+
* Each instance owns its own material; use `useLipEffectMaterial` to share one.
|
|
45
|
+
*/
|
|
46
|
+
export declare const LipEffectMaterial: (props: LipEffectMaterialProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LipEffectFaceConfig, LipEffectsProps } from './types';
|
|
2
|
+
/** The config `LipEffects` uses for one face, or `null` to skip that face. */
|
|
3
|
+
export declare const resolveLipEffectFaceConfig: (faces: LipEffectsProps["faces"], faceIndex: number) => LipEffectFaceConfig | null;
|
|
4
|
+
/**
|
|
5
|
+
* Lip effects for several tracked faces at once. Pass one config for every
|
|
6
|
+
* face, or a function that picks settings, textures or a material per face.
|
|
7
|
+
* With a single config the faces share one built-in material by default.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LipEffects: ({ maxFaces, faces, shareMaterial, maxUpdateFps, holdMs, predictMs, renderOrder, }: LipEffectsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const DEFAULT_LIP_EFFECT_RENDER_ORDER = 30;
|
|
2
|
+
/** Complete defaults: the serializable settings plus the render order. */
|
|
2
3
|
export declare const DEFAULT_LIP_EFFECT: {
|
|
4
|
+
renderOrder: number;
|
|
5
|
+
preset: import('./settings').LipEffectPreset;
|
|
6
|
+
maskMode: import('./types').LipMaskMode;
|
|
7
|
+
colorMode: import('./settings').LipEffectColorMode;
|
|
3
8
|
color: string;
|
|
4
9
|
opacity: number;
|
|
5
10
|
intensity: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
shading: number;
|
|
12
|
+
gloss: number;
|
|
13
|
+
roughness: number;
|
|
14
|
+
highlightColor: string;
|
|
15
|
+
gradientColor: string;
|
|
16
|
+
gradientAmount: number;
|
|
17
|
+
gradientDirection: import('./settings').LipEffectGradientDirection;
|
|
18
|
+
edgeSoftness: number;
|
|
19
|
+
innerLipColor: string;
|
|
20
|
+
innerLipAmount: number;
|
|
21
|
+
innerLipWidth: number;
|
|
22
|
+
splitLips: boolean;
|
|
23
|
+
lowerLipColor: string;
|
|
24
|
+
lowerLipOpacity: number;
|
|
25
|
+
textureScaleX: number;
|
|
26
|
+
textureScaleY: number;
|
|
27
|
+
textureOffsetX: number;
|
|
28
|
+
textureOffsetY: number;
|
|
29
|
+
textureRotation: number;
|
|
30
|
+
textureFlipX: boolean;
|
|
31
|
+
textureFlipY: boolean;
|
|
9
32
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export { LipEffect } from './LipEffect';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
2
|
+
export { LipEffects, resolveLipEffectFaceConfig } from './LipEffects';
|
|
3
|
+
export { LIP_EFFECT_FRAGMENT_SHADER, LIP_EFFECT_VERTEX_SHADER, LipEffectMaterial, createLipEffectMaterial, updateLipEffectMaterial, useLipEffectMaterial, } from './LipEffectMaterial';
|
|
4
|
+
export type { LipEffectMaterialInputs, LipEffectMaterialProps } from './LipEffectMaterial';
|
|
5
|
+
export { useLipDesignTextures } from './useLipDesignTextures';
|
|
6
|
+
export type { LipDesignTextureSource } from './useLipDesignTextures';
|
|
7
|
+
export { DEFAULT_LIP_EFFECT, DEFAULT_LIP_EFFECT_RENDER_ORDER } from './defaults';
|
|
8
|
+
export { DEFAULT_LIP_EFFECT_SETTINGS, LIP_EFFECT_COLOR_MODES, LIP_EFFECT_GRADIENT_DIRECTIONS, LIP_EFFECT_PRESETS, LIP_EFFECT_PRESET_KEYS, LIP_EFFECT_SETTINGS_FIELDS, createLipTextureTransform, isLipEffectPresetKey, patchLipEffectSettings, resolveLipEffectSettings, } from './settings';
|
|
9
|
+
export type { LipEffectColorMode, LipEffectGradientDirection, LipEffectPreset, LipEffectPresetKey, LipEffectSettings, } from './settings';
|
|
10
|
+
export { CANONICAL_LIP_UV_BOUNDS, LIP_UV_GUIDE_COLORS, createLipUvGuideDataUrl, createLipUvGuidePngBlob, createLipUvGuideSvg, getLipUvBounds, lipUvToPixel, } from './uvGuide';
|
|
11
|
+
export type { LipUvBounds, LipUvGuideOptions } from './uvGuide';
|
|
12
|
+
export type { LipEffectFaceConfig, LipEffectMaterialContext, LipEffectMaterialResult, LipEffectMaterialSpec, LipEffectProps, LipEffectsProps, LipMaskMode, } from './types';
|