<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Creating an animation using a texture atlas - Simhub				            </title>
            <link>https://www.simhubdash.com/community-2/simhub/creating-an-animation-using-a-texture-atlas-2/</link>
            <description>All about SimHub!</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 15 Apr 2026 19:12:40 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Creating an animation using a texture atlas</title>
                        <link>https://www.simhubdash.com/community-2/simhub/creating-an-animation-using-a-texture-atlas-2/#post-8756</link>
                        <pubDate>Mon, 01 Apr 2024 01:03:43 +0000</pubDate>
                        <description><![CDATA[Ive had this idea to create an animation that uses a single image atlas controlled via its coordinates to translate it to the location of each frame. This would be acheived with a timer that...]]></description>
                        <content:encoded><![CDATA[<p>Ive had this idea to create an animation that uses a single image atlas controlled via its coordinates to translate it to the location of each frame. This would be acheived with a timer that begins once a specified property is triggered. The timer ticks at a set interval increasing the value of a varible from frame 1-10 looping and is then translated into the respective coordinates. Below is a (very rough) outline that works in visual studio<br /><br />The thing i need the most help with is that the "setInterval" function is not recognized within Simhub Java, so ill need an alternative way of creating this timer. Additionally the "$prop('SystemInfoPlugin.Uptime')" property that was used in a solution regarding the lack of a setInterval function is also no longer available due to an update. Im also a complete beginner in java so im stumped.<br /><br />Any help or ideas would be greatly appreciated &#x1f600; <br /><br />My garbo code<br /><br />let frame = 0;<br /><br />let rpmShiftLight = true<br /><br />//rpmshiftLight will be controlled via a game property but is set to true for testing//<br /><br />function frameCounter() {<br />frame++;<br />if (frame === 1) {<br />console.log('540');<br />}<br />else if (frame === 2) {<br />console.log('1080');<br />}<br />else if (frame === 3) {<br />console.log('1620');<br />}<br />else if (frame === 4) {<br />console.log('1260');<br />}<br />else if (frame === 5) {<br />console.log('2700');<br />}<br />else if (frame === 6) {<br />console.log('3240');<br />}<br />else if (frame === 7) {<br />console.log('3780');<br />}<br />else if (frame === 8) {<br />console.log('4320');<br />}<br />else if (frame === 9) {<br />console.log('4860');<br />}<br />else if (frame === 10) {<br />console.log('5400');<br />}<br />if (frame &gt; 9) frame = 0;<br />}<br /><br /><br />//console logged values would instead be result values//<br /><br /><br />if (rpmShiftLight) {<br />setInterval(frameCounter, 100);<br />}<br />else {<br />frame = 0;<br />}<br /><br /><br />//frame 0 would have a coord value off screen//</p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub/">Simhub</category>                        <dc:creator>iphan</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub/creating-an-animation-using-a-texture-atlas-2/#post-8756</guid>
                    </item>
							        </channel>
        </rss>
		