vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
106 lines • 2.82 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parallaxAttributes = exports.parallaxTypes = exports.parallaxGroups = void 0;
var utils_1 = require("../../../../utils");
var globals_1 = require("./globals");
function attrName(name) {
return "".concat(globals_1.parallaxAttrPrefix).concat(name);
}
exports.parallaxGroups = [
{
name: 'transform',
types: [
{
n: attrName('x'),
p: 'translateX',
u: 'px',
},
{
n: attrName('y'),
p: 'translateY',
u: 'px',
},
{
n: attrName('z'),
p: 'translateZ',
u: 'px',
},
{
n: attrName('scale'),
p: 'scale',
u: '',
modifier: function (value) { return value + 1; },
},
{
n: attrName('scale-x'),
p: 'scaleX',
u: '',
modifier: function (value) { return value + 1; },
},
{
n: attrName('scale-y'),
p: 'scaleY',
u: '',
modifier: function (value) { return value + 1; },
},
{
n: attrName('skew'),
p: 'skew',
u: 'deg',
},
{
n: attrName('skew-x'),
p: 'skewX',
u: 'deg',
},
{
n: attrName('skew-y'),
p: 'skewY',
u: 'deg',
},
{
n: attrName('rotate'),
p: 'rotate',
u: 'deg',
},
{
n: attrName('rotate-x'),
p: 'rotateX',
u: 'deg',
},
{
n: attrName('rotate-y'),
p: 'rotateY',
u: 'deg',
},
{
n: attrName('rotate-z'),
p: 'rotateZ',
u: 'deg',
},
],
},
{
name: 'opacity',
types: [
{
n: attrName('opacity'),
p: 'opacity',
u: '',
isAbs: true,
modifier: function (value) { return (0, utils_1.clamp)(value + 1, 0, 1); },
},
],
},
];
exports.parallaxTypes = Object.values(exports.parallaxGroups)
.map(function (_a) {
var types = _a.types;
return types;
})
.flat();
exports.parallaxAttributes = exports.parallaxTypes.map(function (_a) {
var n = _a.n;
return n;
});
//# sourceMappingURL=constants.js.map