@vincentt-xr/sdk 2.0.0-alpha.2 → 2.0.0-alpha.3

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.
Files changed (58) hide show
  1. package/GROUNDING.md +34 -9
  2. package/dist/{DebuggerUI-Cq28c18s.js → DebuggerUI-xp4bg3gH.js} +1 -1
  3. package/dist/{FaceMeshRenderer-6t8OsQhK.js → FaceMeshRenderer-CALA4k49.js} +2 -2
  4. package/dist/{FaceMeshRenderer-lQLhYIW-.cjs → FaceMeshRenderer-D4PFqsb3.cjs} +1 -1
  5. package/dist/{FaceRetouch-DtNl8-4e.cjs → FaceRetouch-Bq2rtPlV.cjs} +1 -1
  6. package/dist/{FaceRetouch-CDrL0pXg.js → FaceRetouch-DF5UsOsZ.js} +29 -29
  7. package/dist/components/MeshRenderer/index.d.ts +1 -0
  8. package/dist/components/ScreenImage/source.d.ts +3 -0
  9. package/dist/contexts-D5TQcwmv.js +660 -0
  10. package/dist/contexts-Dv1SA0bS.cjs +1 -0
  11. package/dist/debug-ui.cjs +3 -3
  12. package/dist/debug-ui.js +1246 -1205
  13. package/dist/entries/low-level.d.ts +3 -0
  14. package/dist/face-effects.cjs +1 -1
  15. package/dist/face-effects.js +3 -3
  16. package/dist/{getFaceInfo-hUKMLFcr.js → getFaceInfo-Cjcgcc4w.js} +1 -1
  17. package/dist/{getFaceInfo-CyPAKh3h.cjs → getFaceInfo-oQcP40Ha.cjs} +1 -1
  18. package/dist/hooks/useXRModel.d.ts +5 -0
  19. package/dist/{index-DSpzjuqd.cjs → index-Be-S7uSm.cjs} +1 -1
  20. package/dist/index-DdWBnI7A.cjs +17 -0
  21. package/dist/{index-Di70KWuY.js → index-DpVIEBHw.js} +844 -825
  22. package/dist/index-DqhqBi7O.cjs +1 -0
  23. package/dist/{index-UC0Ux38E.js → index-HxT9XEuh.js} +1 -1
  24. package/dist/index-N7C6fNah.js +214 -0
  25. package/dist/index-UU5ODHGU.cjs +1 -0
  26. package/dist/{index-BgQAX8rs.js → index-YMUaJU7U.js} +122 -119
  27. package/dist/{internal-DuMPpcbp.js → internal-D7NxAsc6.js} +2 -2
  28. package/dist/internal.js +1 -1
  29. package/dist/low-level.cjs +1 -1
  30. package/dist/low-level.js +399 -490
  31. package/dist/main.cjs +1 -1
  32. package/dist/main.js +26 -26
  33. package/dist/{renderGroups-C9QJrAXu.js → renderGroups-JEXqSACh.js} +1 -1
  34. package/dist/{renderGroups-Dvm1J4lW.cjs → renderGroups-uXXsFpvw.cjs} +1 -1
  35. package/dist/{renderPasses-CT5iBwtg.cjs → renderPasses-CVWt0t8m.cjs} +2 -2
  36. package/dist/{renderPasses-CjgG_6kQ.js → renderPasses-CdGZeHHL.js} +4 -4
  37. package/dist/scene-object.cjs +1 -1
  38. package/dist/scene-object.js +2 -2
  39. package/dist/{selectors-Dw3C-gSk.js → selectors-twqYByYZ.js} +3 -3
  40. package/dist/texture/animatedTexture.d.ts +2 -0
  41. package/dist/texture/gifReader.d.ts +17 -0
  42. package/dist/texture/gifTextureSource.d.ts +16 -0
  43. package/dist/tracking.cjs +1 -1
  44. package/dist/tracking.js +8 -8
  45. package/dist/{useFaceInfo-CwsHZedC.js → useFaceInfo-DOJCGlDG.js} +2 -2
  46. package/dist/{useFaceInfo-C-WfMlYp.cjs → useFaceInfo-DSUmuzzO.cjs} +1 -1
  47. package/dist/{useFaceResults-VcFdOUFV.cjs → useFaceResults-B1BSGUAW.cjs} +1 -1
  48. package/dist/{useFaceResults-CkFc1egZ.js → useFaceResults-CBmhT5E8.js} +1 -1
  49. package/docs/api/screen-image.mdx +27 -3
  50. package/docs/api/texture-sources.mdx +25 -6
  51. package/docs/texture-api-consumer.md +26 -0
  52. package/package.json +3 -3
  53. package/dist/contexts-BKvTIayr.cjs +0 -1
  54. package/dist/contexts-Bk5zz_VR.js +0 -214
  55. package/dist/index-82aENaRq.cjs +0 -1
  56. package/dist/index-CEc1CAmB.cjs +0 -1
  57. package/dist/index-CTHeBQOs.js +0 -178
  58. package/dist/index-DzEzkBIH.cjs +0 -17
