UNPKG

@threlte/extras

Version:

Utilities, abstractions and plugins for your Threlte apps

10 lines (9 loc) 228 B
/** * adds each `stop` of `stops` to the gradient */ export const addStops = (gradient, stops = []) => { for (const { color, offset } of stops) { gradient.addColorStop(offset, color); } return gradient; };