dashboards
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dashboards [2022/08/01 08:29] – [JavaScript for dashboard] emozolyak | dashboards [2023/06/05 08:43] (current) – [JavaScript for dashboard] emozolyak | ||
---|---|---|---|
Line 510: | Line 510: | ||
etc. | etc. | ||
+ | == Object properties control example == | ||
+ | <code javascript> | ||
+ | // Image rotation example | ||
+ | var IMAGE_ID = 2; | ||
+ | var currentAngle = 0; | ||
+ | |||
+ | function setAngle() { | ||
+ | setObjProperty(IMAGE_ID, | ||
+ | currentAngle = currentAngle + 10; | ||
+ | if (currentAngle >= 360) { | ||
+ | currentAngle = 0} | ||
+ | } | ||
+ | } | ||
+ | |||
+ | setInterval(setAngle, | ||
+ | |||
+ | </ | ||
dashboards.txt · Last modified: 2023/06/05 08:43 by emozolyak