isFlipped property

bool isFlipped

Returns true if the component is currently being rendered from its back side, and false if it shows the front side.

The "front" side is the one displayed at angleX = angleY = 0, and the "back" side is shows if the component is rotated 180ยบ degree around either the X or Y axis.

Implementation

bool get isFlipped {
  final phaseX = (angleX / tau - 0.25) % 1.0;
  final phaseY = (angleY / tau - 0.25) % 1.0;
  return (phaseX > 0.5) ^ (phaseY > 0.5);
}