{"id":354,"date":"2011-11-28T23:47:53","date_gmt":"2011-11-28T23:47:53","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=354"},"modified":"2011-12-19T11:58:19","modified_gmt":"2011-12-19T11:58:19","slug":"uv-tile","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=354","title":{"rendered":"UV Tile"},"content":{"rendered":"<p>First test of a spritemanager style uv modifier, this can be used to alter the section of a texture displayed or to play animations. It is a wip so it may give odd results, for example the texture needs to be a power of 2.<br \/>\n<a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megauvtile.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megauvtile.jpg\" alt=\"\" title=\"megauvtile\" width=\"260\" height=\"293\" class=\"alignright size-full wp-image-1593 fancy\" \/><\/a><\/p>\n<h3>UV Tiles Param Description<\/h3>\n<h4><strong>Frame<\/strong><\/h4>\n<p>Frame or tile to display from sprite sheet.<\/p>\n<h4><strong>Tile Width<\/strong><\/h4>\n<p>Width of the tiles on the sheet.<\/p>\n<h4><strong>Tile Height<\/strong><\/h4>\n<p>Height of the tiles on the sheet.<\/p>\n<h4><strong>Off<\/strong><\/h4>\n<p>Adjust uv positions.<\/p>\n<h4><strong>Scale<\/strong><\/h4>\n<p>Zoom uv coordinates.<\/p>\n<h4><strong>Animate<\/strong><\/h4>\n<p>Play back the sprite sheet.<\/p>\n<h4><strong>EndFrame<\/strong><\/h4>\n<p>Limit animation to first n tiles.<\/p>\n<h4><strong>Fps<\/strong><\/h4>\n<p>Desired playback speed.<\/p>\n<h4><strong>Flip X<\/strong><\/h4>\n<p>Flip uvs in the x direction.<\/p>\n<h4><strong>Flip Y<\/strong><\/h4>\n<p>Flip uvs in the y direction.<\/p>\n<h3>UVTiles Class<\/h3>\n<p>[cc lang=&#8221;c#&#8221;]public class MegaUVTiles : MegaModifier<br \/>\n{<br \/>\n\tpublic int      Frame;<br \/>\n\tpublic int      TileWidth;<br \/>\n\tpublic int      TileHeight;<br \/>\n\tpublic Vector2  off;<br \/>\n\tpublic Vector2  scale;<br \/>\n\tpublic bool     Animate;<br \/>\n\tpublic int      EndFrame;<br \/>\n\tpublic float    fps;<br \/>\n\tpublic bool     flipy;<br \/>\n\tpublic bool     flipx;<br \/>\n}[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First test of a spritemanager style uv modifier, this can be used to alter the section of a texture displayed or to play animations. It is a wip so it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/354"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354"}],"version-history":[{"count":4,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/354\/revisions"}],"predecessor-version":[{"id":1594,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/354\/revisions\/1594"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}