# Curves & Motions & Properties

## Curves

A ShakeFX curve is a 1-dimensional functions (in the mathematical sense), like a sine function, a Perlin noise, or a hand-drawn AnimationCurve.

<figure><img src="/files/3ak0fToo3IUdWl4d5wOR" alt="" width="320"><figcaption><p>Sine function</p></figcaption></figure>

<figure><img src="/files/6UwjcwtsV2dF7e2kZGhq" alt="" width="375"><figcaption><p>Hand-drawn AnimationCurve</p></figcaption></figure>

## Motions

A ShakeFX motion takes a 1-dimensional curve and transforms it into a 3D value (`Vector3`, `Quaternion`, etc). This value can then be applied in 3D space as a position, rotation, etc.

For example:

* Scale a `Vector3` (using a curve as the scalar). The resulting `Vector3` could be applied as a position offset or a Transform scale.
* Rotating around an axis by a degree (using a curve as the angle). The resulting `Quaternion` could be applied as a rotation offset.

A motion can be composed of multiple curves, ex 1 curve per axis to apply Perlin noise in 3 dimensions.

This separation between curves and motions allows us to define a curve just once in 1D space instead of for every context where it could be applied in 3D space.

## Properties

The result of a motion is then applied onto a property. The available properties depend on the target that we're shaking, but here are some common ones:

* Local position (expects a `Vector3` value)
* Local rotation (expects a `Quaternion` value)
* Local scale (expects a `Vector3` value)
* Camera field of view (expects a `float` value)

## Summary

So a shake animation is a combination of 4 individual layers:

* **Curves:** 1 or more curves generate 1-dimensional values.
* **Motion:** A motion converts the curve results into a 3D value (like a `Vector3`, `Quaternion`, etc).
* **Property:** The shake interprets the 3D value and applies it onto the target property of a component like Camera or Transform.
* **Shake:** A shake consists of 1 or more properties.

## Implementations

Built-in curves: [Curves](/shakefx/shakes/curves.md)

Built-in motions: [Motions](/shakefx/shakes/motions.md)

Camera properties: [Camera Shake](/shakefx/shakes/camera-shake.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fx-engine.gitbook.io/shakefx/core/curves-and-motions-and-properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
