animation/cardMotions.svelte#
Classes#
CardMotions#
Defined in: arranger/src/animation/cardMotions.svelte.ts:32
Follows a block’s drawing (drawn): each new drawing moves its cards
from the drawing before (blockMotion) over UNFOLD_DURATION, a new
change starting its own motion from the drawing it replaces. A drawing
that comes while still() (a gesture’s or a control’s preview, which
must lie where the pointer puts it) or while reduced() moves nothing,
nor does the first drawing. Made while a component is initialised: its
effects are the component’s, and its motion stops when the component is
destroyed. The canvas reads the drawing at rest: the pointer never waits
for a motion.
Constructors#
Constructor#
new CardMotions(
drawn,measure,reduced,still):CardMotions
Defined in: arranger/src/animation/cardMotions.svelte.ts:40
Parameters#
drawn#
() => Drawn
measure#
reduced#
() => boolean
still#
() => boolean
Returns#
Accessors#
leaving#
Get Signature#
get leaving(): readonly
LeavingCard[]
Defined in: arranger/src/animation/cardMotions.svelte.ts:91
The cards the drawing shown no longer draws while they fold back; none at rest.
Returns#
readonly LeavingCard[]
moving#
Get Signature#
get moving():
boolean
Defined in: arranger/src/animation/cardMotions.svelte.ts:68
Whether anything is moving: a motion is under way and not at rest.
Returns#
boolean
progress#
Get Signature#
get progress():
number
Defined in: arranger/src/animation/cardMotions.svelte.ts:73
The progress of the motion under way, eased: 0 where it starts, 1 at rest.
Returns#
number
Methods#
placedOf()#
placedOf(
element):Placed|null
Defined in: arranger/src/animation/cardMotions.svelte.ts:81
Where the element at element of the drawing shown lies now, null
where it lies at rest: no motion under way, or none moving it.
Parameters#
element#
number
Returns#
Placed | null