nextToPoint method

void nextToPoint(
  1. Vector3 targetPoint, {
  2. Vector3 direction = RIGHT,
  3. double buffer = DEFAULT_MOBJECT_TO_MOBJECT_BUFFER,
  4. Vector3 alignedEdge = ORIGIN,
  5. Vector3 coordinateMask = const Vector3(1, 1, 1),
})

Implementation

void nextToPoint(Vector3 targetPoint,
    {Vector3 direction = RIGHT,
    double buffer = DEFAULT_MOBJECT_TO_MOBJECT_BUFFER,
    Vector3 alignedEdge = ORIGIN,
    // TODO: add submobjectToAlign
    // Mobject? submobjectToAlign,
    // int? indexOfSubmobjectToAlign,
    Vector3 coordinateMask = const Vector3(1, 1, 1)}) {
  var pointToAlign = getCriticalPoint(alignedEdge - direction);
  shift((targetPoint - pointToAlign + direction * buffer) * coordinateMask);
}