浏览代码

support clamp() in expressions, fix issue in importer

/main
Lasse Jon Fuglsang Pedersen 5 年前
当前提交
4adbcc3b
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 9
      Runtime/SnappersHeadDefinitionMath.cs
  2. 2
      Runtime/SnappersHeadImporter.cs

9
Runtime/SnappersHeadDefinitionMath.cs


{
public static class SnappersHeadDefinitionMath
{
public static float clamp(float value, float min, float max)
{
return Mathf.Clamp(value, min, max);
}
return Math.Min(a, b);
return Mathf.Min(a, b);
return Math.Max(a, b);
return Mathf.Max(a, b);
}
public static float hermite(float p0, float p1, float r0, float r1, float t)

2
Runtime/SnappersHeadImporter.cs


sb.AppendLine();
sb.AppendFormat(" public class {0}_{1}\n", csClassPrefix, "SnappersHead : SnappersHeadDefinition");
sb.AppendLine(" {");
sb.AppendLine(" public override InstanceData CreateInstanceData(Mesh sourceMesh, Transform sourceRig, Warning warnings)");
sb.AppendLine(" public override InstanceData CreateInstanceData(Mesh sourceMesh, Transform sourceRig, Warnings warnings)");
sb.AppendLine(" {");
sb.AppendLine(" return CreateInstanceData<SnappersControllers, SnappersBlendShapes>(sourceMesh, sourceRig, warnings);");
sb.AppendLine(" }");

正在加载...
取消
保存