> 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="/files/SgowvY4j7kRhlcE9ZQ9O" alt="" width="320"><figcaption><p>Mapping a gradient to a single path</p></figcaption></figure> <figure><img src="/files/4oT3MQoTy55VfkIU04W0" alt="" width="320"><figcaption><p>Mapping variable width works the same</p></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/4a0UmMibvC8rBb6dPPVV" 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="/files/Gx9rB3BiFAUyNhEuTuOM" 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="/files/evvWguj44CSWHiKQ9r2q" 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="/files/ae18qHgfcb3dMb91BzzJ" alt=""><figcaption><p><code>Scope: Individual Trims</code></p></figcaption></figure> <figure><img src="/files/wNS0DqnCtfC91glDkxyl" 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="/files/Ief8MdZQ3nFjPqD8W5lE" 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://plugin-everything.gitbook.io/docs/what-is-scope-and-how-does-it-work.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
