toworld rotation fix
diff --git a/player/index.html b/player/index.html
index 97ff1de..b20be3b 100644
--- a/player/index.html
+++ b/player/index.html
@@ -10,9 +10,9 @@
overflow: hidden;
}
#bodymovin{
- background-color:#000;
- width:250px;
- height:250px;
+ background-color:#ccc;
+ width:800px;
+ height:800px;
/*width:800px;
height:500px;*/
display:block;
diff --git a/player/js/renderers/SVGRenderer.js b/player/js/renderers/SVGRenderer.js
index 5c26768..a20850e 100644
--- a/player/js/renderers/SVGRenderer.js
+++ b/player/js/renderers/SVGRenderer.js
@@ -219,8 +219,8 @@
}else{
this.renderedFrame = num;
}
- console.log('-------');
- console.log('FRAME ',num);
+ /*console.log('-------');
+ console.log('FRAME ',num);*/
this.globalData.frameNum = num;
this.globalData.frameId += 1;
var i, len = this.layers.length;
diff --git a/player/js/utils/PropertyFactory.js b/player/js/utils/PropertyFactory.js
index a6d622a..0e63f4d 100644
--- a/player/js/utils/PropertyFactory.js
+++ b/player/js/utils/PropertyFactory.js
@@ -558,7 +558,7 @@
if(this.r.k){
this.r.getValue();
}
- return this.r.v;
+ return this.r.v/degToRads;
}
function scaleGetter(){
if(this.s.k){
diff --git a/player/js/utils/common.js b/player/js/utils/common.js
index a828fc0..eb5dcb4 100644
--- a/player/js/utils/common.js
+++ b/player/js/utils/common.js
@@ -1,4 +1,4 @@
-var subframeEnabled = false;
+var subframeEnabled = true;
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
var cachedColors = {};
var bm_rounder = Math.round;
diff --git a/player/js/utils/expressions/ExpressionManager.js b/player/js/utils/expressions/ExpressionManager.js
index 8372cdc..3688f72 100644
--- a/player/js/utils/expressions/ExpressionManager.js
+++ b/player/js/utils/expressions/ExpressionManager.js
@@ -1,6 +1,21 @@
var ExpressionManager = (function(){
var ob = {};
+ function duplicatePropertyValue(value){
+ if(typeof value === 'number'){
+ return value;
+ }else if(value.i){
+ return JSON.parse(JSON.stringify(value));
+ }else{
+ var arr = Array.apply(null,{length:value.length});
+ var i, len = value.length;
+ for(i=0;i<len;i+=1){
+ arr[i]=value[i];
+ }
+ return arr;
+ }
+ }
+
function sum(a,b) {
var tOfA = typeof a;
var tOfB = typeof b;
@@ -440,7 +455,10 @@
if(this.frameExpressionId === elem.globalData.frameId){
return;
}
- this.frameExpressionId = elem.globalData.frameId;
+ if(this.lock){
+ this.v = duplicatePropertyValue(this.pv);
+ return true;
+ }
if(this.type === 'textSelector'){
textIndex = this.textIndex;
textTotal = this.textTotal;
@@ -452,10 +470,6 @@
if(!content && elem.content){
content = elem.content.bind(elem);
}
- if(this.lock){
- this.v = this.pv;
- return true;
- }
this.lock = true;
if(this.getPreValue){
this.getPreValue();
@@ -463,6 +477,7 @@
value = this.pv;
time = this.comp.renderedFrame/this.comp.globalData.frameRate;
bindedFn();
+ this.frameExpressionId = elem.globalData.frameId;
var i,len;
if(this.mult){
if(typeof this.v === 'number'){