package/GROUNDING.md CHANGED
@@ -249,7 +249,7 @@ import { ScreenImage, ScreenSpaceUI } from "@vincentt-xr/sdk";
249
249
 
250
250
  Props:
251
251
 
252
- - `source`: `{ kind: "default" }`, `{ kind: "image", src }`, or `{ kind: "texture", texture }`.
252
+ - `source`: `{ kind: "default" }`, `{ kind: "image", src }`, `{ kind: "gif", src }`, or `{ kind: "texture", texture }`.
253
253
  - `src`: shorthand for `{ kind: "image", src }`.
254
254
  - `fit`: `"stretch" | "contain" | "cover"`; default `"contain"`.
255
255
  - `coordinateSpace`: `"normalized" | "canvas"`; default `"normalized"`.
@@ -275,9 +275,16 @@ Settings:
275
275
  position, size, rotation, pivot, render order, overlay/depth behavior, and visibility.
276
276
  - `DEFAULT_SCREEN_IMAGE_SETTINGS.image`: source kind, src, fit, opacity, color,
277
277
  flips, transparency, and alpha test.
278
- - The component source union is intentionally small: `default`, static `image`,
279
- and an already-loaded Three `texture`. Video/GIF/sequence providers resolve
280
- their media to a live `THREE.Texture` and pass it as `kind: "texture"`.
278
+ - GIF URLs are decoded inside `ScreenImage` into a canvas texture. The decoder
279
+ preserves the GIF canvas size, frame delays, optimized partial-frame
280
+ compositing, and disposal rules before fitting the texture to the authored
281
+ rectangle. GIF playback streams into one working canvas buffer plus an
282
+ optional restore buffer; it does not retain every decoded full frame. Sources
283
+ over 5 MB, 1,000,000 decoded pixels, or 180 frames are rejected with a warning
284
+ and fall back to the default texture. Keep authored GIFs around 3-5 MB for
285
+ mobile AR.
286
+ - Video and image-sequence providers resolve their media to a live
287
+ `THREE.Texture` and pass it as `kind: "texture"`.
281
288
 
282
289
  Use `<ScreenImage>` instead of hand-authoring `<ScreenTransform>` + `<mesh>`
283
290
  when the object is conceptually a 2D screen image. Use the lower-level mesh path
@@ -1146,7 +1153,9 @@ Supported source behavior:
1146
1153
  - Image: static URL texture. No playback controls.
1147
1154
  - Runtime texture: pass `{ kind: "texture", texture }` when supplying an existing `THREE.Texture`.
1148
1155
  - Video: use a managed `THREE.VideoTexture`; support play/pause, restart, frame stepping, playback rate, forward, and reverse stepping. Negative `playbackRate` is not used.
1149
- - GIF: decode frames into a canvas texture. Preserve GIF dimensions and per-frame delays before applying ScreenImage fitting.
1156
+ - GIF: pass `{ kind: "gif", src }` to `ScreenImage`. The SDK decodes frames into
1157
+ a canvas texture, preserves dimensions and per-frame delays, coalesces
1158
+ optimized partial frames, and applies disposal rules before fitting.
1150
1159
  - Image sequence: draw loaded frames into a canvas texture using FPS and frame state.
