You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for Custom Transforms / Value Transforms is not clear.
I am trying to create a custom transform to HSL colors.
/*
{
CUSTOM_EASING: {
type: 'easing',
value: [1,2,3,4]
}
}
*/
theo.registerValueTransform(
// Name to be used with registerTransform()
"easing/web",
// Determine if the value transform
// should be run on the specified prop
prop => prop.get("type") === "easing",
// Return the new value
prop => {
const [x1, y1, x2, y2] = prop.get("value").toArray();
return `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`;
}
);
// Override the default "web" transform
theo.registerTransform("web", ["color/rgb", "easing/web"]);
The text was updated successfully, but these errors were encountered:
The documentation for Custom Transforms / Value Transforms is not clear.
I am trying to create a custom transform to HSL colors.
The text was updated successfully, but these errors were encountered: