duu
This commit is contained in:
parent
88f618cadf
commit
8f9f5b5100
108 changed files with 2139 additions and 1500 deletions
|
|
@ -1,5 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
function tarinaiSpriteReversesFacing(sprite) {
|
||||
const id = String(sprite || "");
|
||||
return id === "back" || id === "tarinai12_back" || /(^|_)12_back$/i.test(id);
|
||||
}
|
||||
|
||||
(function (global) {
|
||||
const Tarinai = global.Tarinai;
|
||||
if (!Tarinai) throw new Error("Tarinai is not available for mixin: tarinai_render.js");
|
||||
|
|
@ -279,9 +284,10 @@
|
|||
const squish = this.state === "sleep"
|
||||
? 1 + breathing * 0.018
|
||||
: 1 + Math.sin(t * (4.5 + gait * 1.6) + this.age) * (0.012 + gait * 0.018) + headbuttPulse * 0.03;
|
||||
const faceRight = this.state === "sleep"
|
||||
let faceRight = this.state === "sleep"
|
||||
? this.sleepFacing > 0
|
||||
: this.facingDir() > 0;
|
||||
if (tarinaiSpriteReversesFacing(renderSprite || sprite)) faceRight = !faceRight;
|
||||
const angle = (faceRight ? 1 : -1) * (Math.PI / 12) + motionTilt;
|
||||
const nestHideAlpha = this.nestFade ? clamp(1 - this.nestFade, 0, 1) : 1;
|
||||
if (nestHideAlpha <= 0.01) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue