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

x/threejs_4_deno/src/math/Vector2.js>Vector2#lerpVectors

A simple transformation of three.js for use within a Deno workflow
Go to Latest
method Vector2.prototype.lerpVectors
import { Vector2 } from "https://deno.land/x/threejs_4_deno@v121/src/math/Vector2.js";

Sets this vector to be the vector linearly interpolated between v1 and v2 where alpha is the distance along the line connecting the two vectors - alpha = 0 will be v1, and alpha = 1 will be v2.

Parameters

the starting vector.

vector to interpolate towards.

alpha: number

interpolation factor in the closed interval [0, 1].