Axes constructor

Axes({
  1. double xMin = -FRAME_X_RADIUS,
  2. double xMax = FRAME_X_RADIUS,
  3. double yMin = -FRAME_Y_RADIUS,
  4. double yMax = FRAME_Y_RADIUS,
  5. Vector3 centerPoint = ORIGIN,
  6. AxisConfig axisConfig = DefaultAxisConfig,
  7. AxisConfig xAxisConfig = DefaultXAxisConfig,
  8. AxisConfig yAxisConfig = DefaultYAxisConfig,
})

Implementation

Axes({
  double xMin = -FRAME_X_RADIUS,
  double xMax = FRAME_X_RADIUS,
  double yMin = -FRAME_Y_RADIUS,
  double yMax = FRAME_Y_RADIUS,
  this.centerPoint = ORIGIN,
  this.axisConfig = DefaultAxisConfig,
  this.xAxisConfig = DefaultXAxisConfig,
  this.yAxisConfig = DefaultYAxisConfig,
}) : super(
        xMin: xMin,
        xMax: xMax,
        yMin: yMin,
        yMax: yMax,
      ) {
  xAxis = createAxis(xMin, xMax, xAxisConfig.merge(defaultXAxisConfig));
  yAxis = createAxis(yMin, yMax, yAxisConfig.merge(defaultYAxisConfig));
  yAxis.rotateAboutOrigin(-90 * DEGREES);

  axes = VGroup([xAxis, yAxis]);
  add([xAxis, yAxis]);
  shift(centerPoint);
}