AutoXL.pane constructor
const
AutoXL.pane({})
AutoXL.pane
is intended to be mostly stationary but
rotate in its place to represent pointer hovers or accelerometer data.
Great for a surface intended as a inter/reactive pane.
This AutoXL
defaults depth to 2
, meaning any more than two layers
and the remainder will have equivalent parallax factors to the second.
An AutoXL.pane
also defaults supportsSensors to false
,
drag to 40ms
, and duration to 100ms
.
Implementation
const AutoXL.pane({
Key? key,
required this.layers,
this.supportsPointer = true,
this.supportsSensors = false,
this.depth = 2,
this.duration = const Duration(milliseconds: 100),
this.curve = Curves.ease,
this.drag = const Duration(milliseconds: 40),
}) : _threeD = (!supportsPointer && !supportsSensors) ? 0 : 0.003,
_baseOffset = 0.0,
_layerOffset = (!supportsPointer && !supportsSensors) ? 0 : 10.0,
_baseRotation = (!supportsPointer && !supportsSensors) ? 0 : 1.0,
_layerRotation = (!supportsPointer && !supportsSensors) ? 0 : 0.25,
_baseZ = 0.0,
_layerZ = 0.0,
super(key: key);