Update: Flame Particle Process - Forward and Reverse (dysneuk1ox.js) 58 bytes modified
parent
b488ba00d8
commit
a93ca1e58f
|
@ -12,16 +12,13 @@ if (this.initialized) {
|
|||
|
||||
if (this.forward) {
|
||||
texture.offset.x += 0.1;
|
||||
if (texture.offset.x >= 1) {
|
||||
if (texture.offset.x >= 0.9) {
|
||||
if (texture.offset.y >= 0.8) {
|
||||
texture.offset.x = 0.9;
|
||||
texture.offset.y = 0.8;
|
||||
this.forward = false;
|
||||
} else {
|
||||
texture.offset.x = 0;
|
||||
texture.offset.y = 0;
|
||||
}
|
||||
} else {
|
||||
if (texture.offset.y < 0.8) {
|
||||
texture.offset.y += 0.2;
|
||||
}
|
||||
}
|
||||
|
@ -29,16 +26,14 @@ if (this.forward) {
|
|||
|
||||
if (!this.forward) {
|
||||
texture.offset.x -= 0.1;
|
||||
if (texture.offset.x < 0) {
|
||||
if (texture.offset.y < 0) {
|
||||
texture.offset.x = 0;
|
||||
if (texture.offset.x <= 0) {
|
||||
texture.offset.x = 0;
|
||||
if (texture.offset.y < 0.2) {
|
||||
texture.offset.x = 0.1;
|
||||
texture.offset.y = 0;
|
||||
this.forward = true;
|
||||
} else {
|
||||
texture.offset.x = 0.9;
|
||||
texture.offset.y = 0.8;
|
||||
}
|
||||
} else {
|
||||
if (texture.offset.y > 0) {
|
||||
texture.offset.y -= 0.2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue