InfinityModelController constructor
InfinityModelController({
- double modelScale = 1,
- double viewScale = 1,
- double userScale = 1,
- double minUserScale = 0.8,
- double maxUserScale = 3.0,
- double rotationX = -45,
- double rotationY = 45,
- double rotationZ = 0,
- Offset translation = const Offset(0, 0),
- Vector3? light,
- double lightStrength = 1.0,
- 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",
);
}