-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPapaFace.js
45 lines (34 loc) · 975 Bytes
/
PapaFace.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
// noinspection JSUnresolvedReference
autowatch=1;
include("core");
var BigState = false;
var OriginSize = [];
var Zoom = 1.5;
function mpost(v)
{
post(v + "\n");
}
function bang()
{
BigState = !BigState;
if (BigState)
{
// OriginSize = this.patcher.wind.location;
OriginSize = this.patcher.wind.size;
// var w = OriginSize[2] - ;
// var h = OriginSize[3] - OriginSize[1];
// w *= Zoom;
// h *= Zoom;
this.patcher.message("zoomfactor", Zoom);
this.patcher.wind.size = [OriginSize[0]*Zoom,OriginSize[1]*Zoom];
// this.patcher.wind.setlocation(OriginSize[0], OriginSize[1], w + OriginSize[0], h + OriginSize[1]);
}
else
{
this.patcher.message("zoomfactor", 1);
this.patcher.wind.size = OriginSize;
//this.patcher.wind.setlocation(OriginSize[0], OriginSize[1], OriginSize[2], OriginSize[3]);
}
mpost(OriginSize);
mpost(BigState)
}