@wardic/core 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseValue.d.ts.map +1 -1
- package/dist/BaseValue.js +2 -0
- package/dist/BaseValue.js.map +1 -1
- package/dist/Batch.d.ts +6 -0
- package/dist/Batch.d.ts.map +1 -1
- package/dist/Batch.js +11 -6
- package/dist/Batch.js.map +1 -1
- package/dist/DefaultTransition.d.ts +21 -12
- package/dist/DefaultTransition.d.ts.map +1 -1
- package/dist/DefaultTransition.js +43 -2
- package/dist/DefaultTransition.js.map +1 -1
- package/dist/FrameLoop.d.ts +5 -1
- package/dist/FrameLoop.d.ts.map +1 -1
- package/dist/FrameLoop.js.map +1 -1
- package/dist/Machine.d.ts +3 -0
- package/dist/Machine.d.ts.map +1 -1
- package/dist/Machine.js +4 -3
- package/dist/Machine.js.map +1 -1
- package/dist/Spring.d.ts +7 -0
- package/dist/Spring.d.ts.map +1 -1
- package/dist/Spring.js +16 -0
- package/dist/Spring.js.map +1 -1
- package/dist/UnitScale.d.ts +39 -0
- package/dist/UnitScale.d.ts.map +1 -0
- package/dist/UnitScale.js +45 -0
- package/dist/UnitScale.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/frameLoop.js +5 -5
- package/dist/internal/frameLoop.js.map +1 -1
- package/dist/unstable/BatchCalls.d.ts +135 -0
- package/dist/unstable/BatchCalls.d.ts.map +1 -0
- package/dist/unstable/BatchCalls.js +311 -0
- package/dist/unstable/BatchCalls.js.map +1 -0
- package/dist/unstable/FrameEffects.d.ts +59 -0
- package/dist/unstable/FrameEffects.d.ts.map +1 -0
- package/dist/unstable/FrameEffects.js +142 -0
- package/dist/unstable/FrameEffects.js.map +1 -0
- package/dist/unstable/FrameTime.d.ts +1 -4
- package/dist/unstable/FrameTime.d.ts.map +1 -1
- package/dist/unstable/FrameTime.js +1 -4
- package/dist/unstable/FrameTime.js.map +1 -1
- package/dist/unstable/Imperative.d.ts +270 -0
- package/dist/unstable/Imperative.d.ts.map +1 -0
- package/dist/unstable/Imperative.js +745 -0
- package/dist/unstable/Imperative.js.map +1 -0
- package/dist/unstable/RetargetLegs.d.ts +2 -1
- package/dist/unstable/RetargetLegs.d.ts.map +1 -1
- package/dist/unstable/RetargetLegs.js +23 -15
- package/dist/unstable/RetargetLegs.js.map +1 -1
- package/dist/unstable/Spine.d.ts +8 -11
- package/dist/unstable/Spine.d.ts.map +1 -1
- package/dist/unstable/Spine.js +33 -16
- package/dist/unstable/Spine.js.map +1 -1
- package/package.json +1 -1
- package/src/BaseValue.ts +2 -0
- package/src/Batch.ts +19 -6
- package/src/DefaultTransition.ts +53 -2
- package/src/FrameLoop.ts +6 -2
- package/src/Machine.ts +7 -3
- package/src/Spring.ts +16 -0
- package/src/UnitScale.ts +56 -0
- package/src/index.ts +1 -0
- package/src/internal/frameLoop.ts +5 -5
- package/src/unstable/BatchCalls.ts +401 -0
- package/src/unstable/FrameEffects.ts +172 -0
- package/src/unstable/FrameTime.ts +1 -5
- package/src/unstable/Imperative.ts +1045 -0
- package/src/unstable/RetargetLegs.ts +20 -11
- package/src/unstable/Spine.ts +39 -18
|
@@ -39,6 +39,7 @@ import type * as InterpolatorRegistry from "../InterpolatorRegistry.ts"
|
|
|
39
39
|
import * as Machine from "../Machine.ts"
|
|
40
40
|
import * as ReducedMotion from "../ReducedMotion.ts"
|
|
41
41
|
import * as Spring from "../Spring.ts"
|
|
42
|
+
import * as UnitScale from "../UnitScale.ts"
|
|
42
43
|
import * as Values from "../Values.ts"
|
|
43
44
|
import type * as CoreMeasuredPairs from "./MeasuredPairs.ts"
|
|
44
45
|
import type * as Stops from "./Stops.ts"
|
|
@@ -622,17 +623,18 @@ export const legsOf = (
|
|
|
622
623
|
measured?: MeasuredPairs | undefined,
|
|
623
624
|
current?: Values.Values | undefined,
|
|
624
625
|
rests?: Values.Values | undefined,
|
|
626
|
+
unitScale: UnitScale.Rule = UnitScale.MOTIONS,
|
|
625
627
|
): ReadonlyArray<Leg> => {
|
|
626
628
|
// A Path (#438): `x` and `y` along it, on a leg of their own, and every other key as before.
|
|
627
629
|
const pathed = pathOf(from, to, given, reducedMotion, skipped, defaults, stops, current, rests)
|
|
628
630
|
if (Predicate.isNotUndefined(pathed)) {
|
|
629
|
-
return Arr.prepend(legsOf(from, pathed.rest, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured), pathed.leg)
|
|
631
|
+
return Arr.prepend(legsOf(from, pathed.rest, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, undefined, undefined, unitScale), pathed.leg)
|
|
630
632
|
}
|
|
631
633
|
// Each key on its own transition (#301): with entries, the keys go by the transition each runs on.
|
|
632
634
|
const entries = entriesOf(given)
|
|
633
|
-
if (Predicate.isUndefined(entries)) return legsOn(from, to, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured)
|
|
635
|
+
if (Predicate.isUndefined(entries)) return legsOn(from, to, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, unitScale)
|
|
634
636
|
// With no value's entry (`layout` and `default` alone), every key runs on one transition.
|
|
635
|
-
if (Bool.not(entries.byValue)) return legsOn(from, to, forKey(entries, "default"), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured)
|
|
637
|
+
if (Bool.not(entries.byValue)) return legsOn(from, to, forKey(entries, "default"), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, unitScale)
|
|
636
638
|
const byTransition = new Map<Config.WardicTransition, Record<string, number | string>>()
|
|
637
639
|
Arr.forEach(Rec.keys(to), (key) => {
|
|
638
640
|
const runsOn = forKey(entries, key)
|
|
@@ -643,7 +645,7 @@ export const legsOf = (
|
|
|
643
645
|
}
|
|
644
646
|
byTransition.set(runsOn, { [key]: to[key] as number | string })
|
|
645
647
|
})
|
|
646
|
-
return Arr.flatMap(Arr.fromIterable(byTransition), ([runsOn, keys]) => legsOn(from, keys, runsOn, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured))
|
|
648
|
+
return Arr.flatMap(Arr.fromIterable(byTransition), ([runsOn, keys]) => legsOn(from, keys, runsOn, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, unitScale))
|
|
647
649
|
}
|
|
648
650
|
|
|
649
651
|
/** No legs: a Retarget with no key. */
|
|
@@ -753,18 +755,20 @@ const legsOn = (
|
|
|
753
755
|
follow: Follows | undefined,
|
|
754
756
|
stops: StopsByKey | undefined,
|
|
755
757
|
measured: MeasuredPairs | undefined,
|
|
758
|
+
// ADR-0069 decision 8 (#883): the Environment's `UnitScale`, each key's units for its rest thresholds.
|
|
759
|
+
unitScale: UnitScale.Rule,
|
|
756
760
|
): ReadonlyArray<Leg> => {
|
|
757
761
|
const run = runOf(given)
|
|
758
762
|
if (Predicate.isNotUndefined(run)) {
|
|
759
|
-
if (run.type === "inertia") return inertiaLegsOn(from, to, run as Run & InertiaRun, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured)
|
|
760
|
-
return legsWith(from, to, run, reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured)
|
|
763
|
+
if (run.type === "inertia") return inertiaLegsOn(from, to, run as Run & InertiaRun, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, unitScale)
|
|
764
|
+
return legsWith(from, to, run, reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured, unitScale)
|
|
761
765
|
}
|
|
762
766
|
const keys = Rec.keys(to)
|
|
763
767
|
if (keys.length === 0) return NO_LEGS
|
|
764
768
|
// Nearly always one Default transition for every key (a fade, a move): no grouping.
|
|
765
769
|
const first = defaultFor(defaults, UndefinedOr.getOrThrow(keys[0]), to, stops)
|
|
766
770
|
if (Arr.every(keys, (key) => defaultFor(defaults, key, to, stops) === first)) {
|
|
767
|
-
return legsWith(from, to, carried(first, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured)
|
|
771
|
+
return legsWith(from, to, carried(first, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured, unitScale)
|
|
768
772
|
}
|
|
769
773
|
const byDefault = new Map<DefaultTransition.Transition | DefaultTransition.KeyframesTransition, Record<string, number | string>>()
|
|
770
774
|
Arr.forEach(keys, (key) => {
|
|
@@ -776,7 +780,7 @@ const legsOn = (
|
|
|
776
780
|
}
|
|
777
781
|
byDefault.set(runsOn, { [key]: to[key] as number | string })
|
|
778
782
|
})
|
|
779
|
-
return Arr.flatMap(Arr.fromIterable(byDefault), ([runsOn, grouped]) => legsWith(from, grouped, carried(runsOn, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured))
|
|
783
|
+
return Arr.flatMap(Arr.fromIterable(byDefault), ([runsOn, grouped]) => legsWith(from, grouped, carried(runsOn, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured, unitScale))
|
|
780
784
|
}
|
|
781
785
|
|
|
782
786
|
/**
|
|
@@ -824,6 +828,8 @@ const legsWith = (
|
|
|
824
828
|
follow: Follows | undefined,
|
|
825
829
|
stops: StopsByKey | undefined,
|
|
826
830
|
measured: MeasuredPairs | undefined,
|
|
831
|
+
// ADR-0069 decision 8 (#883): the Environment's `UnitScale`, each key's units for its rest thresholds.
|
|
832
|
+
unitScale: UnitScale.Rule,
|
|
827
833
|
): ReadonlyArray<Leg> => {
|
|
828
834
|
// A **Skipped animation** (#468, Motion's `skipAnimations`): every key lands where its leg would end,
|
|
829
835
|
// on its first tick, with no delay and whatever reduced motion says. Keyframes land on their last
|
|
@@ -919,7 +925,8 @@ const legsWith = (
|
|
|
919
925
|
// Each key's own velocity, read now; none when the transition gives one, which every key then starts with.
|
|
920
926
|
let fromVelocity: Record<string, number> = NO_NUMBERS
|
|
921
927
|
if (Predicate.isUndefined(springOpts.velocity)) fromVelocity = Rec.map(numeric, (_, key) => velocities(key))
|
|
922
|
-
|
|
928
|
+
// Its keys' rest thresholds at the Environment's unit scale (ADR-0069 decision 8).
|
|
929
|
+
legs.push({ _tag: "Numbers", to: numeric, machine: () => Machine.springValues(numeric, springOpts, { from: fromNumeric, velocity: fromVelocity, records: "value", unitScale }) })
|
|
923
930
|
}
|
|
924
931
|
if (hasKeys(strings)) {
|
|
925
932
|
const fromStrings: Values.Values = Rec.map(strings, (_, key) => UndefinedOr.getOrThrow(from[key]))
|
|
@@ -984,6 +991,8 @@ const inertiaLegsOn = (
|
|
|
984
991
|
follow: Follows | undefined,
|
|
985
992
|
stops: StopsByKey | undefined,
|
|
986
993
|
measured: MeasuredPairs | undefined,
|
|
994
|
+
// ADR-0069 decision 8 (#883): the Environment's `UnitScale`, each key's units for its rest thresholds.
|
|
995
|
+
unitScale: UnitScale.Rule,
|
|
987
996
|
): ReadonlyArray<Leg> => {
|
|
988
997
|
let followingKeys = NO_KEYS
|
|
989
998
|
if (Predicate.isNotUndefined(follow)) followingKeys = follow.keysOf(to)
|
|
@@ -992,8 +1001,8 @@ const inertiaLegsOn = (
|
|
|
992
1001
|
const numbers = Rec.filter(to, glides)
|
|
993
1002
|
const rest = Rec.filter(to, (target, key) => Bool.not(glides(target, key)))
|
|
994
1003
|
const legs: Array<Leg> = []
|
|
995
|
-
if (hasKeys(numbers)) Arr.forEach(legsWith(from, numbers, run, reducedMotion, skipped, positionalKeys, velocities, undefined, stops, undefined), (leg) => legs.push(leg))
|
|
996
|
-
if (hasKeys(rest)) Arr.forEach(legsOn(from, rest, definingNone(given), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured), (leg) => legs.push(leg))
|
|
1004
|
+
if (hasKeys(numbers)) Arr.forEach(legsWith(from, numbers, run, reducedMotion, skipped, positionalKeys, velocities, undefined, stops, undefined, unitScale), (leg) => legs.push(leg))
|
|
1005
|
+
if (hasKeys(rest)) Arr.forEach(legsOn(from, rest, definingNone(given), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, unitScale), (leg) => legs.push(leg))
|
|
997
1006
|
return legs
|
|
998
1007
|
}
|
|
999
1008
|
|
package/src/unstable/Spine.ts
CHANGED
|
@@ -26,6 +26,7 @@ import * as Machine from "../Machine.ts"
|
|
|
26
26
|
import * as Override from "../Override.ts"
|
|
27
27
|
import type * as ReducedMotion from "../ReducedMotion.ts"
|
|
28
28
|
import * as Supersede from "../Supersede.ts"
|
|
29
|
+
import * as UnitScale from "../UnitScale.ts"
|
|
29
30
|
import * as Values from "../Values.ts"
|
|
30
31
|
import * as Report from "./Report.ts"
|
|
31
32
|
import type * as MeasuredPairs from "./MeasuredPairs.ts"
|
|
@@ -523,10 +524,11 @@ export interface Running extends Machine.RunOptions {
|
|
|
523
524
|
frames: number
|
|
524
525
|
/** When it drew its last frame, on {@link FrameTime.frameNow}'s clock; -Infinity before its first (#464). */
|
|
525
526
|
lastAt: number
|
|
526
|
-
/** A Blend leg's last frame's values, and the ones before them (the Snapshot's, before its first)
|
|
527
|
+
/** A Blend leg's last frame's values, and the ones before them (the Snapshot's, before its first) (#464). */
|
|
527
528
|
last: Values.Values | undefined
|
|
528
529
|
before: Values.Values | undefined
|
|
529
|
-
|
|
530
|
+
/** The time, in ms, its last frame's step covered: its run's dt then, which a Blend's change is over (#865). */
|
|
531
|
+
lastStep: number
|
|
530
532
|
/**
|
|
531
533
|
* A Numbers leg's last Frame (#663): its keys' velocities are read from it when one is asked for, as
|
|
532
534
|
* a Blend leg's are from its frames, by index from a spring's. None before its first frame.
|
|
@@ -722,14 +724,14 @@ export const runningOf = (to: Values.Values, resolution: Resolution, landing: La
|
|
|
722
724
|
lastAt: Number.NEGATIVE_INFINITY,
|
|
723
725
|
last: undefined,
|
|
724
726
|
before: undefined,
|
|
725
|
-
|
|
727
|
+
lastStep: Number.NEGATIVE_INFINITY,
|
|
726
728
|
physics: undefined,
|
|
727
729
|
})
|
|
728
730
|
|
|
729
731
|
/**
|
|
730
|
-
* A Blend leg's velocity for `key` (#464, Motion's `getVelocity`): its last two frames' change over
|
|
731
|
-
*
|
|
732
|
-
* on its first frame (a `set`, a `duration: 0`).
|
|
732
|
+
* A Blend leg's velocity for `key` (#464, Motion's `getVelocity`): its last two frames' change over the
|
|
733
|
+
* time its last step covered (#865), at most `MAX_VELOCITY_DELTA`; none for a string, nor for a Snap, a
|
|
734
|
+
* leg that landed on its first frame (a `set`, a `duration: 0`).
|
|
733
735
|
*/
|
|
734
736
|
const blendVelocityOf = (running: Running, key: string): number => {
|
|
735
737
|
if (Bool.and(running.done, running.frames < 2)) return 0
|
|
@@ -742,7 +744,9 @@ const blendVelocityOf = (running: Running, key: string): number => {
|
|
|
742
744
|
const before = beforeValues[key]
|
|
743
745
|
if (Bool.not(Predicate.isNumber(last))) return 0
|
|
744
746
|
if (Bool.not(Predicate.isNumber(before))) return 0
|
|
745
|
-
|
|
747
|
+
// The step's own time (#865): two frames' stamps are when their ticks were delivered, and a tick
|
|
748
|
+
// delivered late stretches the gap but not the step.
|
|
749
|
+
const apart = Math.min(running.lastStep, FrameTime.MAX_VELOCITY_DELTA)
|
|
746
750
|
if (apart <= 0) return 0
|
|
747
751
|
return (((last as number) - (before as number)) * 1000) / apart
|
|
748
752
|
}
|
|
@@ -856,6 +860,7 @@ const splitLegsOf = (
|
|
|
856
860
|
measured: RetargetLegs.MeasuredPairs | undefined,
|
|
857
861
|
current: Values.Values,
|
|
858
862
|
rests: Values.Values | undefined,
|
|
863
|
+
unitScale: UnitScale.Rule,
|
|
859
864
|
): SplitLegs => {
|
|
860
865
|
let returnsAt = 0
|
|
861
866
|
if (listed) returnsAt = resolution.layers.length
|
|
@@ -867,7 +872,7 @@ const splitLegsOf = (
|
|
|
867
872
|
if (Rec.isEmptyRecord(picked)) return
|
|
868
873
|
let followed: RetargetLegs.Follows | undefined
|
|
869
874
|
if (i === returnsAt) followed = follow
|
|
870
|
-
const groupLegs = RetargetLegs.legsOf(from, picked, groupTransitionOf(resolution, groups, i, transition, element, extraDelay, reuse), reduce, skipped, positionalKeys, defaultTransition, velocities, followed, stops, measured, current, rests)
|
|
875
|
+
const groupLegs = RetargetLegs.legsOf(from, picked, groupTransitionOf(resolution, groups, i, transition, element, extraDelay, reuse), reduce, skipped, positionalKeys, defaultTransition, velocities, followed, stops, measured, current, rests, unitScale)
|
|
871
876
|
Arr.forEach(groupLegs, (built) => {
|
|
872
877
|
legs.push(built)
|
|
873
878
|
tags.push(i)
|
|
@@ -2022,6 +2027,8 @@ export interface SpineHost {
|
|
|
2022
2027
|
readonly element: Subject.Subject
|
|
2023
2028
|
readonly positionalKeys: ReducedMotion.PositionalKeys["Service"]
|
|
2024
2029
|
readonly defaultTransition: DefaultTransition.DefaultTransition["Service"]
|
|
2030
|
+
/** The Environment's unit scale, its legs' rest thresholds' for `x`, `y` and `z` (ADR-0069 decision 8). */
|
|
2031
|
+
readonly unitScale: UnitScale.Rule
|
|
2025
2032
|
/** Each key's velocity, as of the take. */
|
|
2026
2033
|
readonly readVelocity: RetargetLegs.Velocities
|
|
2027
2034
|
readonly gate: FlushGate.Shape
|
|
@@ -2084,8 +2091,24 @@ export interface ElementSpine {
|
|
|
2084
2091
|
* *Amendment (#200)*). A leg the token didn't reach is interrupted (`endLeg`). The runtime's own
|
|
2085
2092
|
* fiber Scope interrupts what's left when the provider ends.
|
|
2086
2093
|
*/
|
|
2094
|
+
/** Each runtime's unit scale, read once: a mount reads a WeakMap, not a run of its own. */
|
|
2095
|
+
// Module state (#460, Q7): held weakly by the runtime, so it goes with it.
|
|
2096
|
+
const UNIT_SCALES = new WeakMap<object, UnitScale.Rule>()
|
|
2097
|
+
|
|
2098
|
+
/** `runtime`'s Environment's `UnitScale`, read at its first ask. */
|
|
2099
|
+
export const unitScaleOf = (runtime: WardicServices.Runner<WardicServices.WardicServices>): UnitScale.Rule => {
|
|
2100
|
+
const known = UNIT_SCALES.get(runtime)
|
|
2101
|
+
if (Predicate.isNotUndefined(known)) return known
|
|
2102
|
+
const read = runtime.runSync(UnitScale.UnitScale)
|
|
2103
|
+
UNIT_SCALES.set(runtime, read)
|
|
2104
|
+
return read
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2087
2107
|
export const makeElementSpine = (options: ElementSpineOptions): ElementSpine => {
|
|
2088
2108
|
const { animation, byName, canStart, config, defaultTransition, diagnostics, element, extraDelay, gate, id, links, live, measuredPairs, onFrame, ownValues, parent, positionalKeys, presence, runtime, snapshot, start, styleNow, tag, variableValues } = options
|
|
2109
|
+
// The Environment's unit scale (ADR-0069 decision 8, #883): read from the runtime the spine already holds,
|
|
2110
|
+
// so no binding passes it; 1, Motion's own, unless the Environment's Layers give another.
|
|
2111
|
+
const unitScale = unitScaleOf(runtime)
|
|
2089
2112
|
const { initialLink, initialValues, startedLink } = start
|
|
2090
2113
|
const { linksFor, ownValue, startLinkOf } = links
|
|
2091
2114
|
let handoff = options.handoff
|
|
@@ -2405,17 +2428,14 @@ export const makeElementSpine = (options: ElementSpineOptions): ElementSpine =>
|
|
|
2405
2428
|
// A snap's or a blend's frames: merged into the Snapshot (ADR-0004), as the spring's are. A blend's
|
|
2406
2429
|
// last two are kept, its keys' velocities read from them (#464): the frame's own values, which a
|
|
2407
2430
|
// blend makes anew each frame (`values` writes one object for a leg that lost keys).
|
|
2408
|
-
const sink = (frame: Frame.Frame<Values.Values
|
|
2431
|
+
const sink = (frame: Frame.Frame<Values.Values>, dt: number): undefined => {
|
|
2409
2432
|
const value = running.values(frame.value)
|
|
2410
2433
|
let before = running.last
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
if (Predicate.isUndefined(before)) {
|
|
2414
|
-
before = snapshot.values
|
|
2415
|
-
beforeAt = snapshot.now() - FrameTime.NOMINAL_FRAME
|
|
2416
|
-
}
|
|
2434
|
+
// Its first frame: from the Snapshot's values.
|
|
2435
|
+
if (Predicate.isUndefined(before)) before = snapshot.values
|
|
2417
2436
|
running.before = before
|
|
2418
|
-
|
|
2437
|
+
// Over the time its step covered (#865), its first's included: its run's dt, in ms.
|
|
2438
|
+
running.lastStep = dt * 1000
|
|
2419
2439
|
running.last = frame.value
|
|
2420
2440
|
snapshot.values = { ...snapshot.values, ...value }
|
|
2421
2441
|
gate.write(id, value)
|
|
@@ -2548,6 +2568,7 @@ export const makeElementSpine = (options: ElementSpineOptions): ElementSpine =>
|
|
|
2548
2568
|
element,
|
|
2549
2569
|
positionalKeys,
|
|
2550
2570
|
defaultTransition,
|
|
2571
|
+
unitScale,
|
|
2551
2572
|
readVelocity,
|
|
2552
2573
|
gate,
|
|
2553
2574
|
forget,
|
|
@@ -2938,10 +2959,10 @@ export const makeElementSpine = (options: ElementSpineOptions): ElementSpine =>
|
|
|
2938
2959
|
if (Predicate.isUndefined(groups) && hasKeys(fresh)) {
|
|
2939
2960
|
// Where every key is now: a Path's axis the target leaves out starts there (#438), and ends where
|
|
2940
2961
|
// it rests (#574).
|
|
2941
|
-
retargetLegs = RetargetLegs.legsOf(from, fresh, transition, reduce, skipped, positionalKeys, defaultTransition, readVelocity, follow, manyStops, measured, snapshot.values, rests)
|
|
2962
|
+
retargetLegs = RetargetLegs.legsOf(from, fresh, transition, reduce, skipped, positionalKeys, defaultTransition, readVelocity, follow, manyStops, measured, snapshot.values, rests, unitScale)
|
|
2942
2963
|
}
|
|
2943
2964
|
if (Predicate.isNotUndefined(groups)) {
|
|
2944
|
-
const split = splitLegsOf(fresh, from, groups, resolution, listed, transition, elementTransition, extraDelay, options.reuse, reduce, skipped, positionalKeys, defaultTransition, readVelocity, follow, manyStops, measured, snapshot.values, rests)
|
|
2965
|
+
const split = splitLegsOf(fresh, from, groups, resolution, listed, transition, elementTransition, extraDelay, options.reuse, reduce, skipped, positionalKeys, defaultTransition, readVelocity, follow, manyStops, measured, snapshot.values, rests, unitScale)
|
|
2945
2966
|
retargetLegs = split.legs
|
|
2946
2967
|
legGroups = split.tags
|
|
2947
2968
|
}
|