@iam-protocol/pulse-sdk 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/pulse.ts +12 -3
package/dist/index.mjs
CHANGED
|
@@ -1362,7 +1362,8 @@ async function extractFeatures(data) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
const audioFeatures = await extractSpeakerFeatures(data.audio);
|
|
1364
1364
|
const hasMotion = data.motion.length >= MIN_MOTION_SAMPLES;
|
|
1365
|
-
const
|
|
1365
|
+
const hasTouch = data.touch.length >= MIN_TOUCH_SAMPLES;
|
|
1366
|
+
const motionFeatures = hasMotion && hasTouch ? extractMouseDynamics(data.touch) : hasMotion ? extractMotionFeatures(data.motion) : extractMouseDynamics(data.touch);
|
|
1366
1367
|
const touchFeatures = extractTouchFeatures(data.touch);
|
|
1367
1368
|
return fuseFeatures(audioFeatures, motionFeatures, touchFeatures);
|
|
1368
1369
|
}
|