first commit
This commit is contained in:
33
node_modules/lottie-web/player/js/elements/helpers/shapes/CVShapeData.js
generated
vendored
Normal file
33
node_modules/lottie-web/player/js/elements/helpers/shapes/CVShapeData.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import ShapePropertyFactory from '../../../utils/shapes/ShapeProperty';
|
||||
import SVGShapeData from './SVGShapeData';
|
||||
|
||||
function CVShapeData(element, data, styles, transformsManager) {
|
||||
this.styledShapes = [];
|
||||
this.tr = [0, 0, 0, 0, 0, 0];
|
||||
var ty = 4;
|
||||
if (data.ty === 'rc') {
|
||||
ty = 5;
|
||||
} else if (data.ty === 'el') {
|
||||
ty = 6;
|
||||
} else if (data.ty === 'sr') {
|
||||
ty = 7;
|
||||
}
|
||||
this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
|
||||
var i;
|
||||
var len = styles.length;
|
||||
var styledShape;
|
||||
for (i = 0; i < len; i += 1) {
|
||||
if (!styles[i].closed) {
|
||||
styledShape = {
|
||||
transforms: transformsManager.addTransformSequence(styles[i].transforms),
|
||||
trNodes: [],
|
||||
};
|
||||
this.styledShapes.push(styledShape);
|
||||
styles[i].elements.push(styledShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
|
||||
|
||||
export default CVShapeData;
|
Reference in New Issue
Block a user