# Sampler

class `Animation.``Sampler`()

  Describes how the keyframes in a buffer are sampled.

  ## Index

  Constructors

  - `constructor`

  Properties

  - `buffer`
  - `interpolationType`

  Methods

  - `interpolateQuat`
  - `interpolateScalar`
  - `interpolateVec3`
  - `interpolateVec3CubicSpline`

## Constructors

`Animation.Sampler.``constructor`()
  Sampler(buffer: `KeyframeBuffer`, interpolationType: `InterpolationType`): `Sampler`

  Creates a new sampler for a [[KeyframeBuffer]]

  Parameters

  > buffer: `KeyframeBuffer`

  > > The buffer that will be sampled.

  > interpolationType: `InterpolationType`

  > > The Type of interpolation that will be used

  Returns: `Sampler`

## Properties

`Animation.Sampler.``buffer`

  readonly

  buffer: `KeyframeBuffer`

  The buffer that will be sampled.

`Animation.Sampler.``interpolationType`
  interpolationType: `InterpolationType`

  The Type of interpolation that will be used

## Methods

`Animation.Sampler.``interpolateQuat`()
  interpolateQuat(t: number, out: Quaternion): void

  Computes an interpolated quaternion for the given frame.

  Parameters

  > t: number

  > out: Quaternion

  Returns: void

`Animation.Sampler.``interpolateScalar`()
  interpolateScalar(t: number): number

  Computes an interpolated scalar value for the given frame.

  Parameters

  > t: number

  Returns: number

`Animation.Sampler.``interpolateVec3`()
  interpolateVec3(t: number, out: `Point3`): void

  Computes an interpolated Vector 3 value for the given frame.

  Parameters

  > t: number

  > out: `Point3`

  Returns: void

`Animation.Sampler.``interpolateVec3CubicSpline`()
  interpolateVec3CubicSpline(k0: number, k1: number, t: number, out: `Point3`): void

  Performs Cubic Spline Interpolation on the Vector3 values at keyframes beginning at indices k0 and k1

  Parameters

  > k0: number

  > k1: number

  > t: number

  > out: `Point3`

  Returns: void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...