FasterMotion.load() - Basic Example
Load animations from an inline fmtion object with parameter-driven animation.
const fmtionData = {
meta: { name: 'Basic Animation' },
parameters: {
'box/progress': { type: 'float', default: 0 }
},
scrollBindings: [],
listeners: [],
dom: [{
selector: '#box',
driver: 'box/progress',
from: { x: 0, rotation: 0, scale: 1 },
to: { x: 200, rotation: 360, scale: 1.2 }
}],
canvas: []
};
const result = await FasterMotion.load(fmtionData);