Spaces:
Runtime error
Runtime error
fix: use animated guest sprites instead of static cats, fix Star-Office-UI link
Browse files- Replace static cats spritesheet (160x160 lying cats) with guest_anim
animated sprites (32x32, 8-frame idle animation) for agent characters
- Each agent gets a unique animation (1-6) based on ID hash
- Fix Star-Office-UI acknowledgment link to correct repo (ringhyacinth)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- README.md +1 -1
- frontend/electron-standalone.html +12 -13
README.md
CHANGED
|
@@ -253,7 +253,7 @@ HuggingClaw adds its own variables for persistence and deployment: `HF_TOKEN`, `
|
|
| 253 |
|
| 254 |
## Acknowledgments
|
| 255 |
|
| 256 |
-
- **[Star-Office-UI](https://github.com/
|
| 257 |
- **[openclaw-a2a-gateway](https://github.com/win4r/openclaw-a2a-gateway)** by [@win4r](https://github.com/win4r) — the A2A protocol plugin enabling inter-agent communication across OpenClaw instances
|
| 258 |
|
| 259 |
## License
|
|
|
|
| 253 |
|
| 254 |
## Acknowledgments
|
| 255 |
|
| 256 |
+
- **[Star-Office-UI](https://github.com/ringhyacinth/Star-Office-UI)** by [@ringhyacinth](https://github.com/ringhyacinth) — the pixel-art animated frontend that powers HuggingClaw Home's lobby visualization
|
| 257 |
- **[openclaw-a2a-gateway](https://github.com/win4r/openclaw-a2a-gateway)** by [@win4r](https://github.com/win4r) — the A2A protocol plugin enabling inter-agent communication across OpenClaw instances
|
| 258 |
|
| 259 |
## License
|
frontend/electron-standalone.html
CHANGED
|
@@ -4482,21 +4482,20 @@ function toggleBrokerPanel() {
|
|
| 4482 |
sprite = game.add.sprite(p.x, p.y, animKey, f).setOrigin(0.5, 1).setScale(1.1);
|
| 4483 |
if (sprite.anims && sprite.anims.play) sprite.anims.play(animKey, true);
|
| 4484 |
} else {
|
| 4485 |
-
// 非 demo 访客:使用
|
| 4486 |
-
//
|
| 4487 |
-
const KNOWN_CAT_FRAMES = { 'adam': 1, 'eve': 3 };
|
| 4488 |
const aid = String(agent.agentId || '');
|
| 4489 |
-
let
|
| 4490 |
-
|
| 4491 |
-
|
| 4492 |
-
|
| 4493 |
-
|
| 4494 |
-
|
| 4495 |
-
|
| 4496 |
-
|
| 4497 |
-
sprite
|
| 4498 |
} else {
|
| 4499 |
-
sprite = game.add.text(p.x, p.y, '
|
| 4500 |
}
|
| 4501 |
}
|
| 4502 |
sprite.setDepth(2600);
|
|
|
|
| 4482 |
sprite = game.add.sprite(p.x, p.y, animKey, f).setOrigin(0.5, 1).setScale(1.1);
|
| 4483 |
if (sprite.anims && sprite.anims.play) sprite.anims.play(animKey, true);
|
| 4484 |
} else {
|
| 4485 |
+
// 非 demo 访客:使用 guest_anim 动画精灵(32×32,8 帧 idle 动画)
|
| 4486 |
+
// 每个 agent 根据 ID hash 分配一个角色(1-6)
|
|
|
|
| 4487 |
const aid = String(agent.agentId || '');
|
| 4488 |
+
let hash = 0;
|
| 4489 |
+
for (let i = 0; i < aid.length; i++) hash = (hash * 31 + aid.charCodeAt(i)) >>> 0;
|
| 4490 |
+
const animIdx = (hash % 6) + 1;
|
| 4491 |
+
const animKey = `guest_anim_${animIdx}`;
|
| 4492 |
+
const animIdleKey = `guest_anim_${animIdx}_idle`;
|
| 4493 |
+
|
| 4494 |
+
if (game.textures.exists(animKey) && game.anims.exists(animIdleKey)) {
|
| 4495 |
+
sprite = game.add.sprite(p.x, p.y, animKey).setOrigin(0.5, 1).setScale(4.0);
|
| 4496 |
+
sprite.anims.play(animIdleKey, true);
|
| 4497 |
} else {
|
| 4498 |
+
sprite = game.add.text(p.x, p.y, '🦞', { fontFamily: 'ArkPixel, monospace', fontSize: '30px' }).setOrigin(0.5, 1);
|
| 4499 |
}
|
| 4500 |
}
|
| 4501 |
sprite.setDepth(2600);
|