-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrotate.js
44 lines (44 loc) · 888 Bytes
/
rotate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module.exports = {
name: "rotate",
ns: "canvas",
async: true,
title: "Rotate",
description: "Rotate Context",
phrases: {
active: "Rotating"
},
ports: {
input: {
context: {
title: "Context",
type: "CanvasRenderingContext2D",
required: true
},
angle: {
title: "Angle",
async: true,
type: "number",
required: true,
fn: function __ANGLE__(data, source, state, input, $, output) {
var r = function() {
$.context.rotate($.angle);
output({
context: $.get('context')
});
}.call(this);
return {
state: state,
return: r
};
}
}
},
output: {
context: {
title: "Context",
type: "CanvasRenderingContext2D"
}
}
},
state: {}
}