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.
Once you have your clips
setup, you create a range with name, duration, (optional) insert keys within the buildTimeline function.
// 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
Last updated
Was this helpful?