[{"data":1,"prerenderedAt":471},["ShallowReactive",2],{"navigation_docs":3,"-tutorials-growth-stages":148,"-tutorials-growth-stages-surround":466},[4,21,62,108],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":20},"Tutorials","i-lucide-graduation-cap","\u002Ftutorials","1.tutorials",[10,15],{"title":11,"path":12,"stem":13,"icon":14},"Your first texture","\u002Ftutorials\u002Ffirst-texture","1.tutorials\u002F1.first-texture","i-lucide-sprout",{"title":16,"path":17,"stem":18,"icon":19},"Grow a crop through its stages","\u002Ftutorials\u002Fgrowth-stages","1.tutorials\u002F2.growth-stages","i-lucide-wheat",false,{"title":22,"icon":23,"path":24,"stem":25,"children":26,"page":20},"How-to guides","i-lucide-wrench","\u002Fhow-to","2.how-to",[27,32,37,42,47,52,57],{"title":28,"path":29,"stem":30,"icon":31},"Install TextureScript","\u002Fhow-to\u002Finstall","2.how-to\u002F1.install","i-lucide-download",{"title":33,"path":34,"stem":35,"icon":36},"Compare a crop with vanilla","\u002Fhow-to\u002Fcompare-with-vanilla","2.how-to\u002F2.compare-with-vanilla","i-lucide-columns-2",{"title":38,"path":39,"stem":40,"icon":41},"Connect an agent","\u002Fhow-to\u002Fconnect-an-agent","2.how-to\u002F3.connect-an-agent","i-lucide-bot",{"title":43,"path":44,"stem":45,"icon":46},"Hand-edit a growth stage","\u002Fhow-to\u002Fhand-edit-a-stage","2.how-to\u002F4.hand-edit-a-stage","i-lucide-pencil",{"title":48,"path":49,"stem":50,"icon":51},"Turn a PNG into a grid","\u002Fhow-to\u002Fimport-a-png","2.how-to\u002F5.import-a-png","i-lucide-file-image",{"title":53,"path":54,"stem":55,"icon":56},"Prove a fix stayed in its region","\u002Fhow-to\u002Fprove-a-fix","2.how-to\u002F6.prove-a-fix","i-lucide-diff",{"title":58,"path":59,"stem":60,"icon":61},"Keep game assets out of git","\u002Fhow-to\u002Fkeep-game-assets-out","2.how-to\u002F7.keep-game-assets-out","i-lucide-shield-check",{"title":63,"icon":64,"path":65,"stem":66,"children":67,"page":20},"Reference","i-lucide-book-open","\u002Freference","3.reference",[68,73,78,83,88,93,98,103],{"title":69,"path":70,"stem":71,"icon":72},"Commands","\u002Freference\u002Fcommands","3.reference\u002F1.commands","i-lucide-terminal",{"title":74,"path":75,"stem":76,"icon":77},"Palette files","\u002Freference\u002Fpalette-files","3.reference\u002F2.palette-files","i-lucide-palette",{"title":79,"path":80,"stem":81,"icon":82},"Grid files","\u002Freference\u002Fgrid-files","3.reference\u002F3.grid-files","i-lucide-grid-3x3",{"title":84,"path":85,"stem":86,"icon":87},"Stages files","\u002Freference\u002Fstages-files","3.reference\u002F4.stages-files","i-lucide-layers",{"title":89,"path":90,"stem":91,"icon":92},"Scene files","\u002Freference\u002Fscene-files","3.reference\u002F5.scene-files","i-lucide-box",{"title":94,"path":95,"stem":96,"icon":97},"Lint rules","\u002Freference\u002Flint-rules","3.reference\u002F6.lint-rules","i-lucide-list-checks",{"title":99,"path":100,"stem":101,"icon":102},"MCP server","\u002Freference\u002Fmcp-server","3.reference\u002F7.mcp-server","i-lucide-plug",{"title":104,"path":105,"stem":106,"icon":107},"Environment","\u002Freference\u002Fenvironment","3.reference\u002F8.environment","i-lucide-settings",{"title":109,"icon":110,"path":111,"stem":112,"children":113,"page":20},"Explanation","i-lucide-lightbulb","\u002Fexplanation","4.explanation",[114,119,123,128,133,138,143],{"title":115,"path":116,"stem":117,"icon":118},"Textures as text","\u002Fexplanation\u002Ftextures-as-text","4.explanation\u002F1.textures-as-text","i-lucide-type",{"title":120,"path":121,"stem":122,"icon":77},"Colour from two anchors","\u002Fexplanation\u002Fcolour","4.explanation\u002F2.colour",{"title":124,"path":125,"stem":126,"icon":127},"Measured conventions","\u002Fexplanation\u002Fmeasured-conventions","4.explanation\u002F3.measured-conventions","i-lucide-ruler",{"title":129,"path":130,"stem":131,"icon":132},"Growth stages as maps","\u002Fexplanation\u002Fgrowth-stages","4.explanation\u002F4.growth-stages","i-lucide-chart-no-axes-column-increasing",{"title":134,"path":135,"stem":136,"icon":137},"The 3D view","\u002Fexplanation\u002Fthe-3d-view","4.explanation\u002F5.the-3d-view","i-lucide-rotate-3d",{"title":139,"path":140,"stem":141,"icon":142},"No game assets","\u002Fexplanation\u002Fno-game-assets","4.explanation\u002F6.no-game-assets","i-lucide-shield",{"title":144,"path":145,"stem":146,"icon":147},"Architecture","\u002Fexplanation\u002Farchitecture","4.explanation\u002F7.architecture","i-lucide-boxes",{"id":149,"title":16,"body":150,"description":459,"extension":460,"links":461,"meta":462,"navigation":463,"path":17,"seo":464,"stem":18,"__hash__":465},"docs\u002F1.tutorials\u002F2.growth-stages.md",{"type":151,"value":152,"toc":451},"minimark",[153,157,164,169,172,202,210,228,232,239,245,252,258,261,269,275,285,289,298,304,315,319,334,340,347,355,360,364,370,379,392,395,404,411,415,421,447],[154,155,156],"p",{},"A crop in Minecraft is not one texture but a sequence of them, one per growth stage. In this\ntutorial you work with a finished two-block corn plant, generate all eight of its stages from\none file, change how it grows and look at the result next to vanilla wheat.",[154,158,159,160,163],{},"You should have finished ",[161,162,11],"a",{"href":12}," first.",[165,166,168],"h2",{"id":167},"get-the-corn-example","Get the corn example",[154,170,171],{},"The authoring skill that ships with TextureScript contains a complete corn crop. Export it:",[173,174,179],"pre",{"className":175,"code":176,"language":177,"meta":178,"style":178},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","texturescript skill corn-skill\ncd corn-skill\u002Fexamples\u002Fcrop\nls\n","sh","",[180,181,182,190,196],"code",{"__ignoreMap":178},[183,184,187],"span",{"class":185,"line":186},"line",1,[183,188,189],{},"texturescript skill corn-skill\n",[183,191,193],{"class":185,"line":192},2,[183,194,195],{},"cd corn-skill\u002Fexamples\u002Fcrop\n",[183,197,199],{"class":185,"line":198},3,[183,200,201],{},"ls\n",[173,203,208],{"className":204,"code":206,"language":207,"meta":178},[205],"language-text","corn.palette  corn.stages  corn.toml  mature\n","text",[180,209,206],{"__ignoreMap":178},[154,211,212,215,216,219,220,223,224,227],{},[180,213,214],{},"mature\u002F"," holds the fully grown plant as two grids, ",[180,217,218],{},"lower.grid"," and ",[180,221,222],{},"upper.grid",", because corn\nis two blocks tall. Open ",[180,225,226],{},"mature\u002Flower.grid"," to see the stalk on columns 7 and 8, the leaves and\nthe ear on the right.",[165,229,231],{"id":230},"read-the-stages-file","Read the stages file",[154,233,234,235,238],{},"Open ",[180,236,237],{},"corn.stages",". It starts by naming its inputs:",[173,240,243],{"className":241,"code":242,"filename":237,"language":207,"meta":178},[205],"palette corn.palette\ngrid lower mature\u002Flower.grid\ngrid upper mature\u002Fupper.grid\nstages 8\n",[180,244,242],{"__ignoreMap":178},[154,246,247,248,251],{},"Then four ",[180,249,250],{},"shift"," lines:",[173,253,256],{"className":254,"code":255,"language":207,"meta":178},[205],"shift 0 +2\nshift 1 +2\nshift 2 +1\nshift 3 +1\n",[180,257,255],{"__ignoreMap":178},[154,259,260],{},"These draw the young stages two or one shades lighter within each material, the way young\nvanilla wheat is brighter than ripe wheat.",[154,262,263,264,268],{},"The rest is two ",[265,266,267],"strong",{},"maps",", one per half. A map is a 16×16 grid in which every opaque pixel of the\nmature plant carries the digit of the first stage it appears in. Here is the lower half:",[173,270,273],{"className":271,"code":272,"language":207,"meta":178},[205],"map lower\n.......55.......\n.......55.......\n.......44.......\n.......44..77...\n..44...44.777...\n.4444..44.666...\n44..33333.666...\n.....3333666....\n.......3366.....\n.......22.......\n.......22...33..\n.......11..233..\n.33....11.123...\n.332...00012....\n..221..00.......\n...210000.......\n",[180,274,272],{"__ignoreMap":178},[154,276,277,278,219,281,284],{},"Read it from the bottom up: at stage 0 there is only the base of the stalk. The stalk climbs a\npair of rows per stage, leaves arrive at stages 2 and 3, the ear (the ",[180,279,280],{},"6",[180,282,283],{},"7"," block on the\nright) at stages 6 and 7. The upper half's map starts at stage 5, so corn becomes two blocks tall\nat stage 5.",[165,286,288],{"id":287},"generate-the-stages","Generate the stages",[173,290,292],{"className":175,"code":291,"language":177,"meta":178,"style":178},"texturescript stages corn.stages out\n",[180,293,294],{"__ignoreMap":178},[183,295,296],{"class":185,"line":186},[183,297,291],{},[173,299,302],{"className":300,"code":301,"language":207,"meta":178},[205],"stage0 lower: pass\nstage1 lower: pass\nstage2 lower: pass\nstage3 lower: pass\nstage4 lower: pass\nstage5 lower: pass\nstage5 upper: pass\nstage6 lower: pass\nstage6 upper: pass\nstage7 lower: pass\nstage7 upper: pass\nstrip: out\u002Fstrip.png\n",[180,303,301],{"__ignoreMap":178},[154,305,306,307,310,311,314],{},"Every half of every stage was rendered and linted, and the seam between the halves was checked.\nOpen ",[180,308,309],{},"out\u002Fstrip.png"," to see all eight stages side by side. Each ",[180,312,313],{},"out\u002FstageN\u002F"," folder holds that\nstage's grids and PNGs.",[165,316,318],{"id":317},"change-how-the-corn-grows","Change how the corn grows",[154,320,321,322,324,325,327,328,330,331,333],{},"Say the ear should show one stage earlier. In the lower map, the ear's pixels are the ",[180,323,280],{},"s and\n",[180,326,283],{},"s on rows 3 to 8. Change every ",[180,329,283],{}," in those rows to ",[180,332,280],{},":",[173,335,338],{"className":336,"code":337,"language":207,"meta":178},[205],".......44..66...\n..44...44.666...\n",[180,339,337],{"__ignoreMap":178},[154,341,342,343,346],{},"Run ",[180,344,345],{},"stages"," again into the same folder:",[173,348,349],{"className":175,"code":291,"language":177,"meta":178,"style":178},[180,350,351],{"__ignoreMap":178},[183,352,353],{"class":185,"line":186},[183,354,291],{},[154,356,234,357,359],{},[180,358,309],{}," again: the tip of the ear is now there at stage 6. You changed the growth\nof the whole crop by editing digits, without drawing a single stage by hand.",[165,361,363],{"id":362},"see-it-in-3d-next-to-vanilla","See it in 3D, next to vanilla",[154,365,366,369],{},[180,367,368],{},"corn.toml"," is a scene that plants every stage in a row, a small field of mature corn and, if\nyou have Minecraft installed, vanilla wheat and a sunflower for scale.",[173,371,373],{"className":175,"code":372,"language":177,"meta":178,"style":178},"texturescript view corn.toml\n",[180,374,375],{"__ignoreMap":178},[183,376,377],{"class":185,"line":186},[183,378,372],{},[154,380,381,382,384,385,387,388,391],{},"The scene reads ",[180,383,237],{}," directly, so you do not need to run ",[180,386,345],{}," before viewing.\nChange a digit in a map and save: the view updates. Drag to orbit, scroll to zoom and press ",[180,389,390],{},"l","\nto hide the labels.",[154,393,394],{},"Without a browser, take screenshots from two angles instead:",[173,396,398],{"className":175,"code":397,"language":177,"meta":178,"style":178},"texturescript shoot corn.toml shot.png --cam 30,22,7 --cam 210,25,9\n",[180,399,400],{"__ignoreMap":178},[183,401,402],{"class":185,"line":186},[183,403,397],{},[154,405,406,407,410],{},"Without Minecraft, add ",[180,408,409],{},"--no-jar",": the vanilla blocks are then reported as missing and left out.",[165,412,414],{"id":413},"what-you-have-learned","What you have learned",[154,416,417,418,420],{},"A crop's stages come from one mature drawing plus a map of when each pixel appears. Shifts make\nyoung stages lighter, ",[180,419,345],{}," renders and lints them all, and a scene shows them on the real\nblock model. To go further:",[422,423,424,431,441],"ul",{},[425,426,427,430],"li",{},[161,428,429],{"href":44},"Hand-edit one stage"," when a pixel needs to move, not just appear.",[425,432,433,436,437,440],{},[161,434,435],{"href":85},"The stages file"," lists every directive, including ",[180,438,439],{},"recolour",".",[425,442,443,446],{},[161,444,445],{"href":130},"Why growth stages are maps"," explains the design.",[448,449,450],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":178,"searchDepth":192,"depth":192,"links":452},[453,454,455,456,457,458],{"id":167,"depth":192,"text":168},{"id":230,"depth":192,"text":231},{"id":287,"depth":192,"text":288},{"id":317,"depth":192,"text":318},{"id":362,"depth":192,"text":363},{"id":413,"depth":192,"text":414},"Take the finished corn example, generate its eight growth stages, change when the ear appears and compare it with vanilla wheat in 3D.","md",null,{},{"icon":19},{"title":16,"description":459},"2gEkor28NzOyEgKGRHA-P92fJc39bhpmMrgTNmihYLg",[467,469],{"title":11,"path":12,"stem":13,"description":468,"icon":14,"children":-1},"Draw a small plant as a character grid, render it, lint it and look at it in 3D.",{"title":28,"path":29,"stem":30,"description":470,"icon":31,"children":-1},"Install the binary or run from source, and set up screenshots and vanilla blocks.",1791722218581]