Skip to content

feat: растянуть и приподнять спрайт ракеты (silo)#20

Merged
AntonDot merged 1 commit into
mainfrom
feat/silo-sprite-fill
Jul 24, 2026
Merged

feat: растянуть и приподнять спрайт ракеты (silo)#20
AntonDot merged 1 commit into
mainfrom
feat/silo-sprite-fill

Conversation

@AntonDot

Copy link
Copy Markdown
Member

Что

Спрайт ракеты (silo) заполняет 3×3 без пустот:

  • SILO_VISUAL_SCALE = 1.3 — растягивание вокруг центрального пивота, арт заполняет клетку (у PNG были прозрачные поля по краям).
  • SILO_Y_OFFSET = 18 — подъём спрайта вверх в мировых px (корректно при любом повороте): арт сидел низко → щель сверху, вылезал снизу.
  • То же масштабирование/смещение применено к ghost-превью (input.ts).
  • rocketLaunch спрайт не трогает (только дым) — анимация запуска не задета.

Оба значения — тюнингуемые константы в machines.ts.

Проверка

  • pnpm typecheck ✓, pnpm build

🤖 Generated with Claude Code

Silo уже 3×3, но арт в кадре с прозрачными полями (пустоты). Добавлены:
- SILO_VISUAL_SCALE=1.3 — масштаб вокруг центрального пивота, арт заполняет клетку;
- SILO_Y_OFFSET=18 — подъём спрайта вверх (мировые px, корректно при любом
  повороте): арт сидел низко — щель сверху, вылезал снизу.
То же применено к ghost-превью в input.ts. rocketLaunch спрайт не трогает.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 18:21
@AntonDot
AntonDot merged commit 14c12ca into main Jul 24, 2026
1 check passed
@AntonDot
AntonDot deleted the feat/silo-sprite-fill branch July 24, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tweaks the visual presentation of the silo machine so the rocket sprite better fills its 3×3 footprint by applying a tuned uniform scale and a consistent upward Y offset (in world px), and mirrors the same adjustments in the placement ghost preview.

Changes:

  • Added tunable SILO_VISUAL_SCALE and SILO_Y_OFFSET constants.
  • Applied the offset + scale to placed silo sprites during machine updates.
  • Applied the same offset + scale to the silo ghost preview in input handling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
web/src/game/machines.ts Introduces silo visual tuning constants and applies them during machine sprite positioning/scaling.
web/src/game/input.ts Applies the same silo offset/scale to the ghost preview and imports the new constants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/src/game/input.ts
Comment on lines 284 to 287
ghostSprite.scale.set(
tool === 'manipulator' ? MANIPULATOR_VISUAL_SCALE : 1,
tool === 'manipulator' ? -MANIPULATOR_VISUAL_SCALE : 1
tool === 'manipulator' ? MANIPULATOR_VISUAL_SCALE : tool === 'silo' ? SILO_VISUAL_SCALE : 1,
tool === 'manipulator' ? -MANIPULATOR_VISUAL_SCALE : tool === 'silo' ? SILO_VISUAL_SCALE : 1
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants