feat: процедурный рендер конвейеров — стыковка, повороты, поток#16
Merged
Conversation
belts.ts переписан со спрайтового belt.png на Pixi Graphics: - neighbor-aware форма тайла (beltShape): прямая / поворот по соседям; граф-логику не трогает, чисто визуал. - дорожка кодом: полоса с двухтоновым бевелом-рельсами и заклёпками, повороты — кольцевой сектор (дуга TILE/2), поперечные насечки-сегменты. - поток: циановые шевроны на единой глобальной фазе (шаг SPACING|TILE) — непрерывны через стыки и повороты, движение вперёд (enter→exit), плавный fade у краёв вместо жёсткого появления/исчезновения. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the belt rendering in the web/ PixiJS game layer by replacing the previous sprite-based belt tile with procedural Graphics rendering, enabling neighbor-aware straight/corner shapes and a globally-phased animated flow overlay.
Changes:
- Replaced sprite/animated-sprite belt rendering with procedural
Graphicstrack rendering (straight + corner). - Added neighbor-aware belt shape detection (
beltShape) and a unified path parametrization (makePath) for placing track details and flow markers. - Implemented a single shared-ticker animated “flow” using chevrons with edge fade-in/out.
Comments suppressed due to low confidence (1)
web/src/game/belts.ts:218
- flowDist хранит фазу в пикселях (используется вместе с SPACING и сравнивается с TILE), но комментарий говорит про «тайл-единицы». Это может запутать при дальнейшем изменении SPACING/FLOW_PX_PER_SEC.
let flowDist = 0; // глобальная фаза потока в тайл-единицах пути
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+23
| const SPACING = TILE / 4; // шаг шевронов; делит TILE нацело → непрерывность через стыки | ||
| const POOL = TILE / SPACING + 1; // слотов шевронов на тайл (лишние прячутся на краях) | ||
| const FLOW_PX_PER_SEC = 34; // скорость потока (в тайл-единицах пути) | ||
| const FADE = SPACING * 0.9; // длина плавного появления/исчезновения у краёв тайла |
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.
Что
web/src/game/belts.tsпереписан со спрайтовогоbelt.png(один прямой тайл, повёрнутый наdir*90— не стыковался на поворотах) на процедурный рендер через Pixi Graphics.beltShape): для каждого тайла по соседям определяется прямая/поворот. Чистая функция, граф-логику (buildGraph) не трогает — только визуал.SPACING, делит TILE нацело) — непрерывны через стыки и повороты; движение вперёд (enter→exit); плавный fade у краёв вместо жёсткого появления/исчезновения (убирает рывок на каждой итерации).Итерации по фидбеку: направление потока, детализация бортиков, смена жёлтого на циан, устранение пролага.
Проверка
pnpm typecheck✓,pnpm build✓belts.tsапстрим не трогали, конфликтов нет🤖 Generated with Claude Code