no-mixed-spaces-and-tabs fix
diff --git a/player/js/elements/helpers/HierarchyElement.js b/player/js/elements/helpers/HierarchyElement.js
index 0a91122..dbc8edb 100644
--- a/player/js/elements/helpers/HierarchyElement.js
+++ b/player/js/elements/helpers/HierarchyElement.js
@@ -7,44 +7,44 @@
function HierarchyElement(){}
HierarchyElement.prototype = {
- /**
+ /**
* @function
* Initializes hierarchy properties
*
*/
- initHierarchy: function() {
- //element's parent list
- this.hierarchy = [];
- //if element is parent of another layer _isParent will be true
- this._isParent = false;
- this.checkParenting();
- },
- /**
+ initHierarchy: function() {
+ //element's parent list
+ this.hierarchy = [];
+ //if element is parent of another layer _isParent will be true
+ this._isParent = false;
+ this.checkParenting();
+ },
+ /**
* @function
* Sets layer's hierarchy.
* @param {array} hierarch
* layer's parent list
*
*/
- setHierarchy: function(hierarchy){
- this.hierarchy = hierarchy;
- },
- /**
+ setHierarchy: function(hierarchy){
+ this.hierarchy = hierarchy;
+ },
+ /**
* @function
* Sets layer as parent.
*
*/
- setAsParent: function() {
- this._isParent = true;
- },
- /**
+ setAsParent: function() {
+ this._isParent = true;
+ },
+ /**
* @function
* Searches layer's parenting chain
*
*/
- checkParenting: function(){
- if (this.data.parent !== undefined){
- this.comp.buildElementParenting(this, this.data.parent, []);
- }
- }
+ checkParenting: function(){
+ if (this.data.parent !== undefined){
+ this.comp.buildElementParenting(this, this.data.parent, []);
+ }
+ }
};
\ No newline at end of file
diff --git a/player/js/elements/helpers/shapes/SVGElementsRenderer.js b/player/js/elements/helpers/shapes/SVGElementsRenderer.js
index 0c7ea2a..42ce0ee 100644
--- a/player/js/elements/helpers/shapes/SVGElementsRenderer.js
+++ b/player/js/elements/helpers/shapes/SVGElementsRenderer.js
@@ -1,209 +1,209 @@
var SVGElementsRenderer = (function() {
- var _identityMatrix = new Matrix();
- var _matrixHelper = new Matrix();
+ var _identityMatrix = new Matrix();
+ var _matrixHelper = new Matrix();
- var ob = {
- createRenderFunction: createRenderFunction
- }
+ var ob = {
+ createRenderFunction: createRenderFunction
+ }
- function createRenderFunction(data) {
- var ty = data.ty;
- switch(data.ty) {
- case 'fl':
- return renderFill;
- case 'gf':
- return renderGradient;
- case 'gs':
- return renderGradientStroke;
- case 'st':
- return renderStroke;
- case 'sh':
- case 'el':
- case 'rc':
- case 'sr':
- return renderPath;
- case 'tr':
- return renderContentTransform;
- }
- }
+ function createRenderFunction(data) {
+ var ty = data.ty;
+ switch(data.ty) {
+ case 'fl':
+ return renderFill;
+ case 'gf':
+ return renderGradient;
+ case 'gs':
+ return renderGradientStroke;
+ case 'st':
+ return renderStroke;
+ case 'sh':
+ case 'el':
+ case 'rc':
+ case 'sr':
+ return renderPath;
+ case 'tr':
+ return renderContentTransform;
+ }
+ }
- function renderContentTransform(styleData, itemData, isFirstFrame) {
- if(isFirstFrame || itemData.transform.op._mdf){
- itemData.transform.container.setAttribute('opacity',itemData.transform.op.v);
- }
- if(isFirstFrame || itemData.transform.mProps._mdf){
- itemData.transform.container.setAttribute('transform',itemData.transform.mProps.v.to2dCSS());
- }
- }
+ function renderContentTransform(styleData, itemData, isFirstFrame) {
+ if(isFirstFrame || itemData.transform.op._mdf){
+ itemData.transform.container.setAttribute('opacity',itemData.transform.op.v);
+ }
+ if(isFirstFrame || itemData.transform.mProps._mdf){
+ itemData.transform.container.setAttribute('transform',itemData.transform.mProps.v.to2dCSS());
+ }
+ }
- function renderPath(styleData, itemData, isFirstFrame) {
- var j, jLen,pathStringTransformed,redraw,pathNodes,l, lLen = itemData.styles.length;
- var lvl = itemData.lvl;
- var paths, mat, props, iterations, k;
- for(l=0;l<lLen;l+=1){
- redraw = itemData.sh._mdf || isFirstFrame;
- if(itemData.styles[l].lvl < lvl){
- mat = _matrixHelper.reset();
- iterations = lvl - itemData.styles[l].lvl;
- k = itemData.transformers.length-1;
- while(!redraw && iterations > 0) {
- redraw = itemData.transformers[k].mProps._mdf || redraw;
- iterations --;
- k --;
- }
- if(redraw) {
- iterations = lvl - itemData.styles[l].lvl;
- k = itemData.transformers.length-1;
- while(iterations > 0) {
- props = itemData.transformers[k].mProps.v.props;
- mat.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
- iterations --;
- k --;
- }
- }
- } else {
- mat = _identityMatrix;
- }
- paths = itemData.sh.paths;
- jLen = paths._length;
- if(redraw){
- pathStringTransformed = '';
- for(j=0;j<jLen;j+=1){
- pathNodes = paths.shapes[j];
- if(pathNodes && pathNodes._length){
- pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
- }
- }
- itemData.caches[l] = pathStringTransformed;
- } else {
- pathStringTransformed = itemData.caches[l];
- }
- itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
- itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
- }
- }
+ function renderPath(styleData, itemData, isFirstFrame) {
+ var j, jLen,pathStringTransformed,redraw,pathNodes,l, lLen = itemData.styles.length;
+ var lvl = itemData.lvl;
+ var paths, mat, props, iterations, k;
+ for(l=0;l<lLen;l+=1){
+ redraw = itemData.sh._mdf || isFirstFrame;
+ if(itemData.styles[l].lvl < lvl){
+ mat = _matrixHelper.reset();
+ iterations = lvl - itemData.styles[l].lvl;
+ k = itemData.transformers.length-1;
+ while(!redraw && iterations > 0) {
+ redraw = itemData.transformers[k].mProps._mdf || redraw;
+ iterations --;
+ k --;
+ }
+ if(redraw) {
+ iterations = lvl - itemData.styles[l].lvl;
+ k = itemData.transformers.length-1;
+ while(iterations > 0) {
+ props = itemData.transformers[k].mProps.v.props;
+ mat.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
+ iterations --;
+ k --;
+ }
+ }
+ } else {
+ mat = _identityMatrix;
+ }
+ paths = itemData.sh.paths;
+ jLen = paths._length;
+ if(redraw){
+ pathStringTransformed = '';
+ for(j=0;j<jLen;j+=1){
+ pathNodes = paths.shapes[j];
+ if(pathNodes && pathNodes._length){
+ pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+ }
+ }
+ itemData.caches[l] = pathStringTransformed;
+ } else {
+ pathStringTransformed = itemData.caches[l];
+ }
+ itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+ itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+ }
+ }
- function renderFill (styleData,itemData, isFirstFrame){
- var styleElem = itemData.style;
+ function renderFill (styleData,itemData, isFirstFrame){
+ var styleElem = itemData.style;
- if(itemData.c._mdf || isFirstFrame){
- styleElem.pElem.setAttribute('fill','rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')');
- }
- if(itemData.o._mdf || isFirstFrame){
- styleElem.pElem.setAttribute('fill-opacity',itemData.o.v);
- }
- };
+ if(itemData.c._mdf || isFirstFrame){
+ styleElem.pElem.setAttribute('fill','rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')');
+ }
+ if(itemData.o._mdf || isFirstFrame){
+ styleElem.pElem.setAttribute('fill-opacity',itemData.o.v);
+ }
+ };
- function renderGradientStroke (styleData, itemData, isFirstFrame) {
- renderGradient(styleData, itemData, isFirstFrame);
- renderStroke(styleData, itemData, isFirstFrame);
- }
+ function renderGradientStroke (styleData, itemData, isFirstFrame) {
+ renderGradient(styleData, itemData, isFirstFrame);
+ renderStroke(styleData, itemData, isFirstFrame);
+ }
- function renderGradient(styleData, itemData, isFirstFrame) {
- var gfill = itemData.gf;
- var hasOpacity = itemData.g._hasOpacity;
- var pt1 = itemData.s.v, pt2 = itemData.e.v;
+ function renderGradient(styleData, itemData, isFirstFrame) {
+ var gfill = itemData.gf;
+ var hasOpacity = itemData.g._hasOpacity;
+ var pt1 = itemData.s.v, pt2 = itemData.e.v;
- if (itemData.o._mdf || isFirstFrame) {
- var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
- itemData.style.pElem.setAttribute(attr, itemData.o.v);
- }
- if (itemData.s._mdf || isFirstFrame) {
- var attr1 = styleData.t === 1 ? 'x1' : 'cx';
- var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
- gfill.setAttribute(attr1, pt1[0]);
- gfill.setAttribute(attr2, pt1[1]);
- if (hasOpacity && !itemData.g._collapsable) {
- itemData.of.setAttribute(attr1, pt1[0]);
- itemData.of.setAttribute(attr2, pt1[1]);
- }
- }
- var stops, i, len, stop;
- if (itemData.g._cmdf || isFirstFrame) {
- stops = itemData.cst;
- var cValues = itemData.g.c;
- len = stops.length;
- for (i = 0; i < len; i += 1){
- stop = stops[i];
- stop.setAttribute('offset', cValues[i * 4] + '%');
- stop.setAttribute('stop-color','rgb('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ')');
- }
- }
- if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
- var oValues = itemData.g.o;
- if(itemData.g._collapsable) {
- stops = itemData.cst;
- } else {
- stops = itemData.ost;
- }
- len = stops.length;
- for (i = 0; i < len; i += 1) {
- stop = stops[i];
- if(!itemData.g._collapsable) {
- stop.setAttribute('offset', oValues[i * 2] + '%');
- }
- stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
- }
- }
- if (styleData.t === 1) {
- if (itemData.e._mdf || isFirstFrame) {
- gfill.setAttribute('x2', pt2[0]);
- gfill.setAttribute('y2', pt2[1]);
- if (hasOpacity && !itemData.g._collapsable) {
- itemData.of.setAttribute('x2', pt2[0]);
- itemData.of.setAttribute('y2', pt2[1]);
- }
- }
- } else {
- var rad;
- if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
- rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
- gfill.setAttribute('r', rad);
- if(hasOpacity && !itemData.g._collapsable){
- itemData.of.setAttribute('r', rad);
- }
- }
- if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
- if (!rad) {
- rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
- }
- var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+ if (itemData.o._mdf || isFirstFrame) {
+ var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+ itemData.style.pElem.setAttribute(attr, itemData.o.v);
+ }
+ if (itemData.s._mdf || isFirstFrame) {
+ var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+ var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+ gfill.setAttribute(attr1, pt1[0]);
+ gfill.setAttribute(attr2, pt1[1]);
+ if (hasOpacity && !itemData.g._collapsable) {
+ itemData.of.setAttribute(attr1, pt1[0]);
+ itemData.of.setAttribute(attr2, pt1[1]);
+ }
+ }
+ var stops, i, len, stop;
+ if (itemData.g._cmdf || isFirstFrame) {
+ stops = itemData.cst;
+ var cValues = itemData.g.c;
+ len = stops.length;
+ for (i = 0; i < len; i += 1){
+ stop = stops[i];
+ stop.setAttribute('offset', cValues[i * 4] + '%');
+ stop.setAttribute('stop-color','rgb('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ')');
+ }
+ }
+ if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+ var oValues = itemData.g.o;
+ if(itemData.g._collapsable) {
+ stops = itemData.cst;
+ } else {
+ stops = itemData.ost;
+ }
+ len = stops.length;
+ for (i = 0; i < len; i += 1) {
+ stop = stops[i];
+ if(!itemData.g._collapsable) {
+ stop.setAttribute('offset', oValues[i * 2] + '%');
+ }
+ stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+ }
+ }
+ if (styleData.t === 1) {
+ if (itemData.e._mdf || isFirstFrame) {
+ gfill.setAttribute('x2', pt2[0]);
+ gfill.setAttribute('y2', pt2[1]);
+ if (hasOpacity && !itemData.g._collapsable) {
+ itemData.of.setAttribute('x2', pt2[0]);
+ itemData.of.setAttribute('y2', pt2[1]);
+ }
+ }
+ } else {
+ var rad;
+ if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+ rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+ gfill.setAttribute('r', rad);
+ if(hasOpacity && !itemData.g._collapsable){
+ itemData.of.setAttribute('r', rad);
+ }
+ }
+ if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+ if (!rad) {
+ rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+ }
+ var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
- var percent = itemData.h.v >= 1 ? 0.99 : itemData.h.v <= -1 ? -0.99: itemData.h.v;
- var dist = rad * percent;
- var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
- var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
- gfill.setAttribute('fx', x);
- gfill.setAttribute('fy', y);
- if (hasOpacity && !itemData.g._collapsable) {
- itemData.of.setAttribute('fx', x);
- itemData.of.setAttribute('fy', y);
- }
- }
- //gfill.setAttribute('fy','200');
- }
- };
+ var percent = itemData.h.v >= 1 ? 0.99 : itemData.h.v <= -1 ? -0.99: itemData.h.v;
+ var dist = rad * percent;
+ var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+ var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+ gfill.setAttribute('fx', x);
+ gfill.setAttribute('fy', y);
+ if (hasOpacity && !itemData.g._collapsable) {
+ itemData.of.setAttribute('fx', x);
+ itemData.of.setAttribute('fy', y);
+ }
+ }
+ //gfill.setAttribute('fy','200');
+ }
+ };
- function renderStroke(styleData, itemData, isFirstFrame) {
- var styleElem = itemData.style;
- var d = itemData.d;
- if (d && (d._mdf || isFirstFrame) && d.dashStr) {
- styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
- styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
- }
- if(itemData.c && (itemData.c._mdf || isFirstFrame)){
- styleElem.pElem.setAttribute('stroke','rgb(' + bm_floor(itemData.c.v[0]) + ',' + bm_floor(itemData.c.v[1]) + ',' + bm_floor(itemData.c.v[2]) + ')');
- }
- if(itemData.o._mdf || isFirstFrame){
- styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
- }
- if(itemData.w._mdf || isFirstFrame){
- styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
- if(styleElem.msElem){
- styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
- }
- }
- };
+ function renderStroke(styleData, itemData, isFirstFrame) {
+ var styleElem = itemData.style;
+ var d = itemData.d;
+ if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+ styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+ styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+ }
+ if(itemData.c && (itemData.c._mdf || isFirstFrame)){
+ styleElem.pElem.setAttribute('stroke','rgb(' + bm_floor(itemData.c.v[0]) + ',' + bm_floor(itemData.c.v[1]) + ',' + bm_floor(itemData.c.v[2]) + ')');
+ }
+ if(itemData.o._mdf || isFirstFrame){
+ styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+ }
+ if(itemData.w._mdf || isFirstFrame){
+ styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+ if(styleElem.msElem){
+ styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+ }
+ }
+ };
- return ob;
+ return ob;
}())
\ No newline at end of file
diff --git a/player/js/elements/helpers/shapes/SVGShapeData.js b/player/js/elements/helpers/shapes/SVGShapeData.js
index 61abf26..e647bb3 100644
--- a/player/js/elements/helpers/shapes/SVGShapeData.js
+++ b/player/js/elements/helpers/shapes/SVGShapeData.js
@@ -12,11 +12,11 @@
// TODO: commenting this for now since all shapes are animated
var i = 0, len = transformers.length;
while(i < len) {
- if(transformers[i].mProps.dynamicProperties.length) {
- this._isAnimated = true;
- break;
- }
- i += 1;
+ if(transformers[i].mProps.dynamicProperties.length) {
+ this._isAnimated = true;
+ break;
+ }
+ i += 1;
}
}
diff --git a/player/js/elements/helpers/shapes/ShapeTransformManager.js b/player/js/elements/helpers/shapes/ShapeTransformManager.js
index f024144..4f8cae6 100644
--- a/player/js/elements/helpers/shapes/ShapeTransformManager.js
+++ b/player/js/elements/helpers/shapes/ShapeTransformManager.js
@@ -1,56 +1,56 @@
function ShapeTransformManager() {
- this.sequences = {};
- this.sequenceList = [];
+ this.sequences = {};
+ this.sequenceList = [];
this.transform_key_count = 0;
}
ShapeTransformManager.prototype = {
- addTransformSequence: function(transforms) {
- var i, len = transforms.length;
- var key = '_';
- for(i = 0; i < len; i += 1) {
- key += transforms[i].transform.key + '_';
- }
- var sequence = this.sequences[key];
- if(!sequence) {
- sequence = {
- transforms: [].concat(transforms),
- finalTransform: new Matrix(),
- _mdf: false
- };
- this.sequences[key] = sequence;
- this.sequenceList.push(sequence);
- }
- return sequence;
- },
- processSequence: function(sequence, isFirstFrame) {
- var i = 0, len = sequence.transforms.length, _mdf = isFirstFrame;
- while (i < len && !isFirstFrame) {
- if (sequence.transforms[i].transform.mProps._mdf) {
- _mdf = true;
- break;
- }
- i += 1
- }
- if (_mdf) {
- var props;
- sequence.finalTransform.reset();
- for (i = len - 1; i >= 0; i -= 1) {
- props = sequence.transforms[i].transform.mProps.v.props;
- sequence.finalTransform.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
- }
- }
- sequence._mdf = _mdf;
-
- },
- processSequences: function(isFirstFrame) {
- var i, len = this.sequenceList.length;
- for (i = 0; i < len; i += 1) {
- this.processSequence(this.sequenceList[i], isFirstFrame);
- }
+ addTransformSequence: function(transforms) {
+ var i, len = transforms.length;
+ var key = '_';
+ for(i = 0; i < len; i += 1) {
+ key += transforms[i].transform.key + '_';
+ }
+ var sequence = this.sequences[key];
+ if(!sequence) {
+ sequence = {
+ transforms: [].concat(transforms),
+ finalTransform: new Matrix(),
+ _mdf: false
+ };
+ this.sequences[key] = sequence;
+ this.sequenceList.push(sequence);
+ }
+ return sequence;
+ },
+ processSequence: function(sequence, isFirstFrame) {
+ var i = 0, len = sequence.transforms.length, _mdf = isFirstFrame;
+ while (i < len && !isFirstFrame) {
+ if (sequence.transforms[i].transform.mProps._mdf) {
+ _mdf = true;
+ break;
+ }
+ i += 1
+ }
+ if (_mdf) {
+ var props;
+ sequence.finalTransform.reset();
+ for (i = len - 1; i >= 0; i -= 1) {
+ props = sequence.transforms[i].transform.mProps.v.props;
+ sequence.finalTransform.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
+ }
+ }
+ sequence._mdf = _mdf;
+
+ },
+ processSequences: function(isFirstFrame) {
+ var i, len = this.sequenceList.length;
+ for (i = 0; i < len; i += 1) {
+ this.processSequence(this.sequenceList[i], isFirstFrame);
+ }
- },
- getNewKey: function() {
- return '_' + this.transform_key_count++;
- }
+ },
+ getNewKey: function() {
+ return '_' + this.transform_key_count++;
+ }
}
\ No newline at end of file
diff --git a/player/js/elements/svgElements/effects/SVGMatte3Effect.js b/player/js/elements/svgElements/effects/SVGMatte3Effect.js
index 48427fb..47e0a19 100644
--- a/player/js/elements/svgElements/effects/SVGMatte3Effect.js
+++ b/player/js/elements/svgElements/effects/SVGMatte3Effect.js
@@ -76,16 +76,16 @@
var elements = this.elem.comp.elements;
var i = 0, len = elements.length;
while (i < len) {
- if (elements[i] && elements[i].data.ind === ind) {
- this.setElementAsMask(this.elem, elements[i]);
- }
- i += 1;
+ if (elements[i] && elements[i].data.ind === ind) {
+ this.setElementAsMask(this.elem, elements[i]);
+ }
+ i += 1;
}
this.initialized = true;
};
SVGMatte3Effect.prototype.renderFrame = function() {
- if(!this.initialized) {
- this.initialize();
- }
+ if(!this.initialized) {
+ this.initialize();
+ }
};
\ No newline at end of file
diff --git a/player/js/utils/BaseEvent.js b/player/js/utils/BaseEvent.js
index e9cf078..a3a00d9 100644
--- a/player/js/utils/BaseEvent.js
+++ b/player/js/utils/BaseEvent.js
@@ -1,39 +1,39 @@
function BaseEvent(){}
BaseEvent.prototype = {
- triggerEvent: function (eventName, args) {
- if (this._cbs[eventName]) {
- var len = this._cbs[eventName].length;
- for (var i = 0; i < len; i++){
- this._cbs[eventName][i](args);
- }
- }
- },
- addEventListener: function (eventName, callback) {
- if (!this._cbs[eventName]){
- this._cbs[eventName] = [];
- }
- this._cbs[eventName].push(callback);
+ triggerEvent: function (eventName, args) {
+ if (this._cbs[eventName]) {
+ var len = this._cbs[eventName].length;
+ for (var i = 0; i < len; i++){
+ this._cbs[eventName][i](args);
+ }
+ }
+ },
+ addEventListener: function (eventName, callback) {
+ if (!this._cbs[eventName]){
+ this._cbs[eventName] = [];
+ }
+ this._cbs[eventName].push(callback);
- return function() {
- this.removeEventListener(eventName, callback);
- }.bind(this);
- },
- removeEventListener: function (eventName,callback){
- if (!callback){
- this._cbs[eventName] = null;
- }else if(this._cbs[eventName]){
- var i = 0, len = this._cbs[eventName].length;
- while(i<len){
- if(this._cbs[eventName][i] === callback){
- this._cbs[eventName].splice(i,1);
- i -=1;
- len -= 1;
- }
- i += 1;
- }
- if(!this._cbs[eventName].length){
- this._cbs[eventName] = null;
- }
- }
- }
+ return function() {
+ this.removeEventListener(eventName, callback);
+ }.bind(this);
+ },
+ removeEventListener: function (eventName,callback){
+ if (!callback){
+ this._cbs[eventName] = null;
+ }else if(this._cbs[eventName]){
+ var i = 0, len = this._cbs[eventName].length;
+ while(i<len){
+ if(this._cbs[eventName][i] === callback){
+ this._cbs[eventName].splice(i,1);
+ i -=1;
+ len -= 1;
+ }
+ i += 1;
+ }
+ if(!this._cbs[eventName].length){
+ this._cbs[eventName] = null;
+ }
+ }
+ }
};
\ No newline at end of file
diff --git a/player/js/utils/asset_loader.js b/player/js/utils/asset_loader.js
index 8d4ae20..3c9c634 100644
--- a/player/js/utils/asset_loader.js
+++ b/player/js/utils/asset_loader.js
@@ -1,44 +1,44 @@
var assetLoader = (function(){
- function formatResponse(xhr) {
- if(xhr.response && typeof xhr.response === 'object') {
- return xhr.response;
- } else if(xhr.response && typeof xhr.response === 'string') {
- return JSON.parse(xhr.response);
- } else if(xhr.responseText) {
- return JSON.parse(xhr.responseText);
- }
- }
+ function formatResponse(xhr) {
+ if(xhr.response && typeof xhr.response === 'object') {
+ return xhr.response;
+ } else if(xhr.response && typeof xhr.response === 'string') {
+ return JSON.parse(xhr.response);
+ } else if(xhr.responseText) {
+ return JSON.parse(xhr.responseText);
+ }
+ }
- function loadAsset(path, callback, errorCallback) {
- var response;
- var xhr = new XMLHttpRequest();
- xhr.open('GET', path, true);
- // set responseType after calling open or IE will break.
- try {
- // This crashes on Android WebView prior to KitKat
- xhr.responseType = "json";
- } catch (err) {}
- xhr.send();
- xhr.onreadystatechange = function () {
- if (xhr.readyState == 4) {
- if(xhr.status == 200){
- response = formatResponse(xhr);
- callback(response);
- }else{
- try{
- response = formatResponse(xhr);
- callback(response);
- }catch(err){
- if(errorCallback) {
- errorCallback(err);
- }
- }
- }
- }
- };
- }
- return {
- load: loadAsset
- }
+ function loadAsset(path, callback, errorCallback) {
+ var response;
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', path, true);
+ // set responseType after calling open or IE will break.
+ try {
+ // This crashes on Android WebView prior to KitKat
+ xhr.responseType = "json";
+ } catch (err) {}
+ xhr.send();
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState == 4) {
+ if(xhr.status == 200){
+ response = formatResponse(xhr);
+ callback(response);
+ }else{
+ try{
+ response = formatResponse(xhr);
+ callback(response);
+ }catch(err){
+ if(errorCallback) {
+ errorCallback(err);
+ }
+ }
+ }
+ }
+ };
+ }
+ return {
+ load: loadAsset
+ }
}())
diff --git a/player/js/utils/expressions/ExpressionValue.js b/player/js/utils/expressions/ExpressionValue.js
index 60ccda9..87feedd 100644
--- a/player/js/utils/expressions/ExpressionValue.js
+++ b/player/js/utils/expressions/ExpressionValue.js
@@ -2,26 +2,26 @@
mult = mult || 1;
var expressionValue, arrayValue;
- if (elementProp.k) {
+ if (elementProp.k) {
elementProp.getValue();
}
var i, len, arrValue, val;
if (type) {
- if(type === 'color') {
- len = 4;
+ if(type === 'color') {
+ len = 4;
expressionValue = createTypedArray('float32', len);
arrValue = createTypedArray('float32', len);
- for (i = 0; i < len; i += 1) {
- expressionValue[i] = arrValue[i] = (i < 3) ? elementProp.v[i] * mult : 1;
- }
- expressionValue.value = arrValue;
- }
+ for (i = 0; i < len; i += 1) {
+ expressionValue[i] = arrValue[i] = (i < 3) ? elementProp.v[i] * mult : 1;
+ }
+ expressionValue.value = arrValue;
+ }
} else if (elementProp.propType === 'unidimensional'){
val = elementProp.v * mult;
expressionValue = new Number(val);
expressionValue.value = val;
} else {
- len = elementProp.pv.length;
+ len = elementProp.pv.length;
expressionValue = createTypedArray('float32', len);
arrValue = createTypedArray('float32', len);
for (i = 0; i < len; i += 1) {
diff --git a/player/js/utils/expressions/Expressions.js b/player/js/utils/expressions/Expressions.js
index 24a6012..3ce0fcc 100644
--- a/player/js/utils/expressions/Expressions.js
+++ b/player/js/utils/expressions/Expressions.js
@@ -5,33 +5,33 @@
function initExpressions(animation){
- var stackCount = 0;
- var registers = [];
+ var stackCount = 0;
+ var registers = [];
- function pushExpression() {
- stackCount += 1;
- }
+ function pushExpression() {
+ stackCount += 1;
+ }
- function popExpression() {
- stackCount -= 1;
- if (stackCount === 0) {
- releaseInstances();
- }
- }
+ function popExpression() {
+ stackCount -= 1;
+ if (stackCount === 0) {
+ releaseInstances();
+ }
+ }
- function registerExpressionProperty(expression) {
- if (registers.indexOf(expression) === -1) {
- registers.push(expression)
- }
- }
+ function registerExpressionProperty(expression) {
+ if (registers.indexOf(expression) === -1) {
+ registers.push(expression)
+ }
+ }
- function releaseInstances() {
- var i, len = registers.length;
- for (i = 0; i < len; i += 1) {
- registers[i].release();
- }
- registers.length = 0;
- }
+ function releaseInstances() {
+ var i, len = registers.length;
+ for (i = 0; i < len; i += 1) {
+ registers[i].release();
+ }
+ registers.length = 0;
+ }
animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
diff --git a/player/js/utils/expressions/MaskInterface.js b/player/js/utils/expressions/MaskInterface.js
index 477c021..30ed25d 100644
--- a/player/js/utils/expressions/MaskInterface.js
+++ b/player/js/utils/expressions/MaskInterface.js
@@ -1,10 +1,10 @@
var MaskManagerInterface = (function(){
- function MaskInterface(mask, data){
- this._mask = mask;
- this._data = data;
- }
- Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+ function MaskInterface(mask, data){
+ this._mask = mask;
+ this._data = data;
+ }
+ Object.defineProperty(MaskInterface.prototype, 'maskPath', {
get: function(){
if(this._mask.prop.k){
this._mask.prop.getValue();
@@ -12,7 +12,7 @@
return this._mask.prop;
}
});
- Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+ Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
get: function(){
if(this._mask.op.k){
this._mask.op.getValue();
@@ -21,25 +21,25 @@
}
});
- var MaskManager = function(maskManager, elem){
- var _maskManager = maskManager;
- var _elem = elem;
- var _masksInterfaces = createSizedArray(maskManager.viewData.length);
- var i, len = maskManager.viewData.length;
- for(i = 0; i < len; i += 1) {
- _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
- }
+ var MaskManager = function(maskManager, elem){
+ var _maskManager = maskManager;
+ var _elem = elem;
+ var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+ var i, len = maskManager.viewData.length;
+ for(i = 0; i < len; i += 1) {
+ _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+ }
- var maskFunction = function(name){
- i = 0;
- while(i<len){
- if(maskManager.masksProperties[i].nm === name){
- return _masksInterfaces[i];
- }
- i += 1;
- }
- };
- return maskFunction;
- };
- return MaskManager;
+ var maskFunction = function(name){
+ i = 0;
+ while(i<len){
+ if(maskManager.masksProperties[i].nm === name){
+ return _masksInterfaces[i];
+ }
+ i += 1;
+ }
+ };
+ return maskFunction;
+ };
+ return MaskManager;
}());
diff --git a/player/js/utils/expressions/PropertyGroupFactory.js b/player/js/utils/expressions/PropertyGroupFactory.js
index 643b56f..3eae845 100644
--- a/player/js/utils/expressions/PropertyGroupFactory.js
+++ b/player/js/utils/expressions/PropertyGroupFactory.js
@@ -1,12 +1,12 @@
var propertyGroupFactory = (function() {
- return function(interfaceFunction, parentPropertyGroup) {
- return function(val) {
- val = val === undefined ? 1 : val
- if(val <= 0){
- return interfaceFunction;
- } else{
- return parentPropertyGroup(val-1);
- }
- }
- }
+ return function(interfaceFunction, parentPropertyGroup) {
+ return function(val) {
+ val = val === undefined ? 1 : val
+ if(val <= 0){
+ return interfaceFunction;
+ } else{
+ return parentPropertyGroup(val-1);
+ }
+ }
+ }
}())
\ No newline at end of file
diff --git a/player/js/utils/expressions/PropertyInterface.js b/player/js/utils/expressions/PropertyInterface.js
index 4946161..54eba82 100644
--- a/player/js/utils/expressions/PropertyInterface.js
+++ b/player/js/utils/expressions/PropertyInterface.js
@@ -1,19 +1,19 @@
var PropertyInterface = (function() {
- return function(propertyName, propertyGroup) {
+ return function(propertyName, propertyGroup) {
- var interfaceFunction = {
- _name: propertyName
- }
+ var interfaceFunction = {
+ _name: propertyName
+ }
- function _propertyGroup(val){
- val = val === undefined ? 1 : val
- if(val <= 0){
- return interfaceFunction;
- } else {
- return propertyGroup(--val);
- }
- }
+ function _propertyGroup(val){
+ val = val === undefined ? 1 : val
+ if(val <= 0){
+ return interfaceFunction;
+ } else {
+ return propertyGroup(--val);
+ }
+ }
- return _propertyGroup;
- }
+ return _propertyGroup;
+ }
}())
\ No newline at end of file
diff --git a/player/js/utils/expressions/TextSelectorPropertyDecorator.js b/player/js/utils/expressions/TextSelectorPropertyDecorator.js
index 194b57b..9b6d89b 100644
--- a/player/js/utils/expressions/TextSelectorPropertyDecorator.js
+++ b/player/js/utils/expressions/TextSelectorPropertyDecorator.js
@@ -32,12 +32,12 @@
};
}());
- var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
- TextSelectorProp.getTextSelectorProp = function(elem, data,arr){
- if(data.t === 1){
- return new TextExpressionSelectorProp(elem, data,arr);
- } else {
- return propertyGetTextProp(elem,data,arr);
- }
- };
+ var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
+ TextSelectorProp.getTextSelectorProp = function(elem, data,arr){
+ if(data.t === 1){
+ return new TextExpressionSelectorProp(elem, data,arr);
+ } else {
+ return propertyGetTextProp(elem,data,arr);
+ }
+ };
}());
\ No newline at end of file
diff --git a/player/js/utils/expressions/shapes/ShapePathInterface.js b/player/js/utils/expressions/shapes/ShapePathInterface.js
index b99c91d..004ef11 100644
--- a/player/js/utils/expressions/shapes/ShapePathInterface.js
+++ b/player/js/utils/expressions/shapes/ShapePathInterface.js
@@ -1,42 +1,42 @@
var ShapePathInterface = (
- function() {
+ function() {
- return function pathInterfaceFactory(shape,view,propertyGroup){
- var prop = view.sh;
+ 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;
- }
- }
+ function interfaceFunction(val){
+ if(val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2){
+ return interfaceFunction.path;
+ }
+ }
- 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;
- }
- }()
+ 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;
+ }
+ }()
)
\ No newline at end of file
diff --git a/player/js/utils/featureSupport.js b/player/js/utils/featureSupport.js
index e2bbcf9..1383260 100644
--- a/player/js/utils/featureSupport.js
+++ b/player/js/utils/featureSupport.js
@@ -1,9 +1,9 @@
var featureSupport = (function(){
- var ob = {
- maskType: true
- };
- if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) {
- ob.maskType = false;
- }
- return ob;
+ var ob = {
+ maskType: true
+ };
+ if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) {
+ ob.maskType = false;
+ }
+ return ob;
}());
\ No newline at end of file
diff --git a/player/js/utils/filters.js b/player/js/utils/filters.js
index 12c8097..dfff6ef 100644
--- a/player/js/utils/filters.js
+++ b/player/js/utils/filters.js
@@ -1,26 +1,26 @@
var filtersFactory = (function(){
- var ob = {};
- ob.createFilter = createFilter;
- ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+ var ob = {};
+ ob.createFilter = createFilter;
+ ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
- function createFilter(filId){
- var fil = createNS('filter');
- fil.setAttribute('id',filId);
+ function createFilter(filId){
+ var fil = createNS('filter');
+ fil.setAttribute('id',filId);
fil.setAttribute('filterUnits','objectBoundingBox');
fil.setAttribute('x','0%');
fil.setAttribute('y','0%');
fil.setAttribute('width','100%');
fil.setAttribute('height','100%');
return fil;
- }
+ }
- function createAlphaToLuminanceFilter(){
+ function createAlphaToLuminanceFilter(){
var feColorMatrix = createNS('feColorMatrix');
feColorMatrix.setAttribute('type','matrix');
feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
feColorMatrix.setAttribute('values','0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');
return feColorMatrix;
- }
+ }
- return ob;
+ return ob;
}());
\ No newline at end of file
diff --git a/player/js/utils/helpers/dynamicProperties.js b/player/js/utils/helpers/dynamicProperties.js
index 1c41c52..9fc9449 100644
--- a/player/js/utils/helpers/dynamicProperties.js
+++ b/player/js/utils/helpers/dynamicProperties.js
@@ -1,26 +1,26 @@
function DynamicPropertyContainer(){};
DynamicPropertyContainer.prototype = {
- addDynamicProperty: function(prop) {
- if(this.dynamicProperties.indexOf(prop) === -1) {
- this.dynamicProperties.push(prop);
- this.container.addDynamicProperty(this);
- this._isAnimated = true;
- }
- },
- iterateDynamicProperties: function(){
- this._mdf = false;
- var i, len = this.dynamicProperties.length;
- for(i=0;i<len;i+=1){
- this.dynamicProperties[i].getValue();
- if(this.dynamicProperties[i]._mdf) {
- this._mdf = true;
- }
- }
- },
- initDynamicPropertyContainer: function(container){
- this.container = container;
- this.dynamicProperties = [];
- this._mdf = false;
- this._isAnimated = false;
- }
+ addDynamicProperty: function(prop) {
+ if(this.dynamicProperties.indexOf(prop) === -1) {
+ this.dynamicProperties.push(prop);
+ this.container.addDynamicProperty(this);
+ this._isAnimated = true;
+ }
+ },
+ iterateDynamicProperties: function(){
+ this._mdf = false;
+ var i, len = this.dynamicProperties.length;
+ for(i=0;i<len;i+=1){
+ this.dynamicProperties[i].getValue();
+ if(this.dynamicProperties[i]._mdf) {
+ this._mdf = true;
+ }
+ }
+ },
+ initDynamicPropertyContainer: function(container){
+ this.container = container;
+ this.dynamicProperties = [];
+ this._mdf = false;
+ this._isAnimated = false;
+ }
}
\ No newline at end of file
diff --git a/player/js/utils/shapes/ShapePath.js b/player/js/utils/shapes/ShapePath.js
index ae63e69..f23bae0 100644
--- a/player/js/utils/shapes/ShapePath.js
+++ b/player/js/utils/shapes/ShapePath.js
@@ -1,75 +1,75 @@
function ShapePath(){
- this.c = false;
- this._length = 0;
- this._maxLength = 8;
- this.v = createSizedArray(this._maxLength);
- this.o = createSizedArray(this._maxLength);
- this.i = createSizedArray(this._maxLength);
+ this.c = false;
+ this._length = 0;
+ this._maxLength = 8;
+ this.v = createSizedArray(this._maxLength);
+ this.o = createSizedArray(this._maxLength);
+ this.i = createSizedArray(this._maxLength);
}
ShapePath.prototype.setPathData = function(closed, len) {
- this.c = closed;
- this.setLength(len);
- var i = 0;
- while(i < len){
- this.v[i] = point_pool.newElement();
- this.o[i] = point_pool.newElement();
- this.i[i] = point_pool.newElement();
- i += 1;
- }
+ this.c = closed;
+ this.setLength(len);
+ var i = 0;
+ while(i < len){
+ this.v[i] = point_pool.newElement();
+ this.o[i] = point_pool.newElement();
+ this.i[i] = point_pool.newElement();
+ i += 1;
+ }
};
ShapePath.prototype.setLength = function(len) {
- while(this._maxLength < len) {
- this.doubleArrayLength();
- }
- this._length = len;
+ while(this._maxLength < len) {
+ this.doubleArrayLength();
+ }
+ this._length = len;
};
ShapePath.prototype.doubleArrayLength = function() {
- this.v = this.v.concat(createSizedArray(this._maxLength));
- this.i = this.i.concat(createSizedArray(this._maxLength));
- this.o = this.o.concat(createSizedArray(this._maxLength));
- this._maxLength *= 2;
+ this.v = this.v.concat(createSizedArray(this._maxLength));
+ this.i = this.i.concat(createSizedArray(this._maxLength));
+ this.o = this.o.concat(createSizedArray(this._maxLength));
+ this._maxLength *= 2;
};
ShapePath.prototype.setXYAt = function(x, y, type, pos, replace) {
- var arr;
- this._length = Math.max(this._length, pos + 1);
- if(this._length >= this._maxLength) {
- this.doubleArrayLength();
- }
- switch(type){
- case 'v':
- arr = this.v;
- break;
- case 'i':
- arr = this.i;
- break;
- case 'o':
- arr = this.o;
- break;
- }
- if(!arr[pos] || (arr[pos] && !replace)){
- arr[pos] = point_pool.newElement();
- }
- arr[pos][0] = x;
- arr[pos][1] = y;
+ var arr;
+ this._length = Math.max(this._length, pos + 1);
+ if(this._length >= this._maxLength) {
+ this.doubleArrayLength();
+ }
+ switch(type){
+ case 'v':
+ arr = this.v;
+ break;
+ case 'i':
+ arr = this.i;
+ break;
+ case 'o':
+ arr = this.o;
+ break;
+ }
+ if(!arr[pos] || (arr[pos] && !replace)){
+ arr[pos] = point_pool.newElement();
+ }
+ arr[pos][0] = x;
+ arr[pos][1] = y;
};
ShapePath.prototype.setTripleAt = function(vX,vY,oX,oY,iX,iY,pos, replace) {
- this.setXYAt(vX,vY,'v',pos, replace);
- this.setXYAt(oX,oY,'o',pos, replace);
- this.setXYAt(iX,iY,'i',pos, replace);
+ this.setXYAt(vX,vY,'v',pos, replace);
+ this.setXYAt(oX,oY,'o',pos, replace);
+ this.setXYAt(iX,iY,'i',pos, replace);
};
ShapePath.prototype.reverse = function() {
- var newPath = new ShapePath();
- newPath.setPathData(this.c, this._length);
- var vertices = this.v, outPoints = this.o, inPoints = this.i;
- var init = 0;
- if (this.c) {
- newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+ var newPath = new ShapePath();
+ newPath.setPathData(this.c, this._length);
+ var vertices = this.v, outPoints = this.o, inPoints = this.i;
+ var init = 0;
+ if (this.c) {
+ newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
init = 1;
}
var cnt = this._length - 1;
@@ -77,7 +77,7 @@
var i;
for (i = init; i < len; i += 1) {
- newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+ newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
cnt -= 1;
}
return newPath;
diff --git a/player/js/utils/text/LetterProps.js b/player/js/utils/text/LetterProps.js
index a579360..17ce090 100644
--- a/player/js/utils/text/LetterProps.js
+++ b/player/js/utils/text/LetterProps.js
@@ -6,53 +6,53 @@
this.m = m;
this.p = p;
this._mdf = {
- o: true,
- sw: !!sw,
- sc: !!sc,
- fc: !!fc,
- m: true,
- p: true
+ o: true,
+ sw: !!sw,
+ sc: !!sc,
+ fc: !!fc,
+ m: true,
+ p: true
};
}
LetterProps.prototype.update = function(o, sw, sc, fc, m, p) {
- this._mdf.o = false;
- this._mdf.sw = false;
- this._mdf.sc = false;
- this._mdf.fc = false;
- this._mdf.m = false;
- this._mdf.p = false;
- var updated = false;
+ this._mdf.o = false;
+ this._mdf.sw = false;
+ this._mdf.sc = false;
+ this._mdf.fc = false;
+ this._mdf.m = false;
+ this._mdf.p = false;
+ var updated = false;
- if(this.o !== o) {
- this.o = o;
- this._mdf.o = true;
- updated = true;
- }
- if(this.sw !== sw) {
- this.sw = sw;
- this._mdf.sw = true;
- updated = true;
- }
- if(this.sc !== sc) {
- this.sc = sc;
- this._mdf.sc = true;
- updated = true;
- }
- if(this.fc !== fc) {
- this.fc = fc;
- this._mdf.fc = true;
- updated = true;
- }
- if(this.m !== m) {
- this.m = m;
- this._mdf.m = true;
- updated = true;
- }
- if(p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {
- this.p = p;
- this._mdf.p = true;
- updated = true;
- }
- return updated;
+ if(this.o !== o) {
+ this.o = o;
+ this._mdf.o = true;
+ updated = true;
+ }
+ if(this.sw !== sw) {
+ this.sw = sw;
+ this._mdf.sw = true;
+ updated = true;
+ }
+ if(this.sc !== sc) {
+ this.sc = sc;
+ this._mdf.sc = true;
+ updated = true;
+ }
+ if(this.fc !== fc) {
+ this.fc = fc;
+ this._mdf.fc = true;
+ updated = true;
+ }
+ if(this.m !== m) {
+ this.m = m;
+ this._mdf.m = true;
+ updated = true;
+ }
+ if(p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {
+ this.p = p;
+ this._mdf.p = true;
+ updated = true;
+ }
+ return updated;
};
\ No newline at end of file