Skip to content

Latest commit

 

History

History
83 lines (47 loc) · 2.56 KB

InterpolateValue.md

File metadata and controls

83 lines (47 loc) · 2.56 KB

InterpolateValue (client)

Helper class to interpolate values between states. It has mechanics to smoothen unreliable intervals of state and can interpolate simple values such as number, as well as complex: pc.Vec2, pc.Vec3, pc.Vec4, pc.Quat, pc.Color.


Index

Properties

.value : number | pc.Vec2 | pc.Vec3 | pc.Vec4 | pc.Quat | pc.Color

Constructor

new InterpolateValue(value)

Functions

set(value)
add(value)
update(dt)


Properties

Current Value, that it interpolated between states on every update.

Constructor

Param Type Description
value number | pc.Vec2 | pc.Vec3 | pc.Vec4 | pc.Quat | pc.Color Value to interpolate. Can be a simple number, as well as complex: pc.Vec2, pc.Vec3, pc.Vec4, pc.Quat, pc.Color object with lerp or slerp, copy and clone method.

Functions

Force a value set, ignoring an interpolation.

Param Type
value number | pc.Vec2 | pc.Vec3 | pc.Vec4 | pc.Quat | pc.Color

Add a value to list of interpolation states.

Param Type
value number | pc.Vec2 | pc.Vec3 | pc.Vec4 | pc.Quat | pc.Color

Call an update, with should be called at the application update interval. This will progress interpolation through states based on Delta Time.

Param Type Description
dt number Delta Time of an application update frequency.