tensum 0.1.0 → 0.2.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/CHANGELOG.md +38 -0
- package/README.md +54 -21
- package/dist/css-linear.d.ts +7 -0
- package/dist/css-linear.d.ts.map +1 -1
- package/dist/css-linear.js +88 -35
- package/dist/css-linear.js.map +1 -1
- package/dist/gsap/plugin.d.ts +8 -5
- package/dist/gsap/plugin.d.ts.map +1 -1
- package/dist/gsap/plugin.js +31 -31
- package/dist/gsap/plugin.js.map +1 -1
- package/dist/gsap/spring-to.d.ts +1 -0
- package/dist/gsap/spring-to.d.ts.map +1 -1
- package/dist/gsap/spring-to.js +4 -4
- package/dist/gsap/spring-to.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/support/additive-spring-value.d.ts +2 -3
- package/dist/support/additive-spring-value.d.ts.map +1 -1
- package/dist/support/additive-spring-value.js +11 -6
- package/dist/support/additive-spring-value.js.map +1 -1
- package/dist/support/spring-value.d.ts.map +1 -1
- package/dist/support/spring-value.js +1 -2
- package/dist/support/spring-value.js.map +1 -1
- package/package.json +2 -2
- package/src/css-linear.ts +130 -39
- package/src/gsap/plugin.ts +33 -39
- package/src/gsap/spring-to.ts +11 -3
- package/src/index.ts +1 -4
- package/src/support/additive-spring-value.ts +18 -10
- package/src/support/spring-value.ts +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.0] - 2026-08-26
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- GSAP registration now follows the native plugin convention with
|
|
15
|
+
`gsap.registerPlugin(TensumPlugin)` instead of `registerSpringPlugin(gsap)`.
|
|
16
|
+
- The preflighted GSAP timeline effect is now `timeline.spring()` instead of
|
|
17
|
+
`timeline.motionSpring()`; derived duration, stagger, nesting, repeat, yoyo,
|
|
18
|
+
lifecycle callbacks, and velocity handoff retain the same behavior.
|
|
19
|
+
- Numeric `x`, `y`, and `rotation` properties on ordinary objects now remain
|
|
20
|
+
unitless. DOM transforms retain their `px` and `deg` defaults, while explicit
|
|
21
|
+
value, adapter, and `units` configuration continues to take precedence.
|
|
22
|
+
- The supported platform contract is now the tested Node.js 20.19, 22.12, and
|
|
23
|
+
24 lines; ES2022 Chromium, Firefox, and WebKit engines; TypeScript 6; ESM;
|
|
24
|
+
and GSAP `^3.15.0`.
|
|
25
|
+
|
|
26
|
+
### Removed
|
|
27
|
+
|
|
28
|
+
- Removed the unobservable `timing` fields from `AdditiveSpringOptions` and
|
|
29
|
+
`AdditiveSpringContributionOptions`. Runtime calls that still provide those
|
|
30
|
+
fields now fail with a migration error.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- `createSpringValue()` now emits `logicalComplete` before `settle` when
|
|
35
|
+
physical settlement ends the driver before the requested perceptual
|
|
36
|
+
duration, instead of silently losing logical completion.
|
|
37
|
+
- `springToCSSLinear()` now certifies `maxError` for the serialized CSS curve
|
|
38
|
+
using an analytical acceleration bound, including rounded progress values,
|
|
39
|
+
rounded stop positions, and the terminal target. It throws when duration or
|
|
40
|
+
sampling limits make the requested guarantee impossible.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Release checks now pin every named public value and type export for all three
|
|
45
|
+
package entry points and run real-browser integration in Chromium, Firefox,
|
|
46
|
+
and WebKit.
|
|
47
|
+
|
|
10
48
|
## [0.1.0] - 2026-08-26
|
|
11
49
|
|
|
12
50
|
### Added
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ same GSAP instance.
|
|
|
14
14
|
The package is ESM-only:
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
|
-
import {
|
|
17
|
+
import { TensumPlugin, springTo } from "tensum";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
CommonJS `require()` is not supported. A CommonJS module can use dynamic
|
|
@@ -24,9 +24,9 @@ CommonJS `require()` is not supported. A CommonJS module can use dynamic
|
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
26
|
import { gsap } from "gsap";
|
|
27
|
-
import {
|
|
27
|
+
import { TensumPlugin } from "tensum";
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
gsap.registerPlugin(TensumPlugin);
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
GSAP owns the clock, timeline lifecycle, and context. During each driver render,
|
|
@@ -36,7 +36,7 @@ different frame rate does not change the analytical trajectory.
|
|
|
36
36
|
|
|
37
37
|
## Compose derived-duration timelines
|
|
38
38
|
|
|
39
|
-
Use `timeline.
|
|
39
|
+
Use `timeline.spring()` when spring duration affects the position or
|
|
40
40
|
duration of other timeline children. It is a registered GSAP effect with
|
|
41
41
|
`extendTimeline: true`. The effect resolves every spring track before returning
|
|
42
42
|
its tween, so GSAP receives the final duration before it lays out the timeline.
|
|
@@ -45,12 +45,12 @@ its tween, so GSAP receives the final duration before it lays out the timeline.
|
|
|
45
45
|
const timeline = gsap.timeline();
|
|
46
46
|
|
|
47
47
|
timeline
|
|
48
|
-
.
|
|
48
|
+
.spring(element, {
|
|
49
49
|
x: 320,
|
|
50
50
|
from: { x: 0 },
|
|
51
51
|
parameters: { mass: 1, stiffness: 180, damping: 24 },
|
|
52
52
|
})
|
|
53
|
-
.
|
|
53
|
+
.spring(element, {
|
|
54
54
|
x: 80,
|
|
55
55
|
from: { x: 320 },
|
|
56
56
|
parameters: { mass: 1, stiffness: 240, damping: 26 },
|
|
@@ -66,7 +66,7 @@ Preflight reads each target when the effect is created. Add `from` when an
|
|
|
66
66
|
earlier timeline child will change that target before the spring starts:
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
|
-
timeline.
|
|
69
|
+
timeline.spring(element, {
|
|
70
70
|
x: 80,
|
|
71
71
|
from: { x: 320 },
|
|
72
72
|
velocity: { x: -240 },
|
|
@@ -89,7 +89,7 @@ Pass both `from` and `velocity` when that future state must be exact.
|
|
|
89
89
|
Put GSAP driver options in `tween`:
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
|
-
const entrance = gsap.timeline().
|
|
92
|
+
const entrance = gsap.timeline().spring(cards, {
|
|
93
93
|
y: 0,
|
|
94
94
|
from: { y: -24 },
|
|
95
95
|
parameters: { mass: 1, stiffness: 180, damping: 24 },
|
|
@@ -213,10 +213,14 @@ const opacitySpring = springTo(element, {
|
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
Numeric strings may contain one unit, such as `24px`, `30deg`, or `100%`. A unit
|
|
216
|
-
mismatch throws before the animation starts.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
mismatch throws before the animation starts. DOM `x` and `y` default to `px`,
|
|
217
|
+
and DOM `rotation` defaults to `deg`. Tensum does not inject those DOM defaults
|
|
218
|
+
into ordinary objects or custom adapters: a numeric object property stays a
|
|
219
|
+
number unless its current value, destination, adapter, or `units` entry supplies
|
|
220
|
+
a unit. An empty `units` entry explicitly keeps a property unitless. Use
|
|
221
|
+
`adapters` when a property needs custom read and write behavior.
|
|
222
|
+
|
|
223
|
+
Starting another `springTo()` animation or constructing a timeline spring
|
|
220
224
|
on the same target and property performs an automatic velocity-preserving
|
|
221
225
|
handoff from the state available at construction time.
|
|
222
226
|
|
|
@@ -262,6 +266,11 @@ The callbacks describe separate boundaries:
|
|
|
262
266
|
- `onUnsettled` fires when `maxDuration` is reached without settlement;
|
|
263
267
|
- `springTo()` also accepts `onUpdate` and `onComplete`.
|
|
264
268
|
|
|
269
|
+
`createSpringValue()` follows the same finite-boundary rule. If physical
|
|
270
|
+
settlement happens before its requested perceptual duration, it emits
|
|
271
|
+
`logicalComplete` immediately before `settle`; the logical event is never left
|
|
272
|
+
pending after the frame driver stops.
|
|
273
|
+
|
|
265
274
|
The three effect lifecycle callbacks are target-scoped. A tween with an array
|
|
266
275
|
of targets invokes each callback once per target. Its `SpringToSnapshot`
|
|
267
276
|
contains the states for that target but does not include a target or index. Use
|
|
@@ -281,12 +290,31 @@ case is possible:
|
|
|
281
290
|
solver reports an unsettled result. `onUnsettled` runs once per forward crossing
|
|
282
291
|
of `maxDuration`; a finite repeat or yoyo may create another crossing.
|
|
283
292
|
|
|
293
|
+
## CSS `linear()` error contract
|
|
294
|
+
|
|
295
|
+
`springToCSSLinear()` from `tensum/css` returns the serialized easing, its
|
|
296
|
+
duration, and the exact rounded samples used to build that easing. `maxError`
|
|
297
|
+
is a hard bound in normalized progress units. The certification includes the
|
|
298
|
+
piecewise-linear interpolation error, rounded progress values, rounded stop
|
|
299
|
+
positions, and the final move to progress `1`.
|
|
300
|
+
|
|
301
|
+
The default duration is the spring's settling duration. An explicit shorter
|
|
302
|
+
duration is accepted only when its terminal move to `1` can still fit inside
|
|
303
|
+
`maxError`. `maxDepth`, `maxSamples`, and `precision` are resource and
|
|
304
|
+
serialization limits, not permission to exceed the error budget. The exporter
|
|
305
|
+
throws a `RangeError` when any of those limits prevents certification.
|
|
306
|
+
|
|
284
307
|
## Other exports
|
|
285
308
|
|
|
286
309
|
The root entry point also exports the analytical solver, parameter converters,
|
|
287
310
|
velocity helpers, spring values, keyframes, inertia, additive composition, and
|
|
288
311
|
vector springs.
|
|
289
312
|
|
|
313
|
+
Additive spring values expose physical `settle` and `unsettled` lifecycle
|
|
314
|
+
events. They intentionally have no perceptual `timing` option or
|
|
315
|
+
`logicalComplete` event: independent contributions do not share one meaningful
|
|
316
|
+
logical-completion boundary.
|
|
317
|
+
|
|
290
318
|
CSS `linear()` generation and coupled systems use explicit subpaths:
|
|
291
319
|
|
|
292
320
|
```ts
|
|
@@ -296,15 +324,20 @@ import { createCoupledSpringSystem } from "tensum/coupled";
|
|
|
296
324
|
|
|
297
325
|
## Compatibility
|
|
298
326
|
|
|
299
|
-
- Runtime: Node.js 20.19.x
|
|
300
|
-
|
|
301
|
-
|
|
327
|
+
- Runtime: Node.js 20.19.x, Node.js 22 from 22.12.0, and Node.js 24.x.
|
|
328
|
+
- Browsers: ES2022-capable Chromium, Firefox, and WebKit release lines
|
|
329
|
+
represented by the pinned Playwright test engines.
|
|
302
330
|
- Peer dependency: GSAP `^3.15.0`.
|
|
303
331
|
- Modules: ESM only; CommonJS `require()` is intentionally absent from the
|
|
304
332
|
export map.
|
|
305
|
-
- TypeScript:
|
|
306
|
-
Classic `moduleResolution: "node"` cannot resolve the `css` and
|
|
307
|
-
subpaths.
|
|
333
|
+
- TypeScript: TypeScript 6 with `moduleResolution: "node16"`, `"nodenext"`, or
|
|
334
|
+
`"bundler"`. Classic `moduleResolution: "node"` cannot resolve the `css` and
|
|
335
|
+
`coupled` subpaths.
|
|
336
|
+
|
|
337
|
+
The repository's
|
|
338
|
+
[platform support baseline](https://github.com/motion-core/tensum/blob/master/PLATFORM_SUPPORT.md)
|
|
339
|
+
defines the release evidence and separates published-package support from the
|
|
340
|
+
site toolchain.
|
|
308
341
|
|
|
309
342
|
Compiled JavaScript, declarations, source maps, declaration maps, and the
|
|
310
343
|
corresponding TypeScript source are included in the package.
|
|
@@ -331,9 +364,9 @@ pnpm release:compat
|
|
|
331
364
|
```
|
|
332
365
|
|
|
333
366
|
It installs the exact peer lower bound and the current npm `latest` tag in
|
|
334
|
-
separate temporary consumers, then checks Node ESM, TypeScript,
|
|
335
|
-
registration, `springTo()`, and `timeline.
|
|
336
|
-
the npm registry, so it is intentionally separate from `release:check`.
|
|
367
|
+
separate temporary consumers, then checks Node ESM, TypeScript,
|
|
368
|
+
`TensumPlugin` registration, `springTo()`, and `timeline.spring()`. This command
|
|
369
|
+
may read the npm registry, so it is intentionally separate from `release:check`.
|
|
337
370
|
|
|
338
371
|
## License
|
|
339
372
|
|
package/dist/css-linear.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { SpringSolution } from './types.js';
|
|
2
2
|
export interface CSSLinearSpringOptions {
|
|
3
|
+
/** Export duration in seconds. Its terminal move to progress 1 must fit maxError. */
|
|
3
4
|
duration?: number;
|
|
5
|
+
/** Hard approximation bound in normalized progress units. */
|
|
4
6
|
maxError?: number;
|
|
7
|
+
/** Maximum adaptive subdivision depth; exhaustion throws a RangeError. */
|
|
5
8
|
maxDepth?: number;
|
|
9
|
+
/** Maximum serialized samples; exhaustion throws a RangeError. */
|
|
6
10
|
maxSamples?: number;
|
|
11
|
+
/** Decimal precision for both progress values and percentage stops. */
|
|
7
12
|
precision?: number;
|
|
8
13
|
}
|
|
9
14
|
export interface CSSLinearSample {
|
|
@@ -13,7 +18,9 @@ export interface CSSLinearSample {
|
|
|
13
18
|
export interface CSSLinearSpring {
|
|
14
19
|
easing: string;
|
|
15
20
|
duration: number;
|
|
21
|
+
/** Certified bound for the serialized easing in normalized progress units. */
|
|
16
22
|
maxError: number;
|
|
23
|
+
/** Rounded samples exactly represented by the serialized easing. */
|
|
17
24
|
samples: readonly Readonly<CSSLinearSample>[];
|
|
18
25
|
}
|
|
19
26
|
export declare function springToCSSLinear(spring: SpringSolution, options?: CSSLinearSpringOptions): CSSLinearSpring;
|
package/dist/css-linear.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-linear.d.ts","sourceRoot":"","sources":["../src/css-linear.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"css-linear.d.ts","sourceRoot":"","sources":["../src/css-linear.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACrC,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,OAAO,EAAE,SAAS,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;CAC/C;AAmCD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,sBAA2B,GACnC,eAAe,CA4KjB"}
|
package/dist/css-linear.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createAnalyticalSolver } from './solver.js';
|
|
1
2
|
function assertPositive(name, value) {
|
|
2
3
|
if (!Number.isFinite(value) || value <= 0) {
|
|
3
4
|
throw new RangeError(`${name} must be a finite number greater than 0`);
|
|
@@ -9,9 +10,24 @@ function assertPositiveInteger(name, value) {
|
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
function rounded(value, precision) {
|
|
12
|
-
const result =
|
|
13
|
+
const result = roundedNumber(value, precision);
|
|
13
14
|
return Object.is(result, -0) ? '0' : String(result);
|
|
14
15
|
}
|
|
16
|
+
function roundedNumber(value, precision) {
|
|
17
|
+
const result = Number(value.toFixed(precision));
|
|
18
|
+
return Object.is(result, -0) ? 0 : result;
|
|
19
|
+
}
|
|
20
|
+
function logAdd(first, second) {
|
|
21
|
+
if (first === Number.NEGATIVE_INFINITY)
|
|
22
|
+
return second;
|
|
23
|
+
if (second === Number.NEGATIVE_INFINITY)
|
|
24
|
+
return first;
|
|
25
|
+
const maximum = Math.max(first, second);
|
|
26
|
+
return maximum + Math.log(Math.exp(first - maximum) + Math.exp(second - maximum));
|
|
27
|
+
}
|
|
28
|
+
function logMagnitude(value) {
|
|
29
|
+
return value === 0 ? Number.NEGATIVE_INFINITY : Math.log(Math.abs(value));
|
|
30
|
+
}
|
|
15
31
|
export function springToCSSLinear(spring, options = {}) {
|
|
16
32
|
if (typeof options !== 'object' || options === null || Array.isArray(options)) {
|
|
17
33
|
throw new TypeError('CSS linear options must be an object when provided');
|
|
@@ -36,17 +52,65 @@ export function springToCSSLinear(spring, options = {}) {
|
|
|
36
52
|
throw new RangeError('CSS spring export requires a non-zero animation distance');
|
|
37
53
|
}
|
|
38
54
|
const progressAt = (time) => {
|
|
39
|
-
if (spring.timing.settled && time >= duration)
|
|
40
|
-
return 1;
|
|
41
55
|
const progress = (spring.positionAt(time) - spring.initialState.position) / distance;
|
|
42
56
|
if (!Number.isFinite(progress)) {
|
|
43
57
|
throw new RangeError('normalized progress must be a finite number');
|
|
44
58
|
}
|
|
45
59
|
return progress;
|
|
46
60
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
const solver = createAnalyticalSolver(spring.parameters, spring.initialState);
|
|
62
|
+
const terminalSnapError = Math.abs(progressAt(duration) - 1);
|
|
63
|
+
if (terminalSnapError >= maxError) {
|
|
64
|
+
throw new RangeError(`CSS linear export duration requires a terminal snap error (${terminalSnapError}) that cannot satisfy maxError (${maxError})`);
|
|
65
|
+
}
|
|
66
|
+
const accelerationErrorBound = (start, end) => {
|
|
67
|
+
const bounds = solver.tailBoundsAt(start);
|
|
68
|
+
let logPositionBound = logMagnitude(bounds.position);
|
|
69
|
+
let logVelocityBound = logMagnitude(bounds.velocity);
|
|
70
|
+
if (start < solver.tailBoundsMonotonicAfter) {
|
|
71
|
+
const peakBounds = solver.tailBoundsAt(solver.tailBoundsMonotonicAfter);
|
|
72
|
+
// Critical springs contain t*exp(-omega*t) terms. Adding the bounds at
|
|
73
|
+
// the interval start and their monotonic boundary conservatively covers
|
|
74
|
+
// the separate constant and polynomial maxima before that boundary.
|
|
75
|
+
logPositionBound = logAdd(logPositionBound, logMagnitude(peakBounds.position));
|
|
76
|
+
logVelocityBound = logAdd(logVelocityBound, logMagnitude(peakBounds.velocity));
|
|
77
|
+
}
|
|
78
|
+
const logDistance = Math.log(Math.abs(distance));
|
|
79
|
+
const logStiffnessAcceleration = 2 * Math.log(spring.angularFrequency) +
|
|
80
|
+
logPositionBound -
|
|
81
|
+
logDistance;
|
|
82
|
+
const logDampingAcceleration = spring.parameters.damping === 0 ||
|
|
83
|
+
logVelocityBound === Number.NEGATIVE_INFINITY
|
|
84
|
+
? Number.NEGATIVE_INFINITY
|
|
85
|
+
: Math.log(spring.parameters.damping) -
|
|
86
|
+
Math.log(spring.parameters.mass) +
|
|
87
|
+
logVelocityBound -
|
|
88
|
+
logDistance;
|
|
89
|
+
const logAcceleration = logAdd(logStiffnessAcceleration, logDampingAcceleration);
|
|
90
|
+
const span = end - start;
|
|
91
|
+
if (span === 0 || logAcceleration === Number.NEGATIVE_INFINITY)
|
|
92
|
+
return 0;
|
|
93
|
+
const logError = logAcceleration + 2 * Math.log(span) - Math.log(8);
|
|
94
|
+
return logError > Math.log(Number.MAX_VALUE)
|
|
95
|
+
? Number.POSITIVE_INFINITY
|
|
96
|
+
: Math.exp(logError);
|
|
97
|
+
};
|
|
98
|
+
const serializedTime = (time) => {
|
|
99
|
+
if (time <= 0)
|
|
100
|
+
return 0;
|
|
101
|
+
if (time >= duration)
|
|
102
|
+
return duration;
|
|
103
|
+
const percentage = roundedNumber((time / duration) * 100, precision);
|
|
104
|
+
return (percentage / 100) * duration;
|
|
105
|
+
};
|
|
106
|
+
const serializedSample = (time, terminal = false) => {
|
|
107
|
+
const serialized = serializedTime(time);
|
|
108
|
+
return {
|
|
109
|
+
time: serialized,
|
|
110
|
+
progress: terminal ? 1 : roundedNumber(progressAt(serialized), precision),
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
const samples = [serializedSample(0)];
|
|
50
114
|
const append = (sample) => {
|
|
51
115
|
if (samples.length >= maxSamples) {
|
|
52
116
|
throw new RangeError(`CSS linear export exceeded maxSamples (${maxSamples})`);
|
|
@@ -54,38 +118,27 @@ export function springToCSSLinear(spring, options = {}) {
|
|
|
54
118
|
samples.push(sample);
|
|
55
119
|
};
|
|
56
120
|
const refine = (start, end, depth) => {
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const linear = start.progress + (end.progress - start.progress) * fraction;
|
|
62
|
-
return { deviation: Math.abs(progress - linear), time, progress };
|
|
63
|
-
});
|
|
64
|
-
const needsRefinement = checkpoints.some(({ deviation }) => deviation > maxError);
|
|
65
|
-
if (needsRefinement && depth < maxDepth) {
|
|
66
|
-
const midpoint = checkpoints[1];
|
|
67
|
-
if (midpoint.time === start.time || midpoint.time === end.time) {
|
|
68
|
-
append(end);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const middle = { time: midpoint.time, progress: midpoint.progress };
|
|
72
|
-
refine(start, middle, depth + 1);
|
|
73
|
-
refine(middle, end, depth + 1);
|
|
121
|
+
const endpointError = Math.max(Math.abs(progressAt(start.time) - start.progress), Math.abs(progressAt(end.time) - end.progress));
|
|
122
|
+
const certifiedError = endpointError + accelerationErrorBound(start.time, end.time);
|
|
123
|
+
if (certifiedError <= maxError) {
|
|
124
|
+
append(end);
|
|
74
125
|
return;
|
|
75
126
|
}
|
|
76
|
-
|
|
127
|
+
if (depth >= maxDepth) {
|
|
128
|
+
throw new RangeError(`CSS linear export cannot guarantee maxError (${maxError}) within maxDepth (${maxDepth})`);
|
|
129
|
+
}
|
|
130
|
+
const midpointTime = serializedTime(start.time + (end.time - start.time) / 2);
|
|
131
|
+
if (midpointTime === start.time || midpointTime === end.time) {
|
|
132
|
+
throw new RangeError(`CSS linear export precision (${precision}) is insufficient to guarantee maxError (${maxError})`);
|
|
133
|
+
}
|
|
134
|
+
const middle = serializedSample(midpointTime);
|
|
135
|
+
refine(start, middle, depth + 1);
|
|
136
|
+
refine(middle, end, depth + 1);
|
|
77
137
|
};
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
throw new RangeError(`CSS linear export requires more than maxSamples (${maxSamples})`);
|
|
83
|
-
}
|
|
84
|
-
for (let index = 0; index < seedCount; index += 1) {
|
|
85
|
-
const start = samples.at(-1);
|
|
86
|
-
const time = ((index + 1) / seedCount) * duration;
|
|
87
|
-
refine(start, { time, progress: progressAt(time) }, 0);
|
|
88
|
-
}
|
|
138
|
+
// A linear interpolation error is bounded by h^2/8 times the maximum
|
|
139
|
+
// normalized acceleration. Analytical tail envelopes provide that maximum
|
|
140
|
+
// without relying on checkpoints that can alias an oscillation.
|
|
141
|
+
refine(samples[0], serializedSample(duration, true), 0);
|
|
89
142
|
const frozenSamples = Object.freeze(samples.map((sample) => Object.freeze({ ...sample })));
|
|
90
143
|
const easing = `linear(${frozenSamples
|
|
91
144
|
.map((sample) => `${rounded(sample.progress, precision)} ${rounded((sample.time / duration) * 100, precision)}%`)
|
package/dist/css-linear.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-linear.js","sourceRoot":"","sources":["../src/css-linear.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"css-linear.js","sourceRoot":"","sources":["../src/css-linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AA8BrD,SAAS,cAAc,CAAC,IAAY,EAAE,KAAa;IACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,UAAU,CAAC,GAAG,IAAI,yCAAyC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY,EAAE,KAAa;IACxD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,UAAU,CAAC,GAAG,I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AAC,CAAC;IAEF,qEAAqE;IACrE,0EAA0E;IAC1E,gEAAgE;IAChE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAE,EAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAEzD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CACtD,CAAC;IACF,MAAM,MAAM,GAAG,UAAU,aAAa;SACnC,GAAG,CACF,CAAC,MAAM,EAAE,EAAE,CACT,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,OAAO,CAC/C,CAAC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,GAAG,EAC9B,SAAS,CACV,GAAG,CACP;SACA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAEjB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
package/dist/gsap/plugin.d.ts
CHANGED
|
@@ -61,22 +61,25 @@ export interface MotionSpringEffectVars extends MotionSpringVars {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Creates a preflighted GSAP tween whose duration is final before it is added
|
|
64
|
-
* to a timeline. Prefer the registered `timeline.
|
|
64
|
+
* to a timeline. Prefer the registered `timeline.spring()` effect for
|
|
65
65
|
* sequential, staggered, or nested composition. Calling `invalidate()` reuses
|
|
66
66
|
* the prepared snapshot; create a new effect tween to preflight changed
|
|
67
67
|
* starting values, destinations, or parameters.
|
|
68
68
|
*/
|
|
69
69
|
export declare function createMotionSpringTween(targets: gsap.TweenTarget, rawVars: MotionSpringEffectVars, instance?: typeof gsap): gsap.core.Tween;
|
|
70
|
-
/**
|
|
71
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Tensum's GSAP plugin. Register it with `gsap.registerPlugin(TensumPlugin)`
|
|
72
|
+
* before using the preflighted `timeline.spring()` effect.
|
|
73
|
+
*/
|
|
74
|
+
export declare const TensumPlugin: gsap.Plugin;
|
|
72
75
|
declare global {
|
|
73
76
|
namespace gsap {
|
|
74
77
|
interface EffectsMap {
|
|
75
|
-
|
|
78
|
+
spring(targets: TweenTarget, vars: MotionSpringEffectVars): core.Tween;
|
|
76
79
|
}
|
|
77
80
|
namespace core {
|
|
78
81
|
interface Timeline {
|
|
79
|
-
|
|
82
|
+
spring(targets: TweenTarget, vars: MotionSpringEffectVars, position?: Position): this;
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/gsap/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAmB5B,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,KAAK,EAEV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EAErB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAEhB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAExB,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,GAAG;QAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAC9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