浏览代码

stash changes

/siyaoH-1.17-PlatformMessage
Xingwei Zhu 4 年前
当前提交
26f994b8
共有 6 个文件被更改,包括 2512 次插入2547 次删除
  1. 81
      com.unity.uiwidgets/Runtime/material/animated_icons/animated_icons.cs
  2. 998
      com.unity.uiwidgets/Runtime/material/animated_icons/data/add_event.g.cs
  3. 992
      com.unity.uiwidgets/Runtime/material/animated_icons/data/arrow_menu.g.cs
  4. 992
      com.unity.uiwidgets/Runtime/material/animated_icons/data/close_menu.g.cs
  5. 998
      com.unity.uiwidgets/Runtime/material/animated_icons/data/ellipsis_search.g.cs
  6. 998
      com.unity.uiwidgets/Runtime/material/animated_icons/data/event_add.g.cs

81
com.unity.uiwidgets/Runtime/material/animated_icons/animated_icons.cs


namespace Unity.UIWidgets.material {
static class AnimatedIconUtils {
public static T _interpolate<T>(T[] values, float progress, _Interpolator<T> interpolator) {
public static float _interpolate(float[] values, float progress) {
if (values.Length == 1) {
if (values.Length == 2) {
float targetIdx = MathUtils.lerpNullableFloat(0, values.Length - 1, progress);
float targetIdx = Mathf.Lerp(0, values.Length - 1, progress);
return interpolator(values[lowIdx], values[highIdx], t);
return Mathf.Lerp(values[lowIdx], values[highIdx], t);
}
public static void _interpolateOffset(float[] values, float progress, ref float x, ref float y) {
D.assert(progress <= 1.0f);
D.assert(progress >= 0.0f);
D.assert(values.Length % 2 == 0);
if (values.Length == 2) {
x = values[0];
y = values[1];
return;
}
float targetIdx = Mathf.Lerp(0, values.Length / 2 - 1, progress);
int lowIdx = targetIdx.floor();
int highIdx = targetIdx.ceil();
float t = targetIdx - lowIdx;
x = Mathf.Lerp(values[lowIdx * 2], values[highIdx * 2], t);
y = Mathf.Lerp(values[lowIdx * 2 + 1], values[highIdx * 2 + 1], t);
}
}

}
}
struct _PathOffset {
public float dx;
public float dy;
public _PathOffset(float x, float y) {
dx = x;
dy = y;
}
public static _PathOffset lerp(_PathOffset a, _PathOffset b, float t) {
return new _PathOffset(Mathf.Lerp(a.dx, b.dx, t), Mathf.Lerp(a.dy, b.dy, t));
}
}
class _PathFrames {
public _PathFrames(
_PathCommand[] commands,

public readonly float[] opacities;
public void paint(Canvas canvas, Color color, _UiPathFactory uiPathFactory, float progress) {
float opacity = AnimatedIconUtils._interpolate<float>(opacities, progress, MathUtils.lerpNullableFloat);
float opacity = AnimatedIconUtils._interpolate(opacities, progress);
Paint paint = new Paint();
paint.style = PaintingStyle.fill;
paint.color = color.withOpacity(color.opacity * opacity);

}
class _PathMoveTo : _PathCommand {
public _PathMoveTo(Offset[] points) {
public _PathMoveTo(float[] points) {
public readonly Offset[] points;
public readonly float[] points;
Offset offset = AnimatedIconUtils._interpolate<Offset>(points, progress, Offset.lerp);
path.moveTo(offset.dx, offset.dy);
float dx = 0f, dy = 0f;
AnimatedIconUtils._interpolateOffset(points, progress, ref dx, ref dy);
path.moveTo(dx, dy);
public _PathCubicTo(Offset[] controlPoints1, Offset[] controlPoints2, Offset[] targetPoints) {
public _PathCubicTo(float[] controlPoints1, float[] controlPoints2, float[] targetPoints) {
public readonly Offset[] controlPoints2;
public readonly Offset[] controlPoints1;
public readonly Offset[] targetPoints;
public readonly float[] controlPoints2;
public readonly float[] controlPoints1;
public readonly float[] targetPoints;
Offset controlPoint1 = AnimatedIconUtils._interpolate<Offset>(controlPoints1, progress, Offset.lerp);
Offset controlPoint2 = AnimatedIconUtils._interpolate<Offset>(controlPoints2, progress, Offset.lerp);
Offset targetPoint = AnimatedIconUtils._interpolate<Offset>(targetPoints, progress, Offset.lerp);
float dx1 = 0f, dy1 = 0f, dx2 = 0f, dy2 = 0f, dx = 0f, dy = 0f;
AnimatedIconUtils._interpolateOffset(controlPoints1, progress, ref dx1, ref dy1);
AnimatedIconUtils._interpolateOffset(controlPoints2, progress, ref dx2, ref dy2);
AnimatedIconUtils._interpolateOffset(targetPoints, progress, ref dx, ref dy);
controlPoint1.dx, controlPoint1.dy,
controlPoint2.dx, controlPoint2.dy,
targetPoint.dx, targetPoint.dy
dx1, dy1,
dx2, dy2,
dx, dy
public _PathLineTo(Offset[] points) {
public _PathLineTo(float[] points) {
Offset[] points;
float[] points;
Offset point = AnimatedIconUtils._interpolate<Offset>(points, progress, Offset.lerp);
path.lineTo(point.dx, point.dy);
float dx = 0f, dy = 0f;
AnimatedIconUtils._interpolateOffset(points, progress, ref dx, ref dy);
path.lineTo(dx, dy);
}
}

998
com.unity.uiwidgets/Runtime/material/animated_icons/data/add_event.g.cs
文件差异内容过多而无法显示
查看文件

992
com.unity.uiwidgets/Runtime/material/animated_icons/data/arrow_menu.g.cs
文件差异内容过多而无法显示
查看文件

992
com.unity.uiwidgets/Runtime/material/animated_icons/data/close_menu.g.cs
文件差异内容过多而无法显示
查看文件

998
com.unity.uiwidgets/Runtime/material/animated_icons/data/ellipsis_search.g.cs
文件差异内容过多而无法显示
查看文件

998
com.unity.uiwidgets/Runtime/material/animated_icons/data/event_add.g.cs
文件差异内容过多而无法显示
查看文件

正在加载...
取消
保存