(Guide how to make one here: https://www.codeandweb.com/texturepacker/documentation#custom-exporter-template-file)
Place these files in a folder named isogenic in your custom exporter folder (Set this in TexturePackers's Preferences > Exporter Directory).
exporter.xml
- Code: Select all
<exporter version="1.0">
<name>IGE</name>
<nameAlias>IGEexporter</nameAlias>
<displayName>IGE</displayName>
<description>Isogenic Game Engine exporter for TexturePacker</description>
<version>1.0</version>
<files>
<file>
<name>datafile</name>
<displayName>MyDataFile</displayName>
<fileExtension>js</fileExtension>
<description>IGE js custom exporter for TexturePacker</description>
<template>isogenic.js</template>
<optional>false</optional>
<hasSeparateAutoSDFiles>all</hasSeparateAutoSDFiles>
<hasSeparateMultiPackFiles>true</hasSeparateMultiPackFiles>
</file>
</files>
<supportsTrimming>true</supportsTrimming>
<supportsRotation>true</supportsRotation>
<rotationDirection>cw</rotationDirection>
<supportsNPOT>true</supportsNPOT>
<supportsPivotPoint>false</supportsPivotPoint>
<textureSizeFactor>1</textureSizeFactor>
</exporter>
isogenic.js
- Code: Select all
// Created with TexturePacker (http://www.codeandweb.com/texturepacker)
// Sprite sheet: {{texture.fullName}} ({{texture.size.width}} x {{texture.size.height}})
// {{smartUpdateKey}}
self.gameTextures.{{texture.trimmedName}} = new IgeSpriteSheet('assets/{{texture.fullName}}', [
{% for sprite in allSprites %}[{{sprite.frameRect.x}}, {{sprite.frameRect.y}}, {{sprite.frameRect.width}}, {{sprite.frameRect.height}}, "{{sprite.trimmedName}}"]{% if not forloop.last %}, {% endif %}{% endfor %}
]);
This is an example of the generated JavaScript file:
- Code: Select all
self.gameTextures.sprite = new IgeSpriteSheet('assets/sprite.png', [
[1, 1, 177, 427, "sprite-01"], [1, 430, 177, 427, "sprite-02"], [1, 859, 177, 427, "sprite-03"], [1, 1288, 177, 427, "sprite-04"]
]);
Restart texture packer and then you can choose IGE from the Framework export settings.