1151
1160
 
1152
1161
  Animated sources support forward, reverse, ping-pong, random, looping, finite loop
@@ -1167,10 +1176,12 @@ Low-level texture integration imports from `@vincentt-xr/sdk/low-level`:
1167
1176
  import {
1168
1177
  BasicAnimatedTextureController,
1169
1178
  createTextureSourceResolver,
1179
+ gifTextureSourceProvider,
1170
1180
  getPlaybackFrame,
1171
1181
  getSequenceFrame,
1172
1182
  type AnimatedTextureController,
1173
1183
  type AnimatedTexturePlayMode,
1184
+ type GifTextureSource,
1174
1185
  type ResolvedTextureSource,
1175
1186
  type TextureSourceResolver,
1176
1187
  type TextureSourceProvider,
@@ -1183,6 +1194,17 @@ Controller lifecycle is: `play()`, `pause()`, `restart()`, optional `seek()`,
1183
1194
  `getSnapshot()` for state, frame/time, duration, frame count, loop, and errors;
1184
1195
  check `capabilities` before rendering a control.
1185
1196
 
1197
+ `gifTextureSourceProvider` is the built-in GIF resolver provider used by
1198
+ `ScreenImage`. It returns a `ResolvedTextureSource` with a
1199
+ `BasicAnimatedTextureController` and streams playback through a bounded canvas
1200
+ buffer instead of retaining all decoded frames. Custom resolver users can compose
1201
+ it directly when they need controller access for pause, restart, forward playback,
1202
+ loop, typed events, and ownership-safe disposal. Because GIF playback is streamed
1203
+ instead of full-frame cached, seeking and random/reverse/ping-pong playback are
1204
+ not advertised capabilities. Loop restart clears the streamed working buffer
1205
+ before frame 0 so optimized partial-frame GIFs do not carry stale pixels across
1206
+ cycles.
1207
+
1186
1208
  Frame helpers are also available from the same `/low-level` door:
1187
1209
  `getPlaybackFrame(tick, frameCount, mode, loop, loopCount)` handles forward,
1188
1210
  reverse, ping-pong, random, loop, and ended math; `getSequenceFrame(elapsedSeconds,
@@ -1275,6 +1297,8 @@ renderable mesh itself. Disabled or invisible settings render nothing.
1275
1297
  the primitive mesh.
1276
1298
  - `assetNodeName?`: optional object name inside the loaded GLTF scene. When
1277
1299
  missing or unresolved, the whole cloned scene renders.
1300
+ - `assetAnimation?`: optional animation clip name to play. Use `"all"` to play
1301
+ every clip; otherwise provide the exact clip name.
1278
1302
  - `material.type`: `"standard" | "basic"`.
1279
1303
  - `material.color`, `opacity`, `wireframe`, `roughness`, `metalness`: material
1280
1304
  overrides. Wireframe belongs to material state, not geometry state.
@@ -1294,10 +1318,11 @@ renderable mesh itself. Disabled or invisible settings render nothing.
1294
1318
  - `shadowMode`: `"off" | "cast" | "receive" | "castReceive"`.
1295
1319
 
1296
1320
  Current GLTF support is intentionally first-pass: the renderer clones the loaded
1297
- scene and applies color, opacity, wireframe, render-state fields, and shadow
1298
- flags to cloned mesh materials.
1299
- Do not rely on it yet for advanced material graph preservation, animation,
1300
- skinning behavior, or production asset lifecycle guarantees.
1321
+ scene, preserves authored GLB material colors, and applies opacity, wireframe,
1322
+ render-state fields, and shadow flags to cloned mesh materials. `assetAnimation`
1323
+ plays named clips or all clips while preserving playback when material settings
1324
+ change. Do not rely on it yet for advanced material graph preservation or
1325
+ production asset lifecycle guarantees.
1301
1326
 
1302
1327
  Render-state defaults preserve current behavior: depth test/write on,
1303
1328
  `lessEqual` depth function, color write on, back-face culling, normal blending,
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as r, Fragment as f } from "react/jsx-runtime";
2
2
  import { useState as P, useEffect as M } from "react";
3
3
  import { createPortal as F } from "react-dom";
4
- import { f as i } from "./internal-DuMPpcbp.js";
4
+ import { f as i } from "./internal-D7NxAsc6.js";
5
5
  const z = {
6
6
  position: "fixed",
7
7
  top: "10px",
@@ -4,8 +4,8 @@ import { useMemo as q, useRef as l, useState as We, useCallback as Ge, useEffect
4
4
  import * as g from "three";
5
5
  import { MathUtils as Xe, Color as Gt, Vector2 as ze } from "three";
6
6
  import { l as ne, f as zt, X as Nt } from "./index-JygePOwo.js";
7
- import { c as Ht, b as Bt } from "./selectors-Dw3C-gSk.js";
8
- import { t as Vt, p as Wt, b as Xt } from "./index-BgQAX8rs.js";
7
+ import { c as Ht, u as Bt } from "./selectors-twqYByYZ.js";
8
+ import { t as Vt, p as Wt, b as Xt } from "./index-YMUaJU7U.js";
9
9
  import { TransformControls as jt } from "@react-three/drei";
10
10
  const Re = 8, K = {
11
11
  type: "linear",
@@ -1,4 +1,4 @@
1
- "use strict";const u=require("react/jsx-runtime"),ee=require("@react-three/fiber"),i=require("react"),J=require("three"),q=require("./index-D4bLzBr6.cjs"),je=require("./selectors-2QvO5RYY.cjs"),_e=require("./index-82aENaRq.cjs"),Xt=require("@react-three/drei");function Wt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const y=Wt(J),ue=8,V={type:"linear",stops:[{offset:0,color:"#38bdf8"},{offset:1,color:"#a78bfa"}],angle:0,center:{x:.5,y:.5},radius:.5},Yt=e=>{const n=e.slice(0,ue).map(t=>({...t,offset:J.MathUtils.clamp(t.offset,0,1)})).sort((t,r)=>t.offset-r.offset);return n.length>=2?n:V.stops.map(t=>({...t}))},Be=e=>({...V,...e,center:{...V.center,...e==null?void 0:e.center},radius:Math.max(.01,(e==null?void 0:e.radius)??V.radius),stops:Yt((e==null?void 0:e.stops)??V.stops)}),Kt=`
1
+ "use strict";const u=require("react/jsx-runtime"),ee=require("@react-three/fiber"),i=require("react"),J=require("three"),q=require("./index-D4bLzBr6.cjs"),je=require("./selectors-2QvO5RYY.cjs"),_e=require("./index-DqhqBi7O.cjs"),Xt=require("@react-three/drei");function Wt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const y=Wt(J),ue=8,V={type:"linear",stops:[{offset:0,color:"#38bdf8"},{offset:1,color:"#a78bfa"}],angle:0,center:{x:.5,y:.5},radius:.5},Yt=e=>{const n=e.slice(0,ue).map(t=>({...t,offset:J.MathUtils.clamp(t.offset,0,1)})).sort((t,r)=>t.offset-r.offset);return n.length>=2?n:V.stops.map(t=>({...t}))},Be=e=>({...V,...e,center:{...V.center,...e==null?void 0:e.center},radius:Math.max(.01,(e==null?void 0:e.radius)??V.radius),stops:Yt((e==null?void 0:e.stops)??V.stops)}),Kt=`
2
2
  varying vec2 vPosition;
3
3
  void main() {
4
4
  vPosition = position.xy;
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./FaceMeshRenderer-lQLhYIW-.cjs"),M=require("react/jsx-runtime"),S=require("react"),D=require("./index-D4bLzBr6.cjs"),y=require("./index-82aENaRq.cjs"),T=require("@react-three/fiber"),U=require("three"),B=require("./selectors-2QvO5RYY.cjs");function N(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const p=N(U),w={enabled:!1,strength:1,faceWidth:0,faceHeight:0,faceRoundness:0,midfaceHeight:0,foreheadHeight:0,foreheadWidth:0,cheekboneWidth:0,cheekWidth:0,cheekHollowness:0,midfaceDepth:0,scalpHeight:0,headCurve:0,faceTwist:0,faceSwirl:0,browDistance:0,browHeight:0,browDepth:0,eyeSize:0,leftEyeSize:0,rightEyeSize:0,eyeDistance:0,leftEyeX:0,rightEyeX:0,leftEyeY:0,rightEyeY:0,noseSize:0,noseLength:0,mouthWidth:0,mouthHeight:0,jawWidth:0,chinHeight:0},I={...w,enabled:!0,strength:1,faceWidth:-.08,faceHeight:.04,foreheadHeight:.04,cheekWidth:-.04,eyeSize:.08,eyeDistance:.03,noseSize:-.05,noseLength:.03,mouthWidth:.06,mouthHeight:.02,jawWidth:-.05,chinHeight:.03},X=[{label:"Wireframe",value:o.FACE_MESH_MATERIAL_TYPES.wireframe},{label:"Basic",value:o.FACE_MESH_MATERIAL_TYPES.basic},{label:"Standard",value:o.FACE_MESH_MATERIAL_TYPES.standard},{label:"Physical",value:o.FACE_MESH_MATERIAL_TYPES.physical},{label:"Toon",value:o.FACE_MESH_MATERIAL_TYPES.toon},{label:"Normal",value:o.FACE_MESH_MATERIAL_TYPES.normal},{label:"Matcap",value:o.FACE_MESH_MATERIAL_TYPES.matcap},{label:"Shader",value:o.FACE_MESH_MATERIAL_TYPES.shader}],W=[{label:"Original Face",value:o.FACE_MESH_SHADER_PRESETS.originalFace},{label:"Composite",value:o.FACE_MESH_SHADER_PRESETS.composite}],Y=[{label:"Front",value:o.FACE_MESH_SIDES.front},{label:"Back",value:o.FACE_MESH_SIDES.back},{label:"Double",value:o.FACE_MESH_SIDES.double}],j=[{label:"None",value:o.FACE_MESH_TEXTURE_MAPS.none},{label:"UV Map 1",value:o.FACE_MESH_TEXTURE_MAPS.canonical},{label:"UV Map 2",value:o.FACE_MESH_TEXTURE_MAPS.style2}],q=[{label:"None",value:o.FACE_MESH_ALPHA_MAPS.none},{label:"Default Mask",value:o.FACE_MESH_ALPHA_MAPS.canonical}],G=[{label:"Solid",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.solid},{label:"Gradient",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.gradient},{label:"Image URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.imageUrl},{label:"Media URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.mediaUrl}],V=[{label:"Normal",value:o.FACE_MESH_BLEND_MODES.normal},{label:"Add",value:o.FACE_MESH_BLEND_MODES.add},{label:"Subtract",value:o.FACE_MESH_BLEND_MODES.subtract},{label:"Multiply",value:o.FACE_MESH_BLEND_MODES.multiply},{label:"Screen",value:o.FACE_MESH_BLEND_MODES.screen},{label:"Overlay",value:o.FACE_MESH_BLEND_MODES.overlay},{label:"Soft Light",value:o.FACE_MESH_BLEND_MODES.softLight},{label:"Hard Light",value:o.FACE_MESH_BLEND_MODES.hardLight},{label:"Lighten",value:o.FACE_MESH_BLEND_MODES.lighten},{label:"Darken",value:o.FACE_MESH_BLEND_MODES.darken},{label:"Difference",value:o.FACE_MESH_BLEND_MODES.difference},{label:"Exclusion",value:o.FACE_MESH_BLEND_MODES.exclusion}],K=`
1
+ "use strict";const o=require("./FaceMeshRenderer-D4PFqsb3.cjs"),M=require("react/jsx-runtime"),S=require("react"),D=require("./index-D4bLzBr6.cjs"),y=require("./index-DqhqBi7O.cjs"),T=require("@react-three/fiber"),U=require("three"),B=require("./selectors-2QvO5RYY.cjs");function N(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const p=N(U),w={enabled:!1,strength:1,faceWidth:0,faceHeight:0,faceRoundness:0,midfaceHeight:0,foreheadHeight:0,foreheadWidth:0,cheekboneWidth:0,cheekWidth:0,cheekHollowness:0,midfaceDepth:0,scalpHeight:0,headCurve:0,faceTwist:0,faceSwirl:0,browDistance:0,browHeight:0,browDepth:0,eyeSize:0,leftEyeSize:0,rightEyeSize:0,eyeDistance:0,leftEyeX:0,rightEyeX:0,leftEyeY:0,rightEyeY:0,noseSize:0,noseLength:0,mouthWidth:0,mouthHeight:0,jawWidth:0,chinHeight:0},I={...w,enabled:!0,strength:1,faceWidth:-.08,faceHeight:.04,foreheadHeight:.04,cheekWidth:-.04,eyeSize:.08,eyeDistance:.03,noseSize:-.05,noseLength:.03,mouthWidth:.06,mouthHeight:.02,jawWidth:-.05,chinHeight:.03},X=[{label:"Wireframe",value:o.FACE_MESH_MATERIAL_TYPES.wireframe},{label:"Basic",value:o.FACE_MESH_MATERIAL_TYPES.basic},{label:"Standard",value:o.FACE_MESH_MATERIAL_TYPES.standard},{label:"Physical",value:o.FACE_MESH_MATERIAL_TYPES.physical},{label:"Toon",value:o.FACE_MESH_MATERIAL_TYPES.toon},{label:"Normal",value:o.FACE_MESH_MATERIAL_TYPES.normal},{label:"Matcap",value:o.FACE_MESH_MATERIAL_TYPES.matcap},{label:"Shader",value:o.FACE_MESH_MATERIAL_TYPES.shader}],W=[{label:"Original Face",value:o.FACE_MESH_SHADER_PRESETS.originalFace},{label:"Composite",value:o.FACE_MESH_SHADER_PRESETS.composite}],Y=[{label:"Front",value:o.FACE_MESH_SIDES.front},{label:"Back",value:o.FACE_MESH_SIDES.back},{label:"Double",value:o.FACE_MESH_SIDES.double}],j=[{label:"None",value:o.FACE_MESH_TEXTURE_MAPS.none},{label:"UV Map 1",value:o.FACE_MESH_TEXTURE_MAPS.canonical},{label:"UV Map 2",value:o.FACE_MESH_TEXTURE_MAPS.style2}],q=[{label:"None",value:o.FACE_MESH_ALPHA_MAPS.none},{label:"Default Mask",value:o.FACE_MESH_ALPHA_MAPS.canonical}],G=[{label:"Solid",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.solid},{label:"Gradient",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.gradient},{label:"Image URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.imageUrl},{label:"Media URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.mediaUrl}],V=[{label:"Normal",value:o.FACE_MESH_BLEND_MODES.normal},{label:"Add",value:o.FACE_MESH_BLEND_MODES.add},{label:"Subtract",value:o.FACE_MESH_BLEND_MODES.subtract},{label:"Multiply",value:o.FACE_MESH_BLEND_MODES.multiply},{label:"Screen",value:o.FACE_MESH_BLEND_MODES.screen},{label:"Overlay",value:o.FACE_MESH_BLEND_MODES.overlay},{label:"Soft Light",value:o.FACE_MESH_BLEND_MODES.softLight},{label:"Hard Light",value:o.FACE_MESH_BLEND_MODES.hardLight},{label:"Lighten",value:o.FACE_MESH_BLEND_MODES.lighten},{label:"Darken",value:o.FACE_MESH_BLEND_MODES.darken},{label:"Difference",value:o.FACE_MESH_BLEND_MODES.difference},{label:"Exclusion",value:o.FACE_MESH_BLEND_MODES.exclusion}],K=`
2
2
  varying vec2 vUv;
3
3
 
4
4
  void main() {
@@ -1,11 +1,11 @@
1
- import { g as p, h as _, i as w, j as A, F as y, e as u, f as k } from "./FaceMeshRenderer-6t8OsQhK.js";
1
+ import { g as p, h as _, i as w, j as A, F as y, e as c, f as k } from "./FaceMeshRenderer-CALA4k49.js";
2
2
  import { jsx as x, jsxs as W } from "react/jsx-runtime";
3
3
  import { useMemo as b, useEffect as P } from "react";
4
4
  import { X } from "./index-JygePOwo.js";
5
- import { u as I } from "./index-BgQAX8rs.js";
5
+ import { u as I } from "./index-YMUaJU7U.js";
6
6
  import { useThree as Y, useFrame as V } from "@react-three/fiber";
7
7
  import * as g from "three";
8
- import { b as G } from "./selectors-Dw3C-gSk.js";
8
+ import { u as G } from "./selectors-twqYByYZ.js";
9
9
  const j = {
10
10
  enabled: !1,
11
11
  strength: 1,
@@ -85,18 +85,18 @@ const j = {
85
85
  { label: "Image URL", value: k.imageUrl },
86
86
  { label: "Media URL", value: k.mediaUrl }
87
87
  ], Ce = [
88
- { label: "Normal", value: u.normal },
89
- { label: "Add", value: u.add },
90
- { label: "Subtract", value: u.subtract },
91
- { label: "Multiply", value: u.multiply },
92
- { label: "Screen", value: u.screen },
93
- { label: "Overlay", value: u.overlay },
94
- { label: "Soft Light", value: u.softLight },
95
- { label: "Hard Light", value: u.hardLight },
96
- { label: "Lighten", value: u.lighten },
97
- { label: "Darken", value: u.darken },
98
- { label: "Difference", value: u.difference },
99
- { label: "Exclusion", value: u.exclusion }
88
+ { label: "Normal", value: c.normal },
89
+ { label: "Add", value: c.add },
90
+ { label: "Subtract", value: c.subtract },
91
+ { label: "Multiply", value: c.multiply },
92
+ { label: "Screen", value: c.screen },
93
+ { label: "Overlay", value: c.overlay },
94
+ { label: "Soft Light", value: c.softLight },
95
+ { label: "Hard Light", value: c.hardLight },
96
+ { label: "Lighten", value: c.lighten },
97
+ { label: "Darken", value: c.darken },
98
+ { label: "Difference", value: c.difference },
99
+ { label: "Exclusion", value: c.exclusion }
100
100
  ], q = `
101
101
  varying vec2 vUv;
102
102
 
@@ -243,7 +243,7 @@ const j = {
243
243
  clipMaxX: d = 1,
244
244
  renderOrder: h = -1e3
245
245
  }) => {
246
- const { camera: c, size: m } = Y(), R = G(), s = b(
246
+ const { camera: u, size: m } = Y(), R = G(), s = b(
247
247
  () => ({
248
248
  cameraTexture: { value: null },
249
249
  retouchMaskTexture: { value: null },
@@ -260,11 +260,11 @@ const j = {
260
260
  }),
261
261
  []
262
262
  ), E = b(() => {
263
- if (!c.isPerspectiveCamera)
263
+ if (!u.isPerspectiveCamera)
264
264
  return [10, 10];
265
- const T = c, D = (T.position.z || 5) - -1, N = g.MathUtils.degToRad(T.fov), F = 2 * Math.tan(N / 2) * D;
265
+ const T = u, D = (T.position.z || 5) - -1, N = g.MathUtils.degToRad(T.fov), F = 2 * Math.tan(N / 2) * D;
266
266
  return [F * (m.width / m.height), F];
267
- }, [c, m]);
267
+ }, [u, m]);
268
268
  return V(() => {
269
269
  s.cameraTexture.value = R ?? null, s.retouchMaskTexture.value = e, s.texelSize.value.set(1 / Math.max(m.width, 1), 1 / Math.max(m.height, 1)), s.retouchAmount.value = a, s.blurRadius.value = r, s.detailPreservation.value = t, s.blemishReduction.value = o, s.blemishRadius.value = l, s.previewMask.value = i ? 1 : 0, s.protectLandmarks.value = v ? 1 : 0, s.clipMinX.value = n, s.clipMaxX.value = d;
270
270
  }), R ? /* @__PURE__ */ x("group", { position: [0, 0, -1], children: /* @__PURE__ */ W("mesh", { renderOrder: h, children: [
@@ -407,10 +407,10 @@ const j = {
407
407
  }, U = (e, a, r) => {
408
408
  const t = f(a, 10, r), o = f(a, 103, r), l = f(a, 332, r), i = f(a, 105, r), v = f(a, 334, r);
409
409
  if (!t || !o || !l || !i || !v) return;
410
- const n = (i.y + v.y) * 0.5, d = Math.abs(l.x - o.x), h = Math.max(Math.abs(n - t.y) * 0.72, d * 0.08), c = Math.max(0, t.y - h), m = h * 0.34;
411
- e.beginPath(), e.moveTo(o.x, o.y - m), e.quadraticCurveTo((o.x + t.x) * 0.5, c, t.x, c), e.quadraticCurveTo(
410
+ const n = (i.y + v.y) * 0.5, d = Math.abs(l.x - o.x), h = Math.max(Math.abs(n - t.y) * 0.72, d * 0.08), u = Math.max(0, t.y - h), m = h * 0.34;
411
+ e.beginPath(), e.moveTo(o.x, o.y - m), e.quadraticCurveTo((o.x + t.x) * 0.5, u, t.x, u), e.quadraticCurveTo(
412
412
  (l.x + t.x) * 0.5,
413
- c,
413
+ u,
414
414
  l.x,
415
415
  l.y - m
416
416
  ), e.lineTo(v.x, n), e.quadraticCurveTo(t.x, n + h * 0.16, i.x, n), e.closePath(), e.fill();
@@ -469,10 +469,10 @@ const j = {
469
469
  step: 0.01
470
470
  },
471
471
  { key: "previewMask", label: "Preview mask", type: "boolean" }
472
- ], ce = (e) => {
472
+ ], ue = (e) => {
473
473
  const a = Number(e);
474
474
  return Number.isFinite(a) ? Math.max(0, Math.round(a)) : 0;
475
- }, ue = (e, a) => {
475
+ }, ce = (e, a) => {
476
476
  const r = Number(a);
477
477
  return Number.isFinite(r) ? Math.max(e + 1, Math.round(r)) : e + 1;
478
478
  }, M = {
@@ -504,7 +504,7 @@ const j = {
504
504
  clipMaxX: v = 1,
505
505
  renderOrder: n
506
506
  }) => {
507
- const d = ce(e), h = ue(d, a), c = O({
507
+ const d = ue(e), h = ce(d, a), u = O({
508
508
  skinSmoothing: r,
509
509
  skinRealism: t,
510
510
  blemishReduction: o,
@@ -520,12 +520,12 @@ const j = {
520
520
  K,
521
521
  {
522
522
  retouchMask: E.texture,
523
- retouchAmount: c.skinSmoothing,
523
+ retouchAmount: u.skinSmoothing,
524
524
  blurRadius: S.blurRadius,
525
- detailPreservation: c.skinRealism,
526
- blemishReduction: c.blemishReduction,
525
+ detailPreservation: u.skinRealism,
526
+ blemishReduction: u.blemishReduction,
527
527
  blemishRadius: S.blemishRadius,
528
- previewMask: c.previewMask,
528
+ previewMask: u.previewMask,
529
529
  protectLandmarks: S.protectLandmarks,
530
530
  clipMinX: i,
531
531
  clipMaxX: v,
@@ -30,6 +30,7 @@ export type MeshRendererSettings = {
30
30
  /** Optional GLTF/GLB asset URL. When set, renders the imported asset instead of a primitive. */
31
31
  assetUrl?: string;
32
32
  assetNodeName?: string;
33
+ assetAnimation?: ("all" & {}) | (string & {});
33
34
  material: {
34
35
  type: MeshRendererMaterialType;
35
36
  color: string;
@@ -4,6 +4,9 @@ export type ScreenImageSource = {
4
4
  } | {
5
5
  kind: "image";
6
6
  src: string;
7
+ } | {
8
+ kind: "gif";
9
+ src: string;
7
10
  } | {
8
11
  kind: "texture";
9
12
  texture: THREE.Texture;