@dice-o-rolla/dice-assets 0.2.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.
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +61 -0
- package/THIRD_PARTY_NOTICES.md +17 -0
- package/assets/runtime/audio/classic-coin.webm +0 -0
- package/assets/runtime/audio/classic-dice.webm +0 -0
- package/assets/runtime/audio/classic-felt.webm +0 -0
- package/assets/runtime/audio/classic-metal.webm +0 -0
- package/assets/runtime/audio/classic-wood-table.webm +0 -0
- package/assets/runtime/audio/classic-wood-tray.webm +0 -0
- package/assets/runtime/audio/resin.webm +0 -0
- package/assets/runtime/audio/wood.webm +0 -0
- package/assets/runtime/catalog.json +616 -0
- package/assets/runtime/textures/digits.ktx2 +0 -0
- package/assets/runtime/textures/speckle-base.ktx2 +0 -0
- package/assets/runtime/textures/speckle-normal.ktx2 +0 -0
- package/assets/runtime/textures/speckle-orm.ktx2 +0 -0
- package/dist/asset-registry.d.ts +31 -0
- package/dist/asset-registry.js +203 -0
- package/dist/catalog-loader.d.ts +15 -0
- package/dist/catalog-loader.js +80 -0
- package/dist/impact-sound-gate.d.ts +20 -0
- package/dist/impact-sound-gate.js +30 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/three-material-provider.d.ts +16 -0
- package/dist/three-material-provider.js +132 -0
- package/dist/types.d.ts +94 -0
- package/dist/types.js +0 -0
- package/dist/web-audio-player.d.ts +45 -0
- package/dist/web-audio-player.js +110 -0
- package/package.json +53 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"audioSprites": [
|
|
4
|
+
{
|
|
5
|
+
"id": "procedural-resin",
|
|
6
|
+
"audio": {
|
|
7
|
+
"uri": "./audio/resin.webm",
|
|
8
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
9
|
+
},
|
|
10
|
+
"channels": 1,
|
|
11
|
+
"clips": {
|
|
12
|
+
"hit1": {
|
|
13
|
+
"offsetSeconds": 0,
|
|
14
|
+
"durationSeconds": 0.18
|
|
15
|
+
},
|
|
16
|
+
"hit2": {
|
|
17
|
+
"offsetSeconds": 0.18,
|
|
18
|
+
"durationSeconds": 0.18
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "procedural-wood",
|
|
24
|
+
"audio": {
|
|
25
|
+
"uri": "./audio/wood.webm",
|
|
26
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
27
|
+
},
|
|
28
|
+
"channels": 1,
|
|
29
|
+
"clips": {
|
|
30
|
+
"hit1": {
|
|
31
|
+
"offsetSeconds": 0,
|
|
32
|
+
"durationSeconds": 0.2
|
|
33
|
+
},
|
|
34
|
+
"hit2": {
|
|
35
|
+
"offsetSeconds": 0.2,
|
|
36
|
+
"durationSeconds": 0.2
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "classic-dice",
|
|
42
|
+
"audio": {
|
|
43
|
+
"uri": "./audio/classic-dice.webm",
|
|
44
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
45
|
+
},
|
|
46
|
+
"channels": 1,
|
|
47
|
+
"clips": {
|
|
48
|
+
"hit1": {
|
|
49
|
+
"offsetSeconds": 0,
|
|
50
|
+
"durationSeconds": 0.031406
|
|
51
|
+
},
|
|
52
|
+
"hit2": {
|
|
53
|
+
"offsetSeconds": 0.031406,
|
|
54
|
+
"durationSeconds": 0.020136
|
|
55
|
+
},
|
|
56
|
+
"hit3": {
|
|
57
|
+
"offsetSeconds": 0.051542000000000004,
|
|
58
|
+
"durationSeconds": 0.024989
|
|
59
|
+
},
|
|
60
|
+
"hit4": {
|
|
61
|
+
"offsetSeconds": 0.076531,
|
|
62
|
+
"durationSeconds": 0.021247
|
|
63
|
+
},
|
|
64
|
+
"hit5": {
|
|
65
|
+
"offsetSeconds": 0.097778,
|
|
66
|
+
"durationSeconds": 0.024943
|
|
67
|
+
},
|
|
68
|
+
"hit6": {
|
|
69
|
+
"offsetSeconds": 0.122721,
|
|
70
|
+
"durationSeconds": 0.019955
|
|
71
|
+
},
|
|
72
|
+
"hit7": {
|
|
73
|
+
"offsetSeconds": 0.142676,
|
|
74
|
+
"durationSeconds": 0.020998
|
|
75
|
+
},
|
|
76
|
+
"hit8": {
|
|
77
|
+
"offsetSeconds": 0.163674,
|
|
78
|
+
"durationSeconds": 0.144286
|
|
79
|
+
},
|
|
80
|
+
"hit9": {
|
|
81
|
+
"offsetSeconds": 0.30796,
|
|
82
|
+
"durationSeconds": 0.121633
|
|
83
|
+
},
|
|
84
|
+
"hit10": {
|
|
85
|
+
"offsetSeconds": 0.429593,
|
|
86
|
+
"durationSeconds": 0.09576
|
|
87
|
+
},
|
|
88
|
+
"hit11": {
|
|
89
|
+
"offsetSeconds": 0.525353,
|
|
90
|
+
"durationSeconds": 0.107234
|
|
91
|
+
},
|
|
92
|
+
"hit12": {
|
|
93
|
+
"offsetSeconds": 0.632587,
|
|
94
|
+
"durationSeconds": 0.068889
|
|
95
|
+
},
|
|
96
|
+
"hit13": {
|
|
97
|
+
"offsetSeconds": 0.701476,
|
|
98
|
+
"durationSeconds": 0.049569
|
|
99
|
+
},
|
|
100
|
+
"hit14": {
|
|
101
|
+
"offsetSeconds": 0.751045,
|
|
102
|
+
"durationSeconds": 0.037664
|
|
103
|
+
},
|
|
104
|
+
"hit15": {
|
|
105
|
+
"offsetSeconds": 0.788709,
|
|
106
|
+
"durationSeconds": 0.0278
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "classic-coin",
|
|
112
|
+
"audio": {
|
|
113
|
+
"uri": "./audio/classic-coin.webm",
|
|
114
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
115
|
+
},
|
|
116
|
+
"channels": 1,
|
|
117
|
+
"clips": {
|
|
118
|
+
"hit1": {
|
|
119
|
+
"offsetSeconds": 0,
|
|
120
|
+
"durationSeconds": 0.114649
|
|
121
|
+
},
|
|
122
|
+
"hit2": {
|
|
123
|
+
"offsetSeconds": 0.114649,
|
|
124
|
+
"durationSeconds": 0.10449
|
|
125
|
+
},
|
|
126
|
+
"hit3": {
|
|
127
|
+
"offsetSeconds": 0.219139,
|
|
128
|
+
"durationSeconds": 0.10449
|
|
129
|
+
},
|
|
130
|
+
"hit4": {
|
|
131
|
+
"offsetSeconds": 0.323629,
|
|
132
|
+
"durationSeconds": 0.114649
|
|
133
|
+
},
|
|
134
|
+
"hit5": {
|
|
135
|
+
"offsetSeconds": 0.438278,
|
|
136
|
+
"durationSeconds": 0.10449
|
|
137
|
+
},
|
|
138
|
+
"hit6": {
|
|
139
|
+
"offsetSeconds": 0.542768,
|
|
140
|
+
"durationSeconds": 0.10449
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "classic-felt",
|
|
146
|
+
"audio": {
|
|
147
|
+
"uri": "./audio/classic-felt.webm",
|
|
148
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
149
|
+
},
|
|
150
|
+
"channels": 1,
|
|
151
|
+
"clips": {
|
|
152
|
+
"hit1": {
|
|
153
|
+
"offsetSeconds": 0,
|
|
154
|
+
"durationSeconds": 0.070136
|
|
155
|
+
},
|
|
156
|
+
"hit2": {
|
|
157
|
+
"offsetSeconds": 0.070136,
|
|
158
|
+
"durationSeconds": 0.039955
|
|
159
|
+
},
|
|
160
|
+
"hit3": {
|
|
161
|
+
"offsetSeconds": 0.110091,
|
|
162
|
+
"durationSeconds": 0.0539
|
|
163
|
+
},
|
|
164
|
+
"hit4": {
|
|
165
|
+
"offsetSeconds": 0.163991,
|
|
166
|
+
"durationSeconds": 0.044853
|
|
167
|
+
},
|
|
168
|
+
"hit5": {
|
|
169
|
+
"offsetSeconds": 0.208844,
|
|
170
|
+
"durationSeconds": 0.110907
|
|
171
|
+
},
|
|
172
|
+
"hit6": {
|
|
173
|
+
"offsetSeconds": 0.319751,
|
|
174
|
+
"durationSeconds": 0.067846
|
|
175
|
+
},
|
|
176
|
+
"hit7": {
|
|
177
|
+
"offsetSeconds": 0.387597,
|
|
178
|
+
"durationSeconds": 0.065283
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "classic-metal",
|
|
184
|
+
"audio": {
|
|
185
|
+
"uri": "./audio/classic-metal.webm",
|
|
186
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
187
|
+
},
|
|
188
|
+
"channels": 1,
|
|
189
|
+
"clips": {
|
|
190
|
+
"hit1": {
|
|
191
|
+
"offsetSeconds": 0,
|
|
192
|
+
"durationSeconds": 0.548571
|
|
193
|
+
},
|
|
194
|
+
"hit2": {
|
|
195
|
+
"offsetSeconds": 0.548571,
|
|
196
|
+
"durationSeconds": 0.600816
|
|
197
|
+
},
|
|
198
|
+
"hit3": {
|
|
199
|
+
"offsetSeconds": 1.149387,
|
|
200
|
+
"durationSeconds": 0.444082
|
|
201
|
+
},
|
|
202
|
+
"hit4": {
|
|
203
|
+
"offsetSeconds": 1.5934689999999998,
|
|
204
|
+
"durationSeconds": 0.417959
|
|
205
|
+
},
|
|
206
|
+
"hit5": {
|
|
207
|
+
"offsetSeconds": 2.011428,
|
|
208
|
+
"durationSeconds": 0.313469
|
|
209
|
+
},
|
|
210
|
+
"hit6": {
|
|
211
|
+
"offsetSeconds": 2.324897,
|
|
212
|
+
"durationSeconds": 0.235102
|
|
213
|
+
},
|
|
214
|
+
"hit7": {
|
|
215
|
+
"offsetSeconds": 2.559999,
|
|
216
|
+
"durationSeconds": 0.522449
|
|
217
|
+
},
|
|
218
|
+
"hit8": {
|
|
219
|
+
"offsetSeconds": 3.082448,
|
|
220
|
+
"durationSeconds": 0.470204
|
|
221
|
+
},
|
|
222
|
+
"hit9": {
|
|
223
|
+
"offsetSeconds": 3.5526519999999997,
|
|
224
|
+
"durationSeconds": 0.313469
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "classic-wood-table",
|
|
230
|
+
"audio": {
|
|
231
|
+
"uri": "./audio/classic-wood-table.webm",
|
|
232
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
233
|
+
},
|
|
234
|
+
"channels": 1,
|
|
235
|
+
"clips": {
|
|
236
|
+
"hit1": {
|
|
237
|
+
"offsetSeconds": 0,
|
|
238
|
+
"durationSeconds": 0.074785
|
|
239
|
+
},
|
|
240
|
+
"hit2": {
|
|
241
|
+
"offsetSeconds": 0.074785,
|
|
242
|
+
"durationSeconds": 0.050975
|
|
243
|
+
},
|
|
244
|
+
"hit3": {
|
|
245
|
+
"offsetSeconds": 0.12576,
|
|
246
|
+
"durationSeconds": 0.035873
|
|
247
|
+
},
|
|
248
|
+
"hit4": {
|
|
249
|
+
"offsetSeconds": 0.16163300000000003,
|
|
250
|
+
"durationSeconds": 0.042585
|
|
251
|
+
},
|
|
252
|
+
"hit5": {
|
|
253
|
+
"offsetSeconds": 0.204218,
|
|
254
|
+
"durationSeconds": 0.047914
|
|
255
|
+
},
|
|
256
|
+
"hit6": {
|
|
257
|
+
"offsetSeconds": 0.252132,
|
|
258
|
+
"durationSeconds": 0.05093
|
|
259
|
+
},
|
|
260
|
+
"hit7": {
|
|
261
|
+
"offsetSeconds": 0.30306200000000005,
|
|
262
|
+
"durationSeconds": 0.040975
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "classic-wood-tray",
|
|
268
|
+
"audio": {
|
|
269
|
+
"uri": "./audio/classic-wood-tray.webm",
|
|
270
|
+
"mediaType": "audio/webm; codecs=opus"
|
|
271
|
+
},
|
|
272
|
+
"channels": 1,
|
|
273
|
+
"clips": {
|
|
274
|
+
"hit1": {
|
|
275
|
+
"offsetSeconds": 0,
|
|
276
|
+
"durationSeconds": 0.094172
|
|
277
|
+
},
|
|
278
|
+
"hit2": {
|
|
279
|
+
"offsetSeconds": 0.094172,
|
|
280
|
+
"durationSeconds": 0.164966
|
|
281
|
+
},
|
|
282
|
+
"hit3": {
|
|
283
|
+
"offsetSeconds": 0.259138,
|
|
284
|
+
"durationSeconds": 0.143764
|
|
285
|
+
},
|
|
286
|
+
"hit4": {
|
|
287
|
+
"offsetSeconds": 0.402902,
|
|
288
|
+
"durationSeconds": 0.105941
|
|
289
|
+
},
|
|
290
|
+
"hit5": {
|
|
291
|
+
"offsetSeconds": 0.5088429999999999,
|
|
292
|
+
"durationSeconds": 0.033764
|
|
293
|
+
},
|
|
294
|
+
"hit6": {
|
|
295
|
+
"offsetSeconds": 0.542607,
|
|
296
|
+
"durationSeconds": 0.044898
|
|
297
|
+
},
|
|
298
|
+
"hit7": {
|
|
299
|
+
"offsetSeconds": 0.5875049999999999,
|
|
300
|
+
"durationSeconds": 0.036848
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"audioBanks": [
|
|
306
|
+
{
|
|
307
|
+
"id": "procedural-resin",
|
|
308
|
+
"kind": "die-material",
|
|
309
|
+
"spriteId": "procedural-resin",
|
|
310
|
+
"clipIds": ["hit1", "hit2"],
|
|
311
|
+
"forceRange": [0.5, 140],
|
|
312
|
+
"gainRange": [0.025, 0.85],
|
|
313
|
+
"pitchVariationCents": 28,
|
|
314
|
+
"gainVariation": 0.05,
|
|
315
|
+
"maxVoices": 8
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "procedural-wood",
|
|
319
|
+
"kind": "surface-material",
|
|
320
|
+
"spriteId": "procedural-wood",
|
|
321
|
+
"clipIds": ["hit1", "hit2"],
|
|
322
|
+
"forceRange": [0.5, 140],
|
|
323
|
+
"gainRange": [0.015, 0.55],
|
|
324
|
+
"pitchVariationCents": 22,
|
|
325
|
+
"gainVariation": 0.04,
|
|
326
|
+
"maxVoices": 8
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"id": "classic-dice",
|
|
330
|
+
"kind": "die-material",
|
|
331
|
+
"spriteId": "classic-dice",
|
|
332
|
+
"clipIds": [
|
|
333
|
+
"hit1",
|
|
334
|
+
"hit2",
|
|
335
|
+
"hit3",
|
|
336
|
+
"hit4",
|
|
337
|
+
"hit5",
|
|
338
|
+
"hit6",
|
|
339
|
+
"hit7",
|
|
340
|
+
"hit8",
|
|
341
|
+
"hit9",
|
|
342
|
+
"hit10",
|
|
343
|
+
"hit11",
|
|
344
|
+
"hit12",
|
|
345
|
+
"hit13",
|
|
346
|
+
"hit14",
|
|
347
|
+
"hit15"
|
|
348
|
+
],
|
|
349
|
+
"forceRange": [0.5, 140],
|
|
350
|
+
"gainRange": [0.02, 0.82],
|
|
351
|
+
"pitchVariationCents": 24,
|
|
352
|
+
"gainVariation": 0.05,
|
|
353
|
+
"maxVoices": 12,
|
|
354
|
+
"metadata": {
|
|
355
|
+
"source": "3DDiceRoller",
|
|
356
|
+
"license": "Unlicense"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"id": "classic-coin",
|
|
361
|
+
"kind": "die-material",
|
|
362
|
+
"spriteId": "classic-coin",
|
|
363
|
+
"clipIds": ["hit1", "hit2", "hit3", "hit4", "hit5", "hit6"],
|
|
364
|
+
"forceRange": [0.5, 140],
|
|
365
|
+
"gainRange": [0.018, 0.74],
|
|
366
|
+
"pitchVariationCents": 18,
|
|
367
|
+
"gainVariation": 0.04,
|
|
368
|
+
"maxVoices": 10,
|
|
369
|
+
"metadata": {
|
|
370
|
+
"source": "3DDiceRoller",
|
|
371
|
+
"license": "Unlicense"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"id": "classic-felt",
|
|
376
|
+
"kind": "surface-material",
|
|
377
|
+
"spriteId": "classic-felt",
|
|
378
|
+
"clipIds": ["hit1", "hit2", "hit3", "hit4", "hit5", "hit6", "hit7"],
|
|
379
|
+
"forceRange": [0.5, 140],
|
|
380
|
+
"gainRange": [0.01, 0.38],
|
|
381
|
+
"pitchVariationCents": 16,
|
|
382
|
+
"gainVariation": 0.04,
|
|
383
|
+
"maxVoices": 12,
|
|
384
|
+
"metadata": {
|
|
385
|
+
"source": "3DDiceRoller",
|
|
386
|
+
"license": "Unlicense"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"id": "classic-metal",
|
|
391
|
+
"kind": "surface-material",
|
|
392
|
+
"spriteId": "classic-metal",
|
|
393
|
+
"clipIds": ["hit1", "hit2", "hit3", "hit4", "hit5", "hit6", "hit7", "hit8", "hit9"],
|
|
394
|
+
"forceRange": [0.5, 140],
|
|
395
|
+
"gainRange": [0.012, 0.48],
|
|
396
|
+
"pitchVariationCents": 14,
|
|
397
|
+
"gainVariation": 0.035,
|
|
398
|
+
"maxVoices": 10,
|
|
399
|
+
"metadata": {
|
|
400
|
+
"source": "3DDiceRoller",
|
|
401
|
+
"license": "Unlicense"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"id": "classic-wood-table",
|
|
406
|
+
"kind": "surface-material",
|
|
407
|
+
"spriteId": "classic-wood-table",
|
|
408
|
+
"clipIds": ["hit1", "hit2", "hit3", "hit4", "hit5", "hit6", "hit7"],
|
|
409
|
+
"forceRange": [0.5, 140],
|
|
410
|
+
"gainRange": [0.012, 0.5],
|
|
411
|
+
"pitchVariationCents": 20,
|
|
412
|
+
"gainVariation": 0.04,
|
|
413
|
+
"maxVoices": 12,
|
|
414
|
+
"metadata": {
|
|
415
|
+
"source": "3DDiceRoller",
|
|
416
|
+
"license": "Unlicense"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"id": "classic-wood-tray",
|
|
421
|
+
"kind": "surface-material",
|
|
422
|
+
"spriteId": "classic-wood-tray",
|
|
423
|
+
"clipIds": ["hit1", "hit2", "hit3", "hit4", "hit5", "hit6", "hit7"],
|
|
424
|
+
"forceRange": [0.5, 140],
|
|
425
|
+
"gainRange": [0.012, 0.52],
|
|
426
|
+
"pitchVariationCents": 20,
|
|
427
|
+
"gainVariation": 0.04,
|
|
428
|
+
"maxVoices": 12,
|
|
429
|
+
"metadata": {
|
|
430
|
+
"source": "3DDiceRoller",
|
|
431
|
+
"license": "Unlicense"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
],
|
|
435
|
+
"materials": [
|
|
436
|
+
{
|
|
437
|
+
"id": "procedural-resin",
|
|
438
|
+
"roughness": 0.34,
|
|
439
|
+
"metalness": 0.04,
|
|
440
|
+
"normalScale": 0.6,
|
|
441
|
+
"clearcoat": 0.18,
|
|
442
|
+
"clearcoatRoughness": 0.2
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"patterns": [
|
|
446
|
+
{
|
|
447
|
+
"id": "procedural-speckle",
|
|
448
|
+
"baseColor": {
|
|
449
|
+
"uri": "./textures/speckle-base.ktx2",
|
|
450
|
+
"mediaType": "image/ktx2",
|
|
451
|
+
"colorSpace": "srgb",
|
|
452
|
+
"mipmaps": true
|
|
453
|
+
},
|
|
454
|
+
"normal": {
|
|
455
|
+
"uri": "./textures/speckle-normal.ktx2",
|
|
456
|
+
"mediaType": "image/ktx2",
|
|
457
|
+
"colorSpace": "linear",
|
|
458
|
+
"mipmaps": true
|
|
459
|
+
},
|
|
460
|
+
"orm": {
|
|
461
|
+
"uri": "./textures/speckle-orm.ktx2",
|
|
462
|
+
"mediaType": "image/ktx2",
|
|
463
|
+
"colorSpace": "linear",
|
|
464
|
+
"mipmaps": true
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"faces": [
|
|
469
|
+
{
|
|
470
|
+
"id": "procedural-digits",
|
|
471
|
+
"texture": {
|
|
472
|
+
"uri": "./textures/digits.ktx2",
|
|
473
|
+
"mediaType": "image/ktx2",
|
|
474
|
+
"colorSpace": "srgb",
|
|
475
|
+
"mipmaps": true
|
|
476
|
+
},
|
|
477
|
+
"width": 640,
|
|
478
|
+
"height": 512,
|
|
479
|
+
"faces": {
|
|
480
|
+
"1": {
|
|
481
|
+
"x": 0,
|
|
482
|
+
"y": 0,
|
|
483
|
+
"width": 128,
|
|
484
|
+
"height": 128
|
|
485
|
+
},
|
|
486
|
+
"2": {
|
|
487
|
+
"x": 128,
|
|
488
|
+
"y": 0,
|
|
489
|
+
"width": 128,
|
|
490
|
+
"height": 128
|
|
491
|
+
},
|
|
492
|
+
"3": {
|
|
493
|
+
"x": 256,
|
|
494
|
+
"y": 0,
|
|
495
|
+
"width": 128,
|
|
496
|
+
"height": 128
|
|
497
|
+
},
|
|
498
|
+
"4": {
|
|
499
|
+
"x": 384,
|
|
500
|
+
"y": 0,
|
|
501
|
+
"width": 128,
|
|
502
|
+
"height": 128
|
|
503
|
+
},
|
|
504
|
+
"5": {
|
|
505
|
+
"x": 512,
|
|
506
|
+
"y": 0,
|
|
507
|
+
"width": 128,
|
|
508
|
+
"height": 128
|
|
509
|
+
},
|
|
510
|
+
"6": {
|
|
511
|
+
"x": 0,
|
|
512
|
+
"y": 128,
|
|
513
|
+
"width": 128,
|
|
514
|
+
"height": 128
|
|
515
|
+
},
|
|
516
|
+
"7": {
|
|
517
|
+
"x": 128,
|
|
518
|
+
"y": 128,
|
|
519
|
+
"width": 128,
|
|
520
|
+
"height": 128
|
|
521
|
+
},
|
|
522
|
+
"8": {
|
|
523
|
+
"x": 256,
|
|
524
|
+
"y": 128,
|
|
525
|
+
"width": 128,
|
|
526
|
+
"height": 128
|
|
527
|
+
},
|
|
528
|
+
"9": {
|
|
529
|
+
"x": 384,
|
|
530
|
+
"y": 128,
|
|
531
|
+
"width": 128,
|
|
532
|
+
"height": 128
|
|
533
|
+
},
|
|
534
|
+
"10": {
|
|
535
|
+
"x": 512,
|
|
536
|
+
"y": 128,
|
|
537
|
+
"width": 128,
|
|
538
|
+
"height": 128
|
|
539
|
+
},
|
|
540
|
+
"11": {
|
|
541
|
+
"x": 0,
|
|
542
|
+
"y": 256,
|
|
543
|
+
"width": 128,
|
|
544
|
+
"height": 128
|
|
545
|
+
},
|
|
546
|
+
"12": {
|
|
547
|
+
"x": 128,
|
|
548
|
+
"y": 256,
|
|
549
|
+
"width": 128,
|
|
550
|
+
"height": 128
|
|
551
|
+
},
|
|
552
|
+
"13": {
|
|
553
|
+
"x": 256,
|
|
554
|
+
"y": 256,
|
|
555
|
+
"width": 128,
|
|
556
|
+
"height": 128
|
|
557
|
+
},
|
|
558
|
+
"14": {
|
|
559
|
+
"x": 384,
|
|
560
|
+
"y": 256,
|
|
561
|
+
"width": 128,
|
|
562
|
+
"height": 128
|
|
563
|
+
},
|
|
564
|
+
"15": {
|
|
565
|
+
"x": 512,
|
|
566
|
+
"y": 256,
|
|
567
|
+
"width": 128,
|
|
568
|
+
"height": 128
|
|
569
|
+
},
|
|
570
|
+
"16": {
|
|
571
|
+
"x": 0,
|
|
572
|
+
"y": 384,
|
|
573
|
+
"width": 128,
|
|
574
|
+
"height": 128
|
|
575
|
+
},
|
|
576
|
+
"17": {
|
|
577
|
+
"x": 128,
|
|
578
|
+
"y": 384,
|
|
579
|
+
"width": 128,
|
|
580
|
+
"height": 128
|
|
581
|
+
},
|
|
582
|
+
"18": {
|
|
583
|
+
"x": 256,
|
|
584
|
+
"y": 384,
|
|
585
|
+
"width": 128,
|
|
586
|
+
"height": 128
|
|
587
|
+
},
|
|
588
|
+
"19": {
|
|
589
|
+
"x": 384,
|
|
590
|
+
"y": 384,
|
|
591
|
+
"width": 128,
|
|
592
|
+
"height": 128
|
|
593
|
+
},
|
|
594
|
+
"20": {
|
|
595
|
+
"x": 512,
|
|
596
|
+
"y": 384,
|
|
597
|
+
"width": 128,
|
|
598
|
+
"height": 128
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
"skins": [
|
|
604
|
+
{
|
|
605
|
+
"id": "procedural-amethyst",
|
|
606
|
+
"materialId": "procedural-resin",
|
|
607
|
+
"patternId": "procedural-speckle",
|
|
608
|
+
"faceAtlasId": "procedural-digits",
|
|
609
|
+
"tint": "#d8bcff",
|
|
610
|
+
"labelColor": "#fff8dc",
|
|
611
|
+
"hueRotation": 0.04,
|
|
612
|
+
"saturation": 1.08,
|
|
613
|
+
"composite": "multiply"
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AudioBankDefinition, AudioSpriteManifest, DiceAssetCatalogManifest, DiceFaceAtlasDefinition, DiceMaterialDefinition, DicePatternDefinition, DiceSkinDefinition } from './types.js';
|
|
2
|
+
export interface RegisterDiceAssetOptions {
|
|
3
|
+
readonly replace?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class AssetRegistry<T extends {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
}> {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(validate?: (asset: T) => void);
|
|
10
|
+
get revision(): number;
|
|
11
|
+
register(source: T, options?: RegisterDiceAssetOptions): T;
|
|
12
|
+
unregister(id: string): T | undefined;
|
|
13
|
+
get(id: string): T | undefined;
|
|
14
|
+
has(id: string): boolean;
|
|
15
|
+
list(): readonly T[];
|
|
16
|
+
}
|
|
17
|
+
export declare class DiceAssetRegistry {
|
|
18
|
+
readonly audio: AssetRegistry<AudioSpriteManifest>;
|
|
19
|
+
readonly audioBanks: AssetRegistry<AudioBankDefinition>;
|
|
20
|
+
readonly materials: AssetRegistry<DiceMaterialDefinition>;
|
|
21
|
+
readonly patterns: AssetRegistry<DicePatternDefinition>;
|
|
22
|
+
readonly skins: AssetRegistry<DiceSkinDefinition>;
|
|
23
|
+
readonly faces: AssetRegistry<DiceFaceAtlasDefinition>;
|
|
24
|
+
get revision(): number;
|
|
25
|
+
registerCatalog(catalog: DiceAssetCatalogManifest): void;
|
|
26
|
+
validateReferences(): void;
|
|
27
|
+
registerSkin(source: DiceSkinDefinition, options?: RegisterDiceAssetOptions): DiceSkinDefinition;
|
|
28
|
+
unregisterSkin(id: string): DiceSkinDefinition | undefined;
|
|
29
|
+
getSkin(id: string): DiceSkinDefinition | undefined;
|
|
30
|
+
listSkins(): readonly DiceSkinDefinition[];
|
|
31
|
+
}
|