Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Encoding tiles symmetry and rotation

Aperta
#14 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
game-dev

Direzione di ricerca

Inizia leggendo l’implementazione di base e tracciando il punto in cui vengono ruotati i dati del motivo della tessera. Codifica i quattro orientamenti S, L, F e R e verifica che la rotazione di un pezzo aggiorni ogni orientamento in modo coerente senza aggiungere riflessioni. Il lavoro è completato quando le combinazioni dei bordi descritte rimangono correttamente allineate dopo ogni rotazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The base implementation notes that you can "Augment pattern data with rotations and reflections."
I don't think you need reflections for the circuit problem but you might run into it with more complex setup.

Let's assume you don't need reflections.
For rotations you need to have 4 letters that indicate the orientation of the piece.

For this issue let's call them :

  • S -> straight
  • L -> rotated 90° to the left
  • F -> "flipped" but really it's rotated 180°
  • R -> rotated 90° to the right

So this tile :
4

would have edges 4S, 2, 4S, 0

And this one :
5

would have : 4S, 1, 1, 4R

Now the complicated bit is that you have to account for that whenever you are rotating a piece.
For a Left (90°) rotation :

  • every S becomes L
  • every L becomes F
  • every F becomes R
  • every R becomes S

This also fixes the problem of having 5.png left edge connecting to a 4S the wrong way because it will never be a 4S AND a top facing edge at the same time.

Lingua principale
JavaScript
Stelle
219
Fork
64
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodingTrain/Wave-Function-Collapse

Tutte le issue di CodingTrain/Wave-Function-Collapse

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.