# Locator

[Canonical page](https://nothing.graphics/docs/format/reference/locator) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/locator.md)

Attach a drawable to host bounds, a contour position, or a vertex.



<!-- Generated by ncf/tools/reference/generate.mjs. -->

A locator uses the nearest host shape’s sampled geometry. `u` and `v` can be used together. `along` and `vertex` each select a point by themselves.

## Example [#example]

### Attach a marker to a moving box edge [#attach-a-marker-to-a-moving-box-edge]

On a child shape, `u="1"` and `v="0.5"` select the right midpoint of the host’s local bounding box. The blue circle marks that point. At frame 4 the ellipse’s sampled bounds place the attachment at local (28, 4). The host’s quarter turn and translation carry it to scene (60, 52).

```xml
<shape u="1" v="0.5">
  <circle r="2"/>
  <fill><paint><solid color="#0080FFFF"/></paint></fill>
</shape>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/boxed-geometry/rotated-ellipse.nothing)

## Usage context [#usage-context]

Trait `Locator` in the [scene format type model](https://nothing.graphics/docs/format/spec/type-model).

Related pages in this reference are [Drawable](https://nothing.graphics/docs/format/reference/drawable).

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `u` [#u]

**Value** fraction of host width · **Keys** Scalar

Horizontal share measured from the left of the host bounds. Values outside \[0, 1] select a point outside those bounds. A track requires an authored base. Omission leaves this axis at the parent origin.

### `v` [#v]

**Value** fraction of host height · **Keys** Scalar

Vertical share measured from the top of the host bounds. Values outside \[0, 1] select a point outside those bounds. A track requires an authored base. Omission leaves this axis at the parent origin.

### `along` [#along]

**Value** fraction of contour length · **Keys** Scalar

Share of the directed contour length. Open contours use \[0, 1]. Closed contours wrap across laps. A track requires an authored base.

### `vertex` [#vertex]

**Value** vertex index · **Keys** Scalar

Zero-based vertex and fractional distance along its following segment. Open contours with n vertices admit \[0, n − 1]. Closed contours wrap every n vertices. A track requires an authored base.

### `orient` [#orient]

**Value** `none`, `auto` · **If omitted** `none` · **Keys** Held

Facing relative to the host contour. Auto facing requires along or vertex.

## Specifications [#specifications]

* [Locators](https://nothing.graphics/docs/format/spec/attached-drawables#locators)
