RotationOptions
Defined in: types.ts:162
Tunes the tilt a card picks up while it is being dragged. Pass false to
RiffleOptions.rotation instead of this shape to disable rotation entirely.
Every optional field below is declared ?: T | undefined so that,
under exactOptionalPropertyTypes, a consumer (or update()) may pass an
explicit undefined to mean “use the default”.
Example
Section titled “Example”import type { RotationOptions } from '@rpxl/riffle'
const rotation: RotationOptions = { maxRotation: 24, leverFactor: 0.8 }Properties
Section titled “Properties”baseFactor?
Section titled “baseFactor?”
optionalbaseFactor?:number
Defined in: types.ts:166
Contribution from drag distance alone. Default 0.35.
leverFactor?
Section titled “leverFactor?”
optionalleverFactor?:number
Defined in: types.ts:168
Contribution from where the card was grabbed. Default 0.65.
maxRotation?
Section titled “maxRotation?”
optionalmaxRotation?:number
Defined in: types.ts:164
Degrees. Default 16.
trajFactor?
Section titled “trajFactor?”
optionaltrajFactor?:number
Defined in: types.ts:170
Contribution from the angle of travel. Default 0.15.