copyWith method

Cube3D copyWith({
  1. double? size,
  2. Vector3? position,
  3. Color? color,
})

Copies the cube.

Implementation

Cube3D copyWith({double? size, Vector3? position, Color? color}) {
  return Cube3D(
    size ?? this.size,
    position ?? this.position,
    color: color ?? this.color,
  );
}