пиксель пепер крафт майнкрафт
Pixel Papercraft
The Generator Builder will help you make your own generators that may be featured on the site.
Generators are an advanced topic and require some basic JavaScript programming skills.
See the Quick Start below to get started, then read the Generator Programming Guide for more details.
Get in touch via the Contact page for help.
Generator Developers
If you’d like to create a generator (even if it’s not in this list) then let us know.
| Pig | aaronhawksley |
| Pig (Advanced) | TepigMC |
| Pig Character | aaronhawksley |
| Sheep | Not Made |
| Sheep Character | Not Made |
| Spider | Not Made |
| Spider Character | Not Made |
| Squid | Not Made |
| Squid Character | frownieman |
| Villager | Not Made |
| Villager Character | Boe6Eod7Nty |
| Wither | Not Made |
| Wolf | Not Made |
| Wolf Character | dodecaphon |
1. Choose the Generator Images
Select all of the images that your generator will need (you can select multiple at a time).
This may include a background, folds and maybe a labels image. You might also include several textures that users can choose from.
2. Write the Generator Script
Now you can write your generator script.
Quick Start
Here’s a quick tutorial to get you started.
Step 1
Download the following files
Step 2
In the Generator Images section, select the Background.png and Folds.png files.
Step 3
Enter the following Generator Script:
Next, we need to identify the rectange on the page.
It needs to draw onto the page as a bigger rectangle with the following coordinates and size:
x = 138
y = 89
width = 64
height = 64
In JavaScript we write this as:
Notice this is made up of several parts:
Tip: If you’re using Gimp then if you select the rectangular region on the skin or the rectangular region on the template then Gimp will show you the x and y position plus the width and height.
In this example we have:
x: 138
y: 89
w: 64
h: 64
Rotating and Flipping Textures
Textures can be rotated and flipped when you use Generator.drawImage().
Example: Rotate a texture 90 degrees.
Notice that we added
Example: Flipping a texture horizontally or vertically.
You add either
Example: Flipping and rotating a texture.
You can put both flipping and rotating together
Drawing Text
Text can be added to your page using Generator.drawText().
Example: Write the text Pixel Papercraft on the page at coordinates x = 100 and y = 150;
Generator.drawText( ‘Pixel Papercraft’, 100, 150 );
Example: Different font styles.
Generator.drawText( ‘Pixel Papercraft’, 10, 20,
Example: Different sizes.
Generator.drawText( ‘Pixel Papercraft’, 10, 80,
Example: Different fonts.
Generator.drawText( ‘Pixel Papercraft’, 10, 140,
Example: Different alignments.
Generator.drawText( ‘Pixel Papercraft’, 10, 180,
Example: You can combine any of the above:
Adding Comments to your Program
Comments are lines that start with //
They are just notes to yourself and help you to remember what’s going on it parts of the program. You can put anything after the // and it will be ignored.
Adding Variables to your Program
So far your programs look something like this.
One of the challenges is that if you wanted to move the head to a new position on the page then you would need to update the target x and y coordinates for all six of those lines. That’s 12 numbers to change.
This program can be improved by using variables.
// Define the variables we need to use // This only gets written at the very top of your program var ox; // ox means ‘origin x’ var oy; // oy means ‘origin y’ // Head ox = 74; // The head starts at 74 pixels across oy = 25; // The head starts at 25 pixels down Generator.drawImage( ‘Skin’,
Now if we wanted to move the position of our head we only need to change 2 numbers instead of 12.
The complete program looks like this:
// Define variables var ox; var oy; // Background Generator.drawImage(‘Background’); // Head ox = 74; oy = 25; Generator.drawImage( ‘Skin’,
Using Multiple Pages
By default the builder gives you one blank page to work with, however some designs may require more than one page.
To specify additional pages you can use the Generator.usePage() function. You just have to choose a name for each page, which can be any name you like.
If each page doesn’t have a specific purpose, just call them Page 1, Page 2, etc.
Handling Transparent areas
If a texture has transparent parts then they will draw correctly. Unfortunately for some textures (especially Minecraft character skins) the transparent areas, such as the hat/helmet, are not actually transparent. Instead they are just a solid colour like black or white.
To handle this there is an extra option can set in your script. To make a section that’s all one colour become transparent:
// Make solid colours transparent Generator.setImageOption(‘Skin’, ‘solidColorIsTransparent’, true);
And to go back to drawing the solid colours again:
// Make solid colours non-transparent Generator.setImageOption(‘Skin’, ‘solidColorIsTransparent’, false);
Getting User Input
It’s sometimes useful to give your user some choices in your generator.
For example, some people want the fold lines, and others don’t. Your generator might have a saddle to turn on or off, or a list of weapons they can choose from.
Boolean Variables
Boolean variables are a true or false choice. They may be used to show or hide certain parts of your generator.
// Define user variables Generator.defineBooleanVariable(‘Show Folds’, true); Generator.defineBooleanVariable(‘Show Labels’, true);
These should be written at the top of your script.
This will create two variables that will show up as a check box options when you run your generator script.
The first argument is the name of the variable.
The second argument is the inital value of the variable. It must be either true or false
To make use of these variables we need some extra code:
// Get user variables var showFolds = Generator.getVariable(‘Show Folds’); var showLabels = Generator.getVariable(‘Show Labels’); // Folds if (showFolds) < Generator.drawImage('Folds'); >// Labels if (showLabels)
Here we first get the current values of the variables, and then later in the program we use them to decide if we should show the Folds and Labels images.
Range Variables
Range variables let your user choose a value between two numbers.
// Define user variables Generator.defineRangeVariable(‘Head Width’,
This should be written at the top of your script.
This will create two variables that will appear as sliders on most browsers (in older browsers it will be an input box).
The first argument is the name of the variable.
The second argument defines the range of values:
To make use of these variables we need the following code:
// Get user variables var headHeight = Generator.getVariable(‘Head Height’); var headWidth = Generator.getVariable(‘Head Width’); // Show the width and height Generator.drawText(headWidth, 10, 10); Generator.drawText(headHeight, 10, 30);
Here we first get the current values of the variables, and then later in the program just print them as text on the page but you can use those numbers for any purpose.
Select Variables
Select variables let your user choose from a list of values that you provide.
// Define user variables Generator.defineSelectVariable(‘Armor Style’, [‘Diamond’, ‘Gold’, ‘Bronze’]);
This should be written at the top of your script.
This will create a variable that will appear as select list.
The first argument is the name of the variable.
The second argument is an array of values the user can choose from. The first item in the array is the default value.
To make use of these variables we need the following code:
// Get user variables var armorStyle = Generator.getVariable(‘Armor ‘Style); // Show the selected style Generator.drawText(armorStyle, 10, 10);
Here we first get the current values of the variable, and then later in the program just print them as text on the page but you can the selected value for any purpose.
Providing Texture Choices
It’s sometimes useful to let your user choose from a set of available textures rather than finding their own.
For example, you might provide a set of armour textures or weapon textures and the user can choose which one they want to use. can choose one.
1. Select the textures you want to use
In the Generator Images section above, add and name all of the images you want to use.
Suppose you added images named Diamond Armour, Gold Armour and Bronze Armour.
2. Add the choices to your input textures
Add a choices property to you input definition which just lists all of the texture choices.
© 2020 Pixel Papercraft. Read our Privacy Policy.
Хотите создать бумажную версию чего-нибудь из игры Minecraft? Тогда думаю, что это сообщество поможет вам в этом нелёгком деле 😉
Основная тематика группы:
Публикация оригинальных авторских развёрток/схем для создания миниатюр по игре Minecraft.
О развёртках:
Здесь в первую очередь вы сможете увидеть развёртки, помогающие создать модели чего бы то ни было из Minecraft: Java edition последней версии.
Работа подписчицы
Летучая мышь
Наделала целую кучу разверток и выкроек летучек. 

#Minecraft #Bat #Bats #GlowBat #Glow_Bat #Direbats #Direbat


