Skip to content

RotationOptions (core)

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”.

import type { RotationOptions } from '@rpxl/riffle'
const rotation: RotationOptions = { maxRotation: 24, leverFactor: 0.8 }

optional baseFactor?: number

Defined in: types.ts:166

Contribution from drag distance alone. Default 0.35.


optional leverFactor?: number

Defined in: types.ts:168

Contribution from where the card was grabbed. Default 0.65.


optional maxRotation?: number

Defined in: types.ts:164

Degrees. Default 16.


optional trajFactor?: number

Defined in: types.ts:170

Contribution from the angle of travel. Default 0.15.