Skip to content

Releases: VictorWesterlund/monkeydo

0.4.0

26 Dec 13:09
46f3a07
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

What's Changed

  • Replace setTimeout with requestAnimationFrame by @VictorWesterlund in #3
  • Added demo script to the README

Full Changelog: 0.3.0...0.4.0

0.3.0

10 Nov 13:52
22eda97
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

Changes in 0.3.0

Code for MessageEvent and postMessage() have been replaced with an abstraction layer with Comlink

This pre-release directly implements PR #2

0.2.2

11 Oct 14:40
Compare
Choose a tag to compare
0.2.2 Pre-release
Pre-release

Changes in 0.2.2

  • "Main" worker folder has been renamed to "do"; should other workers (for example the planned feature "see") come to fruition.
  • Minor code changes

0.2.1

07 Oct 13:30
c275186
Compare
Choose a tag to compare
0.2.1 Pre-release
Pre-release

Changes in 0.2.1

This pre-release contains major changes to manifest structure and task execution.
See the related PR for more details

0.1.0

06 Oct 12:49
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

First working pre-release of Monkeydo

This pre-release contains code functional enough to load and schedule tasks from a version 0.1 Monkeydo manifest.

Sample code

import { default as Monkeydo } from "./modules/Monkeydo/Monkeydo.mjs";

const style = document.createElement("style");
style.innerText = "#animateme{position:absolute;width:20px;height:20px;background-color:red;}";
document.head.appendChild(style);

const animateme = document.createElement("div");
animateme.id = "animateme";
animateme.moveTo = (x,y) => animateme.style.setProperty("transform",`translate(${x}px,${y}px)`);
document.body.insertAdjacentElement("afterbegin",animateme);

const manifest = {
	"header": {
		"version": "0.1",
		"mode": 0
	},
	"body": [
		{
			"wait": 1,
			"do": "animateme.moveTo(10,10)"
		},
		{
			"wait": 1000,
			"do": "animateme.moveTo(50,50)"
		},
		{
			"wait": 400,
			"do": "animateme.moveTo(300,300)"
		}
	]
};

window.mkd = new Monkeydo();
window.mkd.monkeydo.debug = true;
window.mkd.load(JSON.stringify(manifest)).then(() => window.mkd.do());