first commit
This commit is contained in:
47
node_modules/lottie-web/player/js/utils/expressions/shapes/ShapePathInterface.js
generated
vendored
Normal file
47
node_modules/lottie-web/player/js/utils/expressions/shapes/ShapePathInterface.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import propertyGroupFactory from '../PropertyGroupFactory';
|
||||
import PropertyInterface from '../PropertyInterface';
|
||||
|
||||
const ShapePathInterface = (
|
||||
|
||||
function () {
|
||||
return function pathInterfaceFactory(shape, view, propertyGroup) {
|
||||
var prop = view.sh;
|
||||
|
||||
function interfaceFunction(val) {
|
||||
if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
|
||||
return interfaceFunction.path;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
|
||||
prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
|
||||
Object.defineProperties(interfaceFunction, {
|
||||
path: {
|
||||
get: function () {
|
||||
if (prop.k) {
|
||||
prop.getValue();
|
||||
}
|
||||
return prop;
|
||||
},
|
||||
},
|
||||
shape: {
|
||||
get: function () {
|
||||
if (prop.k) {
|
||||
prop.getValue();
|
||||
}
|
||||
return prop;
|
||||
},
|
||||
},
|
||||
_name: { value: shape.nm },
|
||||
ix: { value: shape.ix },
|
||||
propertyIndex: { value: shape.ix },
|
||||
mn: { value: shape.mn },
|
||||
propertyGroup: { value: propertyGroup },
|
||||
});
|
||||
return interfaceFunction;
|
||||
};
|
||||
}()
|
||||
);
|
||||
|
||||
export default ShapePathInterface;
|
Reference in New Issue
Block a user