Move tweens now just use quadout instead of inout.
Made shaders a class to make it easier to add more in future. Added shaders for updown and downup fades. Fix loading characters with no pattern (e.g. black_mask) not working. Gave ability to cancel lerps in case a character gets put on then immediately faded to another alpha.
This commit is contained in:
parent
338d42d2a1
commit
6134339bc6
4 changed files with 332 additions and 157 deletions
|
@ -102,6 +102,10 @@ class commonFunctions {
|
|||
return change * Math.pow(2, -10 * t) * Math.sin((t * 1 - num2) * rad / num);
|
||||
}
|
||||
//http://www.gizma.com/easing/
|
||||
case "quadout": {
|
||||
let change = end - start;
|
||||
return -change * t*(t-2) + start;
|
||||
}
|
||||
case "quadinout": {
|
||||
let change = end - start;
|
||||
t = t * 2;
|
||||
|
@ -138,12 +142,11 @@ class commonFunctions {
|
|||
}
|
||||
}
|
||||
|
||||
static hexToRgb (hex) {
|
||||
hex = hex.toString(16);
|
||||
static hexToRgb(hex) {
|
||||
let r = (hex >> 16) & 255;
|
||||
let g = (hex >> 8) & 255;
|
||||
let b = hex & 255;
|
||||
return [r, g, b];
|
||||
return [r/255, g/255, b/255];
|
||||
}
|
||||
|
||||
static convertUtageTextTags(text) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue