claude-ai-office 0.34.1 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/js/scene/actors.js +19 -5
package/package.json
CHANGED
|
@@ -96,7 +96,9 @@ function drawPerson(ctx, a, now, character) {
|
|
|
96
96
|
const base = project(cx, cy);
|
|
97
97
|
ctx.save();
|
|
98
98
|
ctx.globalAlpha = a.dim ? 0.45 : 1;
|
|
99
|
-
|
|
99
|
+
// 선택한 세션의 캐릭터: 회색 그림자 대신 발밑에 파란 빛 (캐릭터보다 먼저 그려 몸을 가리지 않는다). 아니면 보통 그림자
|
|
100
|
+
if (a.selected) selectionGlow(ctx, base, now);
|
|
101
|
+
else shadow(ctx, cx, cy, 0.28, 0.14, 0.2);
|
|
100
102
|
// 걷기·숨쉬기는 스프라이트 동작에 들어 있다. 고민 중일 때만 살짝 흔들린다
|
|
101
103
|
const bob = a.activity === 'think' && !a.walking ? Math.sin(now / 420) * 0.8 : 0;
|
|
102
104
|
const sitting = a.activity === 'rest' && !a.ambient && !a.walking;
|
|
@@ -112,10 +114,22 @@ function drawPerson(ctx, a, now, character) {
|
|
|
112
114
|
ctx.fillStyle = '#fff'; ctx.font = `bold 11px ${FONT}`; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
|
|
113
115
|
ctx.fillText('!', fx, ty + 0.5);
|
|
114
116
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
ctx.restore();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** 선택 표시: 발밑에 납작하게 깔리는 파란 빛. 천천히 숨쉬듯 커졌다 작아진다 */
|
|
121
|
+
function selectionGlow(ctx, p, now) {
|
|
122
|
+
const pulse = 1 + Math.sin(now / 650) * 0.06;
|
|
123
|
+
ctx.save();
|
|
124
|
+
ctx.translate(p.x, p.y + 1);
|
|
125
|
+
ctx.scale(1, 0.5);
|
|
126
|
+
const r = 34 * pulse;
|
|
127
|
+
const g = ctx.createRadialGradient(0, 0, 0, 0, 0, r);
|
|
128
|
+
g.addColorStop(0, 'rgba(70, 140, 235, 0.65)');
|
|
129
|
+
g.addColorStop(0.6, 'rgba(70, 140, 235, 0.4)');
|
|
130
|
+
g.addColorStop(1, 'rgba(70, 140, 235, 0)');
|
|
131
|
+
ctx.fillStyle = g;
|
|
132
|
+
ctx.beginPath(); ctx.arc(0, 0, r, 0, Math.PI * 2); ctx.fill();
|
|
119
133
|
ctx.restore();
|
|
120
134
|
}
|
|
121
135
|
|