interpolate method

Vertex interpolate(
  1. Vertex other,
  2. double t
)

Implementation

Vertex interpolate(Vertex other, double t) {
  return Vertex(
    position.clone().lerp(other.position, t),
    normal.clone().lerp(other.normal, t),
    uv.clone().lerp(other.uv, t),
    other.color != null?color?.clone().lerp(other.color!,t):null
  );
}