Auxiliary SDK module that enhances the Player with a feature like:
face_tracker.zip
background.zip
hair.zip
lips.zip
eyes.zip
skin.zip
body.zip
hands.zip
Creates a module from Url
const frx = new Module("/path/to/face_tracker.zip.zip") Copy
const frx = new Module("/path/to/face_tracker.zip.zip")
Creates a module from Request
const frx = new Module(new Request( "/path/to/face_tracker.zip", { headers: { etag: "\"a610ceb58d4fa6b8b13dff520339ba88\"" } },)) Copy
const frx = new Module(new Request( "/path/to/face_tracker.zip", { headers: { etag: "\"a610ceb58d4fa6b8b13dff520339ba88\"" } },))
Creates a module from Blob
const file = $("#file-upload").files[0] // File is subclass of Blobconst frx = new Module(file) Copy
const file = $("#file-upload").files[0] // File is subclass of Blobconst frx = new Module(file)
Static
Creates a module by preloading it from Url
Optional
const frx = await Module.preload("/path/to/face_tracker.zip") Copy
const frx = await Module.preload("/path/to/face_tracker.zip")
// with a progress listenerconst onProgress = ({ total, transferred }) => { console.log(`Module is loaded on ${100 * transferred / total}%`)}const frx = await Module.preload("/path/to/face_tracker.zip", { onProgress }) Copy
// with a progress listenerconst onProgress = ({ total, transferred }) => { console.log(`Module is loaded on ${100 * transferred / total}%`)}const frx = await Module.preload("/path/to/face_tracker.zip", { onProgress })
Creates an array of modules by preloading them from a list of Urls
const [frx, background] = await Module.preload(["modules/face_tracker.zip", "modules/background.zip"]) Copy
const [frx, background] = await Module.preload(["modules/face_tracker.zip", "modules/background.zip"])
// with a progress listenerconst onProgress = (effectIndex, { total, transferred }) => { console.log(`Module #${effectIndex} is loaded on ${100 * transferred / total}%`)}const [frx, background] = await Module.preload( ["effects/face_tracker.zip", "effects/background.zip"], { onProgress },) Copy
// with a progress listenerconst onProgress = (effectIndex, { total, transferred }) => { console.log(`Module #${effectIndex} is loaded on ${100 * transferred / total}%`)}const [frx, background] = await Module.preload( ["effects/face_tracker.zip", "effects/background.zip"], { onProgress },)
Auxiliary SDK module that enhances the Player with a feature like:
face_tracker.zip- face tracking module, required for all the effects relying on face positionbackground.zip- background segmentation module, required for all the Background effectshair.zip- hair segmentation modulelips.zip- lips segmentation moduleeyes.zip- eyes segmentation moduleskin.zip- face and neck skin segmentation modulebody.zip- body segmentation module, opposite to background segmentationhands.zip- hands segmentation module