squishDeformation static method

Matrix4 squishDeformation(
  1. DoughTransformerContext context
)

A utility method which creates the default dough squishing Matrix4. The resulting Matrix4 doesn't apply translations, only other warping deformations based on the DoughTransformerContext.recipe.

You can basically think of this as the core squish behavior.

Implementation

static Matrix4 squishDeformation(DoughTransformerContext context) {
  return perspectiveWarp(context)
      .multiplied(viscositySkew(context))
      .multiplied(expansion(context));
}