Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/remapper/src/deps.ts>three.MathUtils.damp

A framework for Beat Saber map scripting.
Go to Latest
function three.MathUtils.damp
import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { damp } = three.MathUtils;

Smoothly interpolate a number from x toward y in a spring-like manner using the dt to maintain frame rate independent movement.

Parameters

x: number

Current point.

y: number

Target point.

lambda: number

A higher lambda value will make the movement more sudden, and a lower value will make the movement more gradual.

dt: number

Delta time in seconds.

Returns

number