# MotionScript

<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-keyword">module</span> <span class="tok-type">MotionScript</span></code></pre>

| | |
|---|---|
| Assembly | `Partas.Nacara.Plugins.Motion` |

Hovers compiled to a script that plays them with anime.js.

## Functions and values

<div class="nacara-api__entry" id="anime">
<a class="nacara-api__anchor"
                           href="#anime"
                           aria-label="Link to anime"
                           data-pagefind-ignore></a>
<details class="nacara-api__member">
<summary>
<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-function">anime</span> <span class="tok-punctuation">()</span> <span class="tok-punctuation">:</span> <span class="tok-type">string</span></code></pre>
</summary>
<div class="nacara-api__body">

The anime.js 4.5.0 module embedded in the package.


</div>
</details>
</div>

<div class="nacara-api__entry" id="entry">
<a class="nacara-api__anchor"
                           href="#entry"
                           aria-label="Link to entry"
                           data-pagefind-ignore></a>
<details class="nacara-api__member">
<summary>
<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-function">entry</span> <span class="tok-punctuation">(</span><span class="tok-parameter">source</span><span class="tok-punctuation">:</span> <a class="tok-type" href="/Partas.Nacara.Plugins/reference/partas-nacara-plugins-motion/nacara-plugins/animesource/">AnimeSource</a><span class="tok-punctuation">)</span> <span class="tok-punctuation">(</span><span class="tok-parameter">policy</span><span class="tok-punctuation">:</span> <a class="tok-type" href="/Partas.Nacara.Plugins/reference/partas-nacara-plugins-motion/nacara-plugins/reducedmotion/">ReducedMotion</a><span class="tok-punctuation">)</span> <span class="tok-punctuation">(</span><span class="tok-parameter">hovers</span><span class="tok-punctuation">:</span> <a class="tok-type" href="/Partas.Nacara.Plugins/reference/partas-nacara-plugins-motion/nacara-plugins/hover/">Hover</a> <span class="tok-type">list</span><span class="tok-punctuation">)</span> <span class="tok-punctuation">:</span> <span class="tok-type">string</span></code></pre>
</summary>
<div class="nacara-api__body">

The script that plays the hovers.

A bundled source starts with anime.js's licence notice, as a `/*! ... */` comment, then a static import of `./anime.esm.js` that names only what the hovers use, for the site's bundler to resolve. A CDN source holds no static import: it loads the module with `import()` inside an async function, so it runs as a classic script.



A token value is read with `getComputedStyle` each time a hover starts, never written as `var()`; where the site does not define the token, its fallback is used.

| Parameter | |
|---|---|
| `source` | Where anime.js comes from. |
| `policy` | What the script does for visitors who ask for reduced motion. |
| `hovers` | The hovers to play. |


</div>
</details>
</div>
