InfinityModelController constructor

InfinityModelController({
  1. double modelScale = 1,
  2. double viewScale = 1,
  3. double userScale = 1,
  4. double minUserScale = 0.8,
  5. double maxUserScale = 3.0,
  6. double rotationX = -45,
  7. double rotationY = 45,
  8. double rotationZ = 0,
  9. Offset translation = const Offset(0, 0),
  10. Vector3? light,
  11. double lightStrength = 1.0,
  12. double ambientLightStrength = 0.1,
})

Creates a new InfinityModelController instance.

Implementation

InfinityModelController({
  this.modelScale = 1,
  this.viewScale = 1,
  this.userScale = 1,
  this.minUserScale = 0.8,
  this.maxUserScale = 3.0,
  double rotationX = -45,
  double rotationY = 45,
  double rotationZ = 0,
  this.translation = const Offset(0, 0),
  Vector3? light,
  this.lightStrength = 1.0,
  this.ambientLightStrength = 0.1,
})  : rotationX = 0,
      rotationY = 0,
      rotationZ = 0,
      light = light ?? Vector3(10, -20, 20).normalized() {
  // Set initial normalized rotation values
  update(
    rotationX: rotationX,
    rotationY: rotationY,
    rotationZ: rotationZ,
  );

  assert(
  ambientLightStrength >= 0 && ambientLightStrength <= 1,
  "ambientLight should be between 0.0 and 1.0",
  );
}