@hyprune/schema 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,338 @@
1
+ {
2
+ "formatVersion": "0.10",
3
+ "id": "conveyor",
4
+ "version": "1.0.0",
5
+ "name": "Conveyor",
6
+ "category": "machines",
7
+ "tags": [
8
+ "ci",
9
+ "pipeline"
10
+ ],
11
+ "scene": "object.glb",
12
+ "license": "CC-BY-4.0",
13
+ "attribution": [
14
+ {
15
+ "path": ".",
16
+ "author": "Example Author",
17
+ "license": "CC-BY-4.0"
18
+ }
19
+ ],
20
+ "bounds": {
21
+ "min": [
22
+ -2.2,
23
+ 0,
24
+ -0.8
25
+ ],
26
+ "max": [
27
+ 2.2,
28
+ 1.9,
29
+ 0.8
30
+ ]
31
+ },
32
+ "traits": {
33
+ "decorative": {
34
+ "animations": [
35
+ {
36
+ "node": "belt-rollers",
37
+ "type": "spin",
38
+ "axis": [
39
+ 1,
40
+ 0,
41
+ 0
42
+ ],
43
+ "pivot": [
44
+ 0,
45
+ 0.6,
46
+ 0
47
+ ],
48
+ "period": 1.2
49
+ }
50
+ ]
51
+ },
52
+ "collidable": {
53
+ "node": "proxy"
54
+ },
55
+ "movable": {
56
+ "surfaces": [
57
+ "floor"
58
+ ]
59
+ },
60
+ "machine": {
61
+ "primary": "status",
62
+ "inputs": [
63
+ {
64
+ "id": "status",
65
+ "type": "enum",
66
+ "values": [
67
+ "idle",
68
+ "running",
69
+ "ok",
70
+ "fail"
71
+ ],
72
+ "default": "idle",
73
+ "label": "Pipeline status",
74
+ "explain": "Lamp colour and belt motion: the belt runs while the pipeline runs."
75
+ },
76
+ {
77
+ "id": "jobStarted",
78
+ "type": "event",
79
+ "label": "Job started",
80
+ "explain": "Each started job drops a crate onto the belt."
81
+ },
82
+ {
83
+ "id": "queued",
84
+ "type": "int",
85
+ "min": 0,
86
+ "max": 64,
87
+ "default": 0,
88
+ "label": "Queued jobs",
89
+ "explain": "Crates waiting beside the entry, one per queued job."
90
+ },
91
+ {
92
+ "id": "lastJob",
93
+ "type": "text",
94
+ "maxLength": 24,
95
+ "label": "Last job",
96
+ "explain": "The most recent job's name."
97
+ }
98
+ ],
99
+ "drives": [
100
+ {
101
+ "input": "status",
102
+ "target": "state:lamp"
103
+ },
104
+ {
105
+ "input": "status",
106
+ "target": "animation:belt-rollers",
107
+ "map": {
108
+ "cases": [
109
+ {
110
+ "equals": "running",
111
+ "to": 1
112
+ }
113
+ ],
114
+ "else": 0
115
+ }
116
+ },
117
+ {
118
+ "input": "queued",
119
+ "target": "count:waiting"
120
+ },
121
+ {
122
+ "input": "lastJob",
123
+ "target": "label:sign"
124
+ },
125
+ {
126
+ "input": "jobStarted",
127
+ "target": "spawn:belt-in"
128
+ },
129
+ {
130
+ "input": "status",
131
+ "target": "effect:confetti",
132
+ "map": {
133
+ "becomes": "ok",
134
+ "from": "running"
135
+ }
136
+ }
137
+ ],
138
+ "recipes": [
139
+ {
140
+ "name": "Pipeline summary JSON",
141
+ "fields": {
142
+ "status": "/pipelines/0/status",
143
+ "jobStarted": "/pipelines/0/jobs_started",
144
+ "queued": {
145
+ "countWhere": {
146
+ "array": "/jobs",
147
+ "pointer": "/status",
148
+ "equals": "queued"
149
+ }
150
+ },
151
+ "lastJob": "/pipelines/0/last_job/name"
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ "slots": {
158
+ "states": [
159
+ {
160
+ "id": "lamp",
161
+ "materials": [
162
+ "lamp-glass"
163
+ ],
164
+ "palette": [
165
+ {
166
+ "id": "idle",
167
+ "colour": [
168
+ 0.35,
169
+ 0.45,
170
+ 0.6
171
+ ],
172
+ "emission": 0.5
173
+ },
174
+ {
175
+ "id": "running",
176
+ "colour": [
177
+ 1.0,
178
+ 0.7,
179
+ 0.2
180
+ ],
181
+ "emission": 2
182
+ },
183
+ {
184
+ "id": "ok",
185
+ "colour": [
186
+ 0.3,
187
+ 1.0,
188
+ 0.45
189
+ ],
190
+ "emission": 2
191
+ },
192
+ {
193
+ "id": "fail",
194
+ "colour": [
195
+ 1.0,
196
+ 0.2,
197
+ 0.15
198
+ ],
199
+ "emission": 3
200
+ },
201
+ {
202
+ "id": "stale",
203
+ "colour": [
204
+ 0.4,
205
+ 0.4,
206
+ 0.4
207
+ ],
208
+ "emission": 0.2
209
+ }
210
+ ]
211
+ }
212
+ ],
213
+ "labels": [
214
+ {
215
+ "id": "sign",
216
+ "pose": {
217
+ "position": [
218
+ 0,
219
+ 1.75,
220
+ 0.81
221
+ ],
222
+ "rotation": [
223
+ 0,
224
+ 0,
225
+ 0,
226
+ 1
227
+ ]
228
+ },
229
+ "size": [
230
+ 1.2,
231
+ 0.3
232
+ ],
233
+ "maxChars": 24,
234
+ "font": "mono"
235
+ }
236
+ ],
237
+ "tracks": [
238
+ {
239
+ "id": "belt",
240
+ "speed": 0.6,
241
+ "points": [
242
+ {
243
+ "position": [
244
+ -2,
245
+ 0.8,
246
+ 0
247
+ ],
248
+ "type": "line"
249
+ },
250
+ {
251
+ "position": [
252
+ 2,
253
+ 0.8,
254
+ 0
255
+ ],
256
+ "type": "line"
257
+ }
258
+ ],
259
+ "items": {
260
+ "assets": [
261
+ "job-crate"
262
+ ],
263
+ "max": 24,
264
+ "spacing": 0.45
265
+ },
266
+ "sink": true
267
+ }
268
+ ],
269
+ "spawns": [
270
+ {
271
+ "id": "belt-in",
272
+ "pose": {
273
+ "position": [
274
+ -2,
275
+ 0.8,
276
+ 0
277
+ ],
278
+ "rotation": [
279
+ 0,
280
+ 0.707,
281
+ 0,
282
+ 0.707
283
+ ]
284
+ },
285
+ "track": "belt",
286
+ "items": [
287
+ "job-crate"
288
+ ],
289
+ "maxRate": 2
290
+ }
291
+ ],
292
+ "stacks": [
293
+ {
294
+ "id": "waiting",
295
+ "node": "crate",
296
+ "cap": 64,
297
+ "layout": {
298
+ "grid": [
299
+ 4,
300
+ 4,
301
+ 4
302
+ ],
303
+ "spacing": [
304
+ 0.35,
305
+ 0.35,
306
+ 0.35
307
+ ],
308
+ "fill": "xzy"
309
+ }
310
+ }
311
+ ],
312
+ "effects": [
313
+ {
314
+ "id": "confetti",
315
+ "pose": {
316
+ "position": [
317
+ 0,
318
+ 2.0,
319
+ 0
320
+ ],
321
+ "rotation": [
322
+ 0,
323
+ 0,
324
+ 0,
325
+ 1
326
+ ]
327
+ },
328
+ "kind": "burst",
329
+ "colour": [
330
+ 1.0,
331
+ 0.8,
332
+ 0.2
333
+ ],
334
+ "durationMs": 1500
335
+ }
336
+ ]
337
+ }
338
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "formatVersion": "0.9",
3
+ "id": "bench",
4
+ "version": "1.0.0",
5
+ "name": "Bench",
6
+ "category": "furniture",
7
+ "scene": "object.glb",
8
+ "license": "CC0-1.0",
9
+ "attribution": [
10
+ {
11
+ "path": ".",
12
+ "author": "Example Author",
13
+ "license": "CC0-1.0"
14
+ }
15
+ ],
16
+ "bounds": {
17
+ "min": [
18
+ -0.8,
19
+ 0,
20
+ -0.25
21
+ ],
22
+ "max": [
23
+ 0.8,
24
+ 0.85,
25
+ 0.25
26
+ ]
27
+ },
28
+ "traits": {
29
+ "collidable": {
30
+ "node": "proxy"
31
+ },
32
+ "movable": {},
33
+ "seat": {
34
+ "capacity": 2,
35
+ "anchors": [
36
+ {
37
+ "id": "left",
38
+ "position": [
39
+ -0.4,
40
+ 0,
41
+ 0.55
42
+ ],
43
+ "yaw": 0,
44
+ "height": 0.45
45
+ },
46
+ {
47
+ "id": "right",
48
+ "position": [
49
+ 0.4,
50
+ 0,
51
+ 0.55
52
+ ],
53
+ "yaw": 0,
54
+ "height": 0.45
55
+ }
56
+ ]
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "formatVersion": "0.9",
3
+ "id": "street-lantern",
4
+ "version": "1.0.0",
5
+ "name": "Street lantern",
6
+ "description": "A post lantern with a softly bobbing flame and a bench seat at its foot.",
7
+ "category": "lighting",
8
+ "tags": [
9
+ "lamp",
10
+ "street"
11
+ ],
12
+ "scene": "object.glb",
13
+ "license": "CC-BY-4.0",
14
+ "attribution": [
15
+ {
16
+ "path": ".",
17
+ "author": "Example Author",
18
+ "license": "CC-BY-4.0",
19
+ "source": "https://example.com/street-lantern"
20
+ }
21
+ ],
22
+ "bounds": {
23
+ "min": [
24
+ -0.25,
25
+ 0,
26
+ -0.25
27
+ ],
28
+ "max": [
29
+ 0.25,
30
+ 2.4,
31
+ 0.25
32
+ ]
33
+ },
34
+ "thumbnail": "thumbnail.png",
35
+ "lighting": {
36
+ "mode": "probe"
37
+ },
38
+ "traits": {
39
+ "decorative": {
40
+ "animations": [
41
+ {
42
+ "node": "flame",
43
+ "type": "bob",
44
+ "axis": [
45
+ 0,
46
+ 1,
47
+ 0
48
+ ],
49
+ "amplitude": 0.01,
50
+ "period": 3
51
+ }
52
+ ]
53
+ },
54
+ "collidable": {
55
+ "node": "proxy"
56
+ },
57
+ "movable": {
58
+ "surfaces": [
59
+ "floor"
60
+ ],
61
+ "upright": true,
62
+ "scale": [
63
+ 0.75,
64
+ 1.5
65
+ ]
66
+ }
67
+ },
68
+ "slots": {
69
+ "states": [
70
+ {
71
+ "id": "status",
72
+ "materials": [
73
+ "lamp-glass"
74
+ ],
75
+ "palette": [
76
+ {
77
+ "id": "idle",
78
+ "colour": [
79
+ 0.3,
80
+ 0.5,
81
+ 1.0
82
+ ],
83
+ "emission": 1
84
+ },
85
+ {
86
+ "id": "busy",
87
+ "colour": [
88
+ 1.0,
89
+ 0.7,
90
+ 0.2
91
+ ],
92
+ "emission": 2
93
+ },
94
+ {
95
+ "id": "fault",
96
+ "colour": [
97
+ 1.0,
98
+ 0.2,
99
+ 0.2
100
+ ],
101
+ "emission": 3
102
+ }
103
+ ]
104
+ }
105
+ ],
106
+ "labels": [
107
+ {
108
+ "id": "title",
109
+ "pose": {
110
+ "position": [
111
+ 0,
112
+ 1.9,
113
+ 0.26
114
+ ],
115
+ "rotation": [
116
+ 0,
117
+ 0,
118
+ 0,
119
+ 1
120
+ ]
121
+ },
122
+ "size": [
123
+ 0.6,
124
+ 0.15
125
+ ],
126
+ "maxChars": 24
127
+ }
128
+ ],
129
+ "effects": [
130
+ {
131
+ "id": "vent",
132
+ "pose": {
133
+ "position": [
134
+ 0,
135
+ 2.3,
136
+ 0
137
+ ],
138
+ "rotation": [
139
+ 0,
140
+ 0,
141
+ 0,
142
+ 1
143
+ ]
144
+ }
145
+ }
146
+ ]
147
+ }
148
+ }