You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2>Tuning the atlas parameters<aclass="headerlink" href="#tuning-the-atlas-parameters" title="Permalink to this headline">¶</a></h2>
77
214
<p>Texture MAPS can be used in different objects of your game like sprites, tile sprites, sprite-sheets, etc.. Often you should adjust the parameters of the packer to get a texture applicable to the different functions.</p>
78
-
<p>To change these parameters click the “settings icon” in the editor toolbar. It opens the Settings dialog:</p>
215
+
<p>To change these parameters click the “settings icon” in the editor toolbar. It opens the Settings dialog:</p>
<td>Prepend the parent folders name to the frames name. Many times developers group the source images in different folders with a special meaning, for example, the images are grouped in an <codeclass="docutils literal"><spanclass="pre">Attacking</span></code> and <codeclass="docutils literal"><spanclass="pre">Idle</span></code> folders, so, by enabling this parameter, the names of the folders are prepended to the name of the frames: <codeclass="docutils literal"><spanclass="pre">Attacking_001</span></code> .. <codeclass="docutils literal"><spanclass="pre">Attacking_010</span></code>, <codeclass="docutils literal"><spanclass="pre">Idle_001</span></code> .. <codeclass="docutils literal"><spanclass="pre">Idle_010</span></code>.</td>
252
+
</tr>
113
253
</tbody>
114
254
</table>
115
255
</div>
116
256
<divclass="section" id="multiple-pages">
117
257
<h2>Multiple pages<aclass="headerlink" href="#multiple-pages" title="Permalink to this headline">¶</a></h2>
118
-
<p>As we mentioned before, it is possible that one texture has no enough space for all the sprites, then many “pages” or textures are generated to place the remaining sprites.</p>
258
+
<p>As we mentioned before, it is possible that one texture has no enough space for all the sprites, then many “pages” or textures are generated to place the remaining sprites.</p>
119
259
<p>When this happens the editor creates multiple tabs to show all the textures and generates the Phaser atlas files with a number suffix. For example, if the packer generates two textures we get the files <cite>myatlas1.json</cite>, <cite>myatlas1.png</cite>, <cite>myatlas2.json</cite> and <cite>myatlas2.png</cite>:</p>
120
260
<imgalt="The source images can be packed in more than one texture maps." src="_images/AtlasMultiPage.png" />
121
261
</div>
122
262
<divclass="section" id="the-side-panel">
123
263
<h2>The side panel<aclass="headerlink" href="#the-side-panel" title="Permalink to this headline">¶</a></h2>
124
-
<p>Close to the settings icon, there is the “side panel” icon. By default the side panel is hidden but you can show it selecting that icon.</p>
264
+
<p>Close to the settings icon, there is the “side panel” icon. By default the side panel is hidden but you can show it selecting that icon.</p>
125
265
<p>This panel shows the name of the sprites and a small window with the sprites and pages information.</p>
126
266
<p>When you click on a sprite in the right panel (canvas), that sprite is selected in the side panel, and when you select a sprite in the side panel, it is highlighted in the texture canvas.</p>
127
-
<p>You can delete some sprites by selecting it and pressing the <cite>DEL</cite> key or clicking on the delete icon that is placed in the editor’s toolbar. Remember each time you change the atlas you should save it to generate the Phaser files.</p>
267
+
<p>You can delete some sprites by selecting it and pressing the <cite>DEL</cite> key or clicking on the delete icon that is placed in the editor’s toolbar. Remember each time you change the atlas you should save it to generate the Phaser files.</p>
<h2>Update the atlas with external changes<aclass="headerlink" href="#update-the-atlas-with-external-changes" title="Permalink to this headline">¶</a></h2>
132
-
<p>In the editor’s toolbar, you can see a “gear” icon, click it to re-build the atlas. When you change the source image files then you should rebuild the atlas to regenerate the texture, do this by pressing that “gear” icon.</p>
272
+
<p>In the editor’s toolbar, you can see a “gear” icon, click it to re-build the atlas. When you change the source image files then you should rebuild the atlas to regenerate the texture, do this by pressing that “gear” icon.</p>
133
273
<p>When you rebuild the atlas, the editor shows a dialog to confirm that you want to save it, if you accept, then the atlas is saved and the Phaser atlas files are generated.</p>
134
274
</div>
135
275
</div>
@@ -141,6 +281,16 @@ <h2>Update the atlas with external changes<a class="headerlink" href="#update-th
0 commit comments