feat: растянуть и приподнять спрайт ракеты (silo)#20
Merged
Conversation
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>
There was a problem hiding this comment.
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_SCALEandSILO_Y_OFFSETconstants. - Applied the offset + scale to placed
silosprites during machine updates. - Applied the same offset + scale to the
siloghost 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 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 | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что
Спрайт ракеты (silo) заполняет 3×3 без пустот:
SILO_VISUAL_SCALE = 1.3— растягивание вокруг центрального пивота, арт заполняет клетку (у PNG были прозрачные поля по краям).SILO_Y_OFFSET = 18— подъём спрайта вверх в мировых px (корректно при любом повороте): арт сидел низко → щель сверху, вылезал снизу.input.ts).rocketLaunchспрайт не трогает (только дым) — анимация запуска не задета.Оба значения — тюнингуемые константы в
machines.ts.Проверка
pnpm typecheck✓,pnpm build✓🤖 Generated with Claude Code