> For the complete documentation index, see [llms.txt](https://plugin-everything.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugin-everything.gitbook.io/docs/what-is-scope-and-how-does-it-work.md).

# What is Scope and how does it work?

Say we want to map a red to green gradient along a single path, simple. We start at the first vertex and progress along the path:

<div><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2Fpo13yeB4hhv4mVC4EFgG%2Fscope_01.jpg?alt=media&amp;token=8a8aaee6-0bd5-4ae3-b6a8-7ce3ca083e38" alt="" width="320"><figcaption><p>Mapping a gradient to a single path</p></figcaption></figure> <figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2FXKbTJJ0zDbDwmnKYhe7p%2Fscope_01b.jpg?alt=media&amp;token=fedb5fd2-1650-4d17-be88-dc1fb37b9f82" alt="" width="320"><figcaption><p>Mapping variable width works the same</p></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2Fywxlv03sSicW9YGo3stg%2Fscope_params_white.png?alt=media&amp;token=d12f922c-743d-4cf6-b46f-e4754a7e81e3" alt="" width="486"><figcaption><p>Scope applies to variable widths &#x26; gradients</p></figcaption></figure></div>

But what if we have multiple paths, should the gradient and width progress *restart* on each path or *stretch* to encompass all paths in aggregate?

<div data-with-frame="true"><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2F3XJ4XfJGl9rq6qtYqXq9%2Fscope_02.jpg?alt=media&amp;token=aa62692f-920d-4b0c-a50c-5e7f77d7a086" alt="" width="563"><figcaption><p><code>Scope: Individual Paths</code>  progress <em>resets</em> on each new path</p></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2FRT29TtP5Oj6RVMezRuH2%2Fscope_03.jpg?alt=media&amp;token=760b0c1d-56f8-4883-9fcc-ed216e0b2c8b" alt="" width="563"><figcaption><p><code>Scope: Multiple Paths</code>  progress <em>continues</em> on each new path</p></figcaption></figure></div>

To define this behavior, we have the concept of `Scope` and it controls how we want to map our gradient and variable thickness along our path / paths.&#x20;

{% hint style="info" %}
Scope distribution is based on **arc length**, not path count. If paths or time-offset copies differ in length, their portions will not be equal.
{% endhint %}

### What else can we scope?

In addition to scoping to individual or multiple paths, we can also scope to trimmed sections of our paths or individual dashes (if `Dashes` are enabled, otherwise the `Scope: Dashes` option will be hidden).&#x20;

<div><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2F80e4BdieDDnL9bJ0nt34%2Fscope_04.jpg?alt=media&amp;token=ae06c966-bbf6-4bc7-9da5-f68cd0589a54" alt=""><figcaption><p><code>Scope: Individual Trims</code></p></figcaption></figure> <figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2FpPRSvqMFUczGbBvbGW6G%2Fscope_05.jpg?alt=media&amp;token=3eeccace-2a00-4b98-bef9-11f40c034d42" alt=""><figcaption><p><code>Scope: Individual Dashes</code></p></figcaption></figure></div>

### How does scope work if we have repeated copies?

But wait there's more! If we're using the repeater, how will the scope map our gradient or width along copies? The scope expands to **all repeated copies in aggregate** in the following order:

1. original&#x20;
2. first copy
3. ...
4. last copy

If we have **multiple paths and repeated copies**, scope order becomes:

* original first path
* original second path&#x20;
* ... continue until all original paths drawn
* first path, first copy
* second path, first copy
* ... continue until all first copies drawn
* ... continue until all repeated copies drawn

In the following example the hue of the gradient and the thickness of the stroke acts as a visual indicator of order. The two original paths are shown with their vertices illustrated, and the repeated copies sit below:

<div data-with-frame="true"><figure><img src="https://749037855-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv64kPMoAtApBYU0Un9u%2Fuploads%2Fp2aKC7SoPKxWQWgAaEjh%2Fscope_06b.jpg?alt=media&amp;token=e7115ac1-8642-490c-92dd-25f552f80e1a" alt="" width="563"><figcaption><p>3 total copies, each receiving additional <code>Translation Y</code> offset. </p></figcaption></figure></div>

{% hint style="info" %}
Note this same ordering applies if [trimming multiple paths with `Trim Offset` and `Repeater` enabled](/docs/faq.md#how-does-trim-paths-work-with-repeater-copies).&#x20;
{% endhint %}
