Giter Club home page Giter Club logo

pixel's Introduction

Einführung neuer Bilder

1. Branch erstellen

2. Bild in Images-Ordner hinzufügen mit Dateiname: beispiel.png mit transparentem Hintergrund und keinem leeren Rand.
Das Bild muss 1:1 das Pixelart sein nur aus den vorgegebenen Farben von Reddit bestehen

3. in config.toml neuen Block hinzufügen:

[[structure]]
name = "beispiel"
file = "images/beispiel.png"
startx = 1234 #x-Koordinate
starty = 5678 #y-Koordinate
priority = 2

Dabei bezeichnet die Koordinate das oberste linke Pixel der verlinkten png in r/place und Priority bitte NICHT ändern, außer es ist mit dem Rest der Devs abgesprochen.

4. Scripte ausführen zur Vorschau des Outputs: Zwei Skripte in der angegebenen Reihenfolge aus dem Hauptordner des Repos ausführen
python .\scripts\generate_json.py
Damit sollte eine pixel.json generiert werden
python .\scripts\render_json.py
Nun wird aus der pixel.json eine output.png und eine overlay.png generiert\

WICHTIG: In der output.png gucken, dass die Bilder richtig platziert wurden und evtl. das eigenen Overlay mit der neuen overlay.png testen, ob z. B. bei einer Änderung eines alten Bildes die Koordinaten nicht versetzt zum alten Bild sind.

5. Änderungen Committen und pushen Betroffene Dateien sind:
config.toml, und images\beispiel.png
NICHT pixel.json, output.png oder overlay.png pushen, das verursacht Merge-Conflicts wenn mehrere Personen Bilder hinzufügen und wird von GitHub-Actions im main übernommen

6. Pull Request zum main stellen und von anderem Dev prüfen lassen

7. Beten, dass die Actions funktionieren und weinen, wenn sie es nicht tun

Adding new images

1. Create a branch

2. Upload image to images folder: example.png with transparent background and without any border.
The image must be in 1:1 pixel scale and only use the colours provided by reddit.

3. Add a new block to config.toml:

[[structure]]
name = "example"
file = "images/example.png"
startx = 1234 # x-coordinate
starty = 5678 # y-coordinate
priority = 2

The coordinates are of the uppermost, leftmost pixel of the linked png in r/place. Do not change the priority unless coordinated with the other devs.

4. Run scripts to preview output: Run these two scrips in this specific order

python .\scripts\generate_json.py

This will generate pixel.json

python .\scripts\render_json.py

Now pixel.json is used to generate output.png as well as overlay.png.

IMPORTANT: Check output.png to ensure the images have been placed correctly. You can also use overlay.png to check if the overlay is correct.

5. Commit and push your changes Relevant files are:

config.toml, and images\beispiel.png

DO NOT push pixel.json, output.png or overlay.png.

These files will conflict when multiple people are adding files at the same time. GitHub-Actions will automatically build the output and overlay once your pull request has been accepted.

6. Create a pull request to main and have another dev review it

7. Pray the actions work and cry if they don't

Scripts

For running the script see the README.md in scripts/

pixel's People

Contributors

2m1 avatar c-v-meyer avatar carlgo11 avatar chris-gw avatar cirnolp avatar ckafi avatar derjuulsn avatar drjohannessen avatar faephoenix avatar fgardt avatar fislix avatar flonky avatar foxx-l avatar henje avatar kronnox avatar leoverto avatar mp14o4 avatar nama17 avatar parranoh avatar reckter avatar thecataliastnt2k avatar therednet avatar tobilektri avatar uuid-2414 avatar xormias avatar xyaren avatar zod- avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.