Widget:MoonStack: Difference between revisions

From WyrdeWiki
No edit summary
No edit summary
Line 12: Line 12:
|-
|-
| ''id'' ||   || unique id prefix if you embed multiple widgets on one page ||   || wh
| ''id'' ||   || unique id prefix if you embed multiple widgets on one page ||   || wh
|-
| ''fps'' ||   || Desired fps for the animation ||   || 5
|}
|}
</noinclude><includeonly>
</noinclude><includeonly>
Line 112: Line 114:
var timer = null;
var timer = null;
var playing = false;
var playing = false;
var interval = 1000/<!--{$fps|default:5|escape:'html'}-->;


function stepForward(){
function stepForward(){
Line 125: Line 128:
     playing = true;
     playing = true;
     playBtn.textContent = "■";  // stop icon
     playBtn.textContent = "■";  // stop icon
     timer = setInterval(stepForward, 200);
     timer = setInterval(stepForward, interval);
   } else {
   } else {
     playing = false;
     playing = false;

Revision as of 15:33, 10 November 2025

This widget allows you to embed the lunar orbits of WyrdeHaven in your mediaWiki page

Usage

{{#widget:MoonStack | basePath=/images/moons/ | size=512 | id=ms1}}

basePath   Location of image files for the orbits   /images/moons/
size   maximum image size in pixels   512
id   unique id prefix if you embed multiple widgets on one page   wh
fps   Desired fps for the animation   5