transform method

  1. @override
Matrix4 transform(
  1. DoughTransformerContext context
)
override

Creates the Matrix4 which will be used to transform the Dough.child widget.

Implementation

@override
Matrix4 transform(DoughTransformerContext context) {
  final translate = Matrix4.translationValues(
    context.delta.x * context.t / context.recipe.adhesion,
    context.delta.y * context.t / context.recipe.adhesion,
    0,
  );

  return translate
      .multiplied(DoughTransformations.squishDeformation(context));
}