Skip to content

Commit

Permalink
Update spring.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean-OS authored Dec 26, 2024
1 parent 124c94d commit d4d397d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/src/motion/spring.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ function tick_spring(ctx, last_value, current_value, target_value) {
export function spring(value, opts = {}) {
const store = writable(value);
const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;
/** @type {number} */
/** @type {number | undefined} */
let last_time;
/** @type {Task | null} */
let task;
/** @type {object} */
let current_token;

let last_value = /** @type {T} */ (value);
let last_value = /** @type {T | undefined} */ (value);
let target_value = /** @type {T | undefined} */ (value);

let inv_mass = 1;
Expand Down

0 comments on commit d4d397d

Please sign in to comment.