AutoXL.deep constructor
const
AutoXL.deep({})
AutoXL.deep
is intended to translate and rotate greatly
in its place to represent pointer hovers or accelerometer data.
This AutoXL
defaults depth to -1
, meaning each progressive layer
will have a greater parallax factor than the previous.
Implementation
const AutoXL.deep({
Key? key,
required this.layers,
this.supportsPointer = true,
this.supportsSensors = true,
this.depth = -1,
this.duration = const Duration(milliseconds: 200),
this.curve = Curves.ease,
this.drag = const Duration(milliseconds: 100),
}) : _threeD = (!supportsPointer && !supportsSensors) ? 0 : 0.0015,
_baseOffset = (!supportsPointer && !supportsSensors) ? 0 : 40.0,
_layerOffset = (!supportsPointer && !supportsSensors) ? 0 : 30.0,
_baseRotation = (!supportsPointer && !supportsSensors) ? 0 : 0.3,
_layerRotation = (!supportsPointer && !supportsSensors) ? 0 : 0.2,
_baseZ = (!supportsPointer && !supportsSensors) ? 0 : 0.15,
_layerZ = (!supportsPointer && !supportsSensors) ? 0 : 0.025,
super(key: key);