hm
This commit is contained in:
parent
7455d630fc
commit
4d3fc2cd47
84 changed files with 3429 additions and 3480 deletions
|
|
@ -534,6 +534,23 @@
|
|||
ctx.restore();
|
||||
}
|
||||
}
|
||||
if (this.burning || (this.burnTimer || 0) > 0.02) {
|
||||
ctx.save();
|
||||
const phase = t * 8.0 + this.age * 0.37 + this.seed;
|
||||
const fireAlpha = 0.82 * nestHideAlpha;
|
||||
const drawFire = typeof drawSimpleFireShape === "function" ? drawSimpleFireShape : null;
|
||||
if (drawFire) {
|
||||
drawFire(ctx, -dw * 0.20, -dh * 0.18, Math.max(10, dw * 0.17), { phase, alpha: fireAlpha });
|
||||
drawFire(ctx, dw * 0.16, -dh * 0.04, Math.max(8, dw * 0.13), { phase: phase + 1.7, alpha: fireAlpha * 0.86, shadow: false });
|
||||
drawFire(ctx, 0, -dh * 0.34, Math.max(9, dw * 0.14), { phase: phase + 3.1, alpha: fireAlpha * 0.76, shadow: false });
|
||||
} else {
|
||||
ctx.fillStyle = "rgba(236,46,24,0.78)";
|
||||
ctx.beginPath();
|
||||
ctx.ellipse(0, -dh * 0.20, Math.max(8, dw * 0.15), Math.max(12, dh * 0.22), 0, 0, Math.PI * 2);
|
||||
ctx.fill();
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
if (faceRight) ctx.scale(-1, 1);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue