arcsapp.json
5.22 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
"context": {
"libraries": [
"components/arviewer","components/animator",
"components/objloader","components/video",
"components/windowevent", "components/tokensender", "components/objecttransform",
"components/dicedetector"
],
"components": {
"viewer": { "type": "ARViewer"},
"animator": { "type": "Animator"},
"windowresize": { "type": "WindowEvent"},
"detector": {
"type" : "DiceDetector", "value": {
"canvas" : "canvas",
"debugCanvas" : "videoCanvas",
"faces": [
{
"center" : [ 0, 0, 0.03 ],
"xaxis" : [ 1, 0, 0],
"yaxis" : [ 0, 1, 0],
"width" : 0.06, "height": 0.06,
"imageId" : "lena"
},
{
"center" : [-0.03, 0, 0],
"xaxis" : [0, -1, 0],
"yaxis" : [0, 0, -1],
"width": 0.06, "height": 0.06,
"imageId" : "tux"
},
{
"center" : [0.03, 0, 0],
"xaxis" : [0, 1, 0],
"yaxis" : [0, 0, -1],
"width": 0.06, "height": 0.06,
"imageId" : "gnu"
},
{
"center" : [0, 0.03, 0],
"xaxis" : [1, 0, 0],
"yaxis" : [0, 0, 1],
"width": 0.06, "height": 0.06,
"imageId" : "earth"
},
{
"center" : [0, -0.03, 0],
"xaxis" : [1, 0, 0],
"yaxis" : [0, 0, -1],
"width": 0.06, "height": 0.06,
"imageId" : "mandrill"
},
{
"center" : [0, 0, -0.03],
"xaxis" : [-1, 0, 0],
"yaxis" : [0, 1, 0],
"width": 0.06, "height": 0.06,
"imageId" : "queen"
}
]
}
},
"objectTransform": { "type": "ObjectTransform"},
"ts" : { "type": "TokenSender", "value": ["next"] },
"sm": {
"type": "StateMachine",
"value": {
"initial": "init", "final": "end",
"transitions": {
"init": { "next": "start"},
"start": { "next": "end" }
}
}
},
"objectLoader": {"type": "OBJLoader"},
"video": {"type": "LiveSource"}
}
},
"controller" : "sm",
"sheets": {
"init" : {
"preconnections": [
{ "destination": "video", "slot": "setWidgets", "value": ["video", "videoCanvas"] },
{ "destination": "viewer", "slot": "keepAspectRatio", "value": [true] },
{ "destination": "viewer", "slot": "setWidgets", "value": ["container", "videoCanvas"]},
{ "destination": "viewer", "slot": "setFocal", "value": [ 600 ]},
{ "destination": "detector", "slot": "setFocalLength", "value" : [ 600 ]},
{ "destination": "detector", "slot": "setId", "value": [1337]},
{ "destination": "objectTransform", "slot": "setId", "value": [ 1337 ] },
{ "destination": "viewer", "slot": "setSceneId", "value": [1337] }
],
"postconnections": [
{ "destination": "objectLoader", "slot": "load", "value": ["al3.obj","al2.mtl"] }
],
"connections": [
{ "source": "objectLoader", "signal": "onLoad", "destination": "viewer", "slot": "addScene" },
{ "source": "objectLoader", "signal": "onLoad", "destination": "objectTransform", "slot" : "setObject" },
{ "source": "objectLoader", "signal": "onLoad", "destination": "ts", "slot" : "next" },
{ "source": "ts", "signal": "sendToken", "destination": "sm", "slot" : "setToken" }
],
"cleanups": [
{ "destination": "objectLoader", "slot": "resize", "value": [0.05]}
]
},
"start": {
"preconnections": [
],
"postconnections": [
{ "destination": "viewer", "slot": "viewAll", "value": []},
{ "destination": "animator", "slot": "start", "value":[]}
],
"connections": [
{ "source": "windowresize", "signal": "onResize", "destination": "viewer", "slot":"setSize"},
{ "source": "animator", "signal": "onAnimationFrame", "destination": "video", "slot": "grabFrame"},
{ "source": "animator", "signal": "onAnimationFrame", "destination": "viewer", "slot": "render"},
{ "source": "video", "signal": "onReady", "destination": "viewer", "slot": "resetCamera"},
{ "source": "video", "signal": "onImage", "destination": "detector", "slot": "detect"},
{ "source": "detector", "signal": "sendPose", "destination": "objectTransform", "slot": "setTransform"}
],
"cleanups": []
},
"end": {
"preconnections": [],
"postconnections": [],
"connections": [],
"cleanups": []
}
}
}