coily 0.8.1 → 0.9.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/api.cjs +8 -2
- package/dist/api.d.cts +2 -2
- package/dist/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.mjs +8 -2
- package/dist/loop.d.cts +1 -1
- package/dist/loop.d.mts +1 -1
- package/dist/loop.d.ts +1 -1
- package/dist/shared/{coily.fc8a32a3.d.cts → coily.0b4474af.d.cts} +1 -0
- package/dist/shared/{coily.fc8a32a3.d.mts → coily.0b4474af.d.mts} +1 -0
- package/dist/shared/{coily.fc8a32a3.d.ts → coily.0b4474af.d.ts} +1 -0
- package/package.json +1 -1
package/dist/api.cjs
CHANGED
|
@@ -490,7 +490,7 @@ class Spring {
|
|
|
490
490
|
set target(value) {
|
|
491
491
|
if (value !== __privateGet$1(this, _target)) {
|
|
492
492
|
if (__privateGet$1(this, _solver).position !== __privateGet$1(this, _solver).lazyPosition) {
|
|
493
|
-
__privateGet$1(this, _solver).tick(0
|
|
493
|
+
__privateGet$1(this, _solver).tick(0);
|
|
494
494
|
}
|
|
495
495
|
if (!__privateGet$1(this, _scheduler$1).has(__privateGet$1(this, _solver))) {
|
|
496
496
|
__privateGet$1(this, _scheduler$1).add(__privateGet$1(this, _solver));
|
|
@@ -507,7 +507,7 @@ class Spring {
|
|
|
507
507
|
const position = value - __privateGet$1(this, _target);
|
|
508
508
|
if (position !== __privateGet$1(this, _solver).position) {
|
|
509
509
|
if (__privateGet$1(this, _solver).position !== __privateGet$1(this, _solver).lazyPosition) {
|
|
510
|
-
__privateGet$1(this, _solver).tick(0
|
|
510
|
+
__privateGet$1(this, _solver).tick(0);
|
|
511
511
|
}
|
|
512
512
|
if (!__privateGet$1(this, _scheduler$1).has(__privateGet$1(this, _solver))) {
|
|
513
513
|
__privateGet$1(this, _scheduler$1).add(__privateGet$1(this, _solver));
|
|
@@ -576,6 +576,12 @@ class Spring {
|
|
|
576
576
|
onStop(callback) {
|
|
577
577
|
return __privateGet$1(this, _solver).onStop(callback);
|
|
578
578
|
}
|
|
579
|
+
jumpTo(value) {
|
|
580
|
+
__privateSet$1(this, _target, value);
|
|
581
|
+
__privateGet$1(this, _solver).position = 0;
|
|
582
|
+
__privateGet$1(this, _solver).velocity = 0;
|
|
583
|
+
__privateGet$1(this, _solver).tick(0);
|
|
584
|
+
}
|
|
579
585
|
}
|
|
580
586
|
_target = new WeakMap();
|
|
581
587
|
_solver = new WeakMap();
|
package/dist/api.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SpringSystem } from './shared/coily.
|
|
2
|
-
export { a as Spring } from './shared/coily.
|
|
1
|
+
import { S as SpringSystem } from './shared/coily.0b4474af.cjs';
|
|
2
|
+
export { a as Spring } from './shared/coily.0b4474af.cjs';
|
|
3
3
|
|
|
4
4
|
declare function createSpringSystem(): SpringSystem;
|
|
5
5
|
|
package/dist/api.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SpringSystem } from './shared/coily.
|
|
2
|
-
export { a as Spring } from './shared/coily.
|
|
1
|
+
import { S as SpringSystem } from './shared/coily.0b4474af.mjs';
|
|
2
|
+
export { a as Spring } from './shared/coily.0b4474af.mjs';
|
|
3
3
|
|
|
4
4
|
declare function createSpringSystem(): SpringSystem;
|
|
5
5
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SpringSystem } from './shared/coily.
|
|
2
|
-
export { a as Spring } from './shared/coily.
|
|
1
|
+
import { S as SpringSystem } from './shared/coily.0b4474af.js';
|
|
2
|
+
export { a as Spring } from './shared/coily.0b4474af.js';
|
|
3
3
|
|
|
4
4
|
declare function createSpringSystem(): SpringSystem;
|
|
5
5
|
|
package/dist/api.mjs
CHANGED
|
@@ -488,7 +488,7 @@ class Spring {
|
|
|
488
488
|
set target(value) {
|
|
489
489
|
if (value !== __privateGet$1(this, _target)) {
|
|
490
490
|
if (__privateGet$1(this, _solver).position !== __privateGet$1(this, _solver).lazyPosition) {
|
|
491
|
-
__privateGet$1(this, _solver).tick(0
|
|
491
|
+
__privateGet$1(this, _solver).tick(0);
|
|
492
492
|
}
|
|
493
493
|
if (!__privateGet$1(this, _scheduler$1).has(__privateGet$1(this, _solver))) {
|
|
494
494
|
__privateGet$1(this, _scheduler$1).add(__privateGet$1(this, _solver));
|
|
@@ -505,7 +505,7 @@ class Spring {
|
|
|
505
505
|
const position = value - __privateGet$1(this, _target);
|
|
506
506
|
if (position !== __privateGet$1(this, _solver).position) {
|
|
507
507
|
if (__privateGet$1(this, _solver).position !== __privateGet$1(this, _solver).lazyPosition) {
|
|
508
|
-
__privateGet$1(this, _solver).tick(0
|
|
508
|
+
__privateGet$1(this, _solver).tick(0);
|
|
509
509
|
}
|
|
510
510
|
if (!__privateGet$1(this, _scheduler$1).has(__privateGet$1(this, _solver))) {
|
|
511
511
|
__privateGet$1(this, _scheduler$1).add(__privateGet$1(this, _solver));
|
|
@@ -574,6 +574,12 @@ class Spring {
|
|
|
574
574
|
onStop(callback) {
|
|
575
575
|
return __privateGet$1(this, _solver).onStop(callback);
|
|
576
576
|
}
|
|
577
|
+
jumpTo(value) {
|
|
578
|
+
__privateSet$1(this, _target, value);
|
|
579
|
+
__privateGet$1(this, _solver).position = 0;
|
|
580
|
+
__privateGet$1(this, _solver).velocity = 0;
|
|
581
|
+
__privateGet$1(this, _solver).tick(0);
|
|
582
|
+
}
|
|
577
583
|
}
|
|
578
584
|
_target = new WeakMap();
|
|
579
585
|
_solver = new WeakMap();
|
package/dist/loop.d.cts
CHANGED
package/dist/loop.d.mts
CHANGED
package/dist/loop.d.ts
CHANGED