> For the complete documentation index, see [llms.txt](https://capsule-video.gitbook.io/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://capsule-video.gitbook.io/cloud/scripts-1/advanced-scripting/ranges-and-transitions.md).

# Ranges

Another useful configuration element in `buildTimeline` is the `ranges` array, which is a way to get a normalized 0.0 to 1.0 float value for an arbitrary range. This could be useful for timing a fade-in across several clips, making just one small segment of a clip look different, or creating a transition between two clips.&#x20;

Once you have your `clips` setup, you create a range with name, duration, (optional) insert keys within the buildTimeline function.&#x20;

```javascript
// Ranges Demo

import * as hypno from './stl.js'

const mainTrack

hypno.buildTimeline({

    fps: 30,
    resolution: new Vector(960, 1280),
    clips: [
        {
            start: 0,
            duration: 30,
            asset: new Asset("./input1.mp4")
            track: mainTrack
        },
        {
            start: 90,
            duration: 80,
            asset: new Asset("./input2.mp4")
            track: mainTrack,
        },
    ],
    ranges: [
    
    ]
})
```

### Using a Range for Animation
