Changed moveto animations to use quadratic easing instead of exponential.
Added shader for screen wipes (e.g. DivaLeftToRightBlackFade).
This commit is contained in:
parent
00eaff29fb
commit
6a4bb7a459
5 changed files with 116 additions and 7 deletions
17
Js/Common.js
17
Js/Common.js
|
@ -92,6 +92,14 @@ class commonFunctions {
|
|||
t = -0.45;
|
||||
}
|
||||
break;
|
||||
//http://www.gizma.com/easing/
|
||||
case "quadinout":
|
||||
var change = end - start;
|
||||
t = t * 2;
|
||||
if (t < 1) { return change/2*t*t + start; }
|
||||
t--;
|
||||
return -change/2 * (t*(t-2) - 1) + start;
|
||||
break;
|
||||
}
|
||||
return (1 - t) * start + t * end;
|
||||
//-(2*x-1)^4 +1
|
||||
|
@ -108,6 +116,15 @@ class commonFunctions {
|
|||
}
|
||||
}
|
||||
|
||||
static hexToRgb (hex) {
|
||||
hex = hex.toString(16);
|
||||
let bigint = parseInt(hex, 16);
|
||||
let r = (bigint >> 16) & 255;
|
||||
let g = (bigint >> 8) & 255;
|
||||
let b = bigint & 255;
|
||||
return [r, g, b];
|
||||
}
|
||||
|
||||
static convertUtageTextTags(text) {
|
||||
text = text.replace(/<speed.*?>|<\/speed>/g, "");
|
||||
text = text.replace(/\\n/g, "<br/>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue