Skip to content

Commit 1d77a90

Browse files
committed
Simplify mappers
1 parent 25349ae commit 1d77a90

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

ExpressionStrategies/IExpressionMapper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ public static string GetParamToMap(string oscAddress)
1111
}
1212

1313
public void handleOSCMessage(OSCMessage message);
14-
public void UpdateVRCFTEyeData( ref UnifiedEyeData eyeData, ref UnifiedExpressionShape[] eyeShapes);
1514
}

ExpressionStrategies/V1Mapper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.Extensions.Logging;
2+
using VRCFaceTracking;
23
using VRCFaceTracking.Core.Params.Data;
34
using VRCFaceTracking.Core.Params.Expressions;
45
using VRCFaceTracking.Core.Types;
@@ -29,6 +30,7 @@ public void handleOSCMessage(OSCMessage message)
2930
if (_parameterValues.ContainsKey(paramToMap))
3031
{
3132
_parameterValues[paramToMap] = message.value;
33+
UpdateVRCFTEyeData(ref UnifiedTracking.Data.Eye, ref UnifiedTracking.Data.Shapes);
3234
}
3335
}
3436

@@ -43,7 +45,7 @@ private void HandleEyeOpenness(ref UnifiedEyeData eyeData, ref UnifiedExpression
4345
// so how it works, currently we cannot output values above 1.0 and below 0.0
4446
// which means, we cannot really output whether someone's squeezing their eyes
4547
// or making a surprised face. Therefore, we kinda have to cheat.
46-
// If detect that the values provided by ETVR are below or above a certain threshold
48+
// If we detect that the values provided by ETVR are below or above a certain threshold
4749
// we fake the squeeze and widen
4850

4951
// todo, make this configurable via OSC commands I guess, or we switch to sockets

ExpressionsMapper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using ETVRTrackingModule.ExpressionStrategies;
22
using Microsoft.Extensions.Logging;
3-
using VRCFaceTracking;
43

54
namespace ETVRTrackingModule
65
{
@@ -26,7 +25,6 @@ public void MapMessage(OSCMessage msg)
2625
_mappingStrategy = nextStrategy;
2726
}
2827
_mappingStrategy.handleOSCMessage(msg);
29-
_mappingStrategy.UpdateVRCFTEyeData(ref UnifiedTracking.Data.Eye, ref UnifiedTracking.Data.Shapes);
3028
}
3129

3230
private bool IsV2Param(OSCMessage oscMessage)

0 commit comments

Comments
 (0)