@ludic-labs/assembly 0.0.0-stage → 0.4.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/CHANGELOG.md +78 -0
- package/LICENSE +2 -0
- package/README.md +50 -2
- package/dist/bake.d.ts +80 -0
- package/dist/bake.js +214 -0
- package/dist/browser.d.ts +89 -0
- package/dist/browser.js +534 -0
- package/dist/compat.d.ts +17 -0
- package/dist/compat.js +153 -0
- package/dist/compiler.d.ts +18 -0
- package/dist/compiler.js +1264 -0
- package/dist/diagnostics.d.ts +5 -0
- package/dist/diagnostics.js +8 -0
- package/dist/export.d.ts +54 -0
- package/dist/export.js +272 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/legacy.d.ts +36 -0
- package/dist/legacy.js +180 -0
- package/dist/math.d.ts +16 -0
- package/dist/math.js +62 -0
- package/dist/mesh.d.ts +11 -0
- package/dist/mesh.js +153 -0
- package/dist/motion.d.ts +63 -0
- package/dist/motion.js +1476 -0
- package/dist/pixel.d.ts +268 -0
- package/dist/pixel.js +942 -0
- package/dist/required.d.ts +2 -0
- package/dist/required.js +6 -0
- package/dist/shapes.d.ts +71 -0
- package/dist/shapes.js +396 -0
- package/dist/sprite-brief.d.ts +5 -0
- package/dist/sprite-brief.js +47 -0
- package/dist/sprite-compiler.d.ts +62 -0
- package/dist/sprite-compiler.js +1745 -0
- package/dist/sprite-decompile.d.ts +68 -0
- package/dist/sprite-decompile.js +786 -0
- package/dist/sprite-format.d.ts +4 -0
- package/dist/sprite-format.js +155 -0
- package/dist/sprite-guide.d.ts +40 -0
- package/dist/sprite-guide.js +330 -0
- package/dist/sprite-scene.d.ts +277 -0
- package/dist/sprite-scene.js +664 -0
- package/dist/sprite-types.d.ts +110 -0
- package/dist/sprite-types.js +1 -0
- package/dist/sprite.d.ts +8 -0
- package/dist/sprite.js +8 -0
- package/dist/svg/schema.d.ts +71 -0
- package/dist/svg/schema.js +217 -0
- package/dist/svg/types.d.ts +148 -0
- package/dist/svg/types.js +1 -0
- package/dist/svg.d.ts +26 -0
- package/dist/svg.js +539 -0
- package/dist/text.d.ts +12 -0
- package/dist/text.js +75 -0
- package/dist/types.d.ts +478 -0
- package/dist/types.js +1 -0
- package/docs/svg/README.md +150 -0
- package/docs/svg/specification.md +108 -0
- package/examples/svg/arcane-shield.json +261 -0
- package/examples/svg/aurora-ribbon.json +158 -0
- package/examples/svg/bouncing-ember.json +76 -0
- package/examples/svg/ember-fountain.json +224 -0
- package/examples/svg/lantern-keeper.json +1159 -0
- package/examples/svg/night-workshop.json +1120 -0
- package/examples/svg/waygate-platform.json +64 -0
- package/examples/svg/waygate-spark.json +92 -0
- package/examples/svg/waygate-wisp.json +105 -0
- package/examples/svg/waygate.json +485 -0
- package/package.json +132 -4
- package/schemas/asset-assembly-0.1.schema.json +354 -0
- package/schemas/asset-assembly-0.2.schema.json +429 -0
- package/schemas/asset-assembly-0.3.schema.json +572 -0
- package/schemas/motion-set-0.1.schema.json +178 -0
- package/schemas/pixel-sprite-0.1.schema.json +892 -0
- package/schemas/pixel-sprite-scene-0.1.schema.json +149 -0
- package/schemas/svg-asset-0.1.schema.json +1157 -0
- package/tools/svg-asset.mjs +106 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "svg-asset/0.1",
|
|
3
|
+
"name": "Ember fountain",
|
|
4
|
+
"viewBox": [0, 0, 480, 360],
|
|
5
|
+
"seed": 109,
|
|
6
|
+
"params": {
|
|
7
|
+
"pulse": {
|
|
8
|
+
"default": 1,
|
|
9
|
+
"min": 0.85,
|
|
10
|
+
"max": 1.12
|
|
11
|
+
},
|
|
12
|
+
"sway": {
|
|
13
|
+
"default": 0,
|
|
14
|
+
"min": -6,
|
|
15
|
+
"max": 6
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"gradients": {
|
|
19
|
+
"heat": {
|
|
20
|
+
"kind": "radial",
|
|
21
|
+
"center": [240, 260],
|
|
22
|
+
"radius": 145,
|
|
23
|
+
"stops": [
|
|
24
|
+
{
|
|
25
|
+
"offset": 0,
|
|
26
|
+
"color": "#f59345",
|
|
27
|
+
"opacity": 0.3
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"offset": 1,
|
|
31
|
+
"color": "#e84929",
|
|
32
|
+
"opacity": 0
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"animations": {
|
|
38
|
+
"rise": {
|
|
39
|
+
"duration": 3,
|
|
40
|
+
"loop": true,
|
|
41
|
+
"tracks": {
|
|
42
|
+
"pulse": [
|
|
43
|
+
{
|
|
44
|
+
"time": 0,
|
|
45
|
+
"value": 0.9,
|
|
46
|
+
"ease": "smooth"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"time": 1.5,
|
|
50
|
+
"value": 1.1,
|
|
51
|
+
"ease": "smooth"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"time": 3,
|
|
55
|
+
"value": 0.9
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"sway": [
|
|
59
|
+
{
|
|
60
|
+
"time": 0,
|
|
61
|
+
"value": -5,
|
|
62
|
+
"ease": "smooth"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"time": 1.5,
|
|
66
|
+
"value": 5,
|
|
67
|
+
"ease": "smooth"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"time": 3,
|
|
71
|
+
"value": -5
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"defaultAnimation": "rise",
|
|
78
|
+
"nodes": [
|
|
79
|
+
{
|
|
80
|
+
"id": "heat",
|
|
81
|
+
"kind": "ellipse",
|
|
82
|
+
"cx": 240,
|
|
83
|
+
"cy": 260,
|
|
84
|
+
"rx": 145,
|
|
85
|
+
"ry": 105,
|
|
86
|
+
"style": {
|
|
87
|
+
"fill": {
|
|
88
|
+
"gradient": "heat"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "ground",
|
|
94
|
+
"kind": "ellipse",
|
|
95
|
+
"cx": 240,
|
|
96
|
+
"cy": 308,
|
|
97
|
+
"rx": 78,
|
|
98
|
+
"ry": 7,
|
|
99
|
+
"style": {
|
|
100
|
+
"fill": "#f2af68"
|
|
101
|
+
},
|
|
102
|
+
"opacity": 0.25,
|
|
103
|
+
"blur": 5
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "flame-0",
|
|
107
|
+
"kind": "path",
|
|
108
|
+
"d": [
|
|
109
|
+
["M", 210, 285],
|
|
110
|
+
["C", 180, 240, 240, 210, 232, 142],
|
|
111
|
+
["C", 285, 195, 270, 220, 282, 252],
|
|
112
|
+
["C", 289, 292, 250, 310, 210, 285],
|
|
113
|
+
["Z"]
|
|
114
|
+
],
|
|
115
|
+
"style": {
|
|
116
|
+
"fill": "#f5683d"
|
|
117
|
+
},
|
|
118
|
+
"opacity": 0.8,
|
|
119
|
+
"transform": {
|
|
120
|
+
"pivot": [240, 290],
|
|
121
|
+
"scale": [1, ["mul", 1, "$pulse"]],
|
|
122
|
+
"rotate": ["mul", "$sway", 1]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "flame-1",
|
|
127
|
+
"kind": "path",
|
|
128
|
+
"d": [
|
|
129
|
+
["M", 210, 285],
|
|
130
|
+
["C", 180, 240, 240, 210, 232, 142],
|
|
131
|
+
["C", 285, 195, 270, 220, 282, 252],
|
|
132
|
+
["C", 289, 292, 250, 310, 210, 285],
|
|
133
|
+
["Z"]
|
|
134
|
+
],
|
|
135
|
+
"style": {
|
|
136
|
+
"fill": "#ffc269"
|
|
137
|
+
},
|
|
138
|
+
"opacity": 0.8,
|
|
139
|
+
"transform": {
|
|
140
|
+
"pivot": [240, 290],
|
|
141
|
+
"scale": [0.68, ["mul", 0.68, "$pulse"]],
|
|
142
|
+
"rotate": ["mul", "$sway", 2]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "flame-2",
|
|
147
|
+
"kind": "path",
|
|
148
|
+
"d": [
|
|
149
|
+
["M", 210, 285],
|
|
150
|
+
["C", 180, 240, 240, 210, 232, 142],
|
|
151
|
+
["C", 285, 195, 270, 220, 282, 252],
|
|
152
|
+
["C", 289, 292, 250, 310, 210, 285],
|
|
153
|
+
["Z"]
|
|
154
|
+
],
|
|
155
|
+
"style": {
|
|
156
|
+
"fill": "#fff0be"
|
|
157
|
+
},
|
|
158
|
+
"opacity": 0.8,
|
|
159
|
+
"transform": {
|
|
160
|
+
"pivot": [240, 290],
|
|
161
|
+
"scale": [0.35, ["mul", 0.35, "$pulse"]],
|
|
162
|
+
"rotate": ["mul", "$sway", 3]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "sparks",
|
|
167
|
+
"kind": "emitter",
|
|
168
|
+
"count": 38,
|
|
169
|
+
"lifetime": 3,
|
|
170
|
+
"mode": "loop",
|
|
171
|
+
"velocity": [
|
|
172
|
+
["rand", 0, -43, 43],
|
|
173
|
+
["rand", 1, -90, -60]
|
|
174
|
+
],
|
|
175
|
+
"acceleration": [0, -6],
|
|
176
|
+
"transform": {
|
|
177
|
+
"translate": [240, 280]
|
|
178
|
+
},
|
|
179
|
+
"children": [
|
|
180
|
+
{
|
|
181
|
+
"id": "halo",
|
|
182
|
+
"kind": "ellipse",
|
|
183
|
+
"cx": 0,
|
|
184
|
+
"cy": 0,
|
|
185
|
+
"rx": 7,
|
|
186
|
+
"ry": 7,
|
|
187
|
+
"style": {
|
|
188
|
+
"fill": "#ffad55"
|
|
189
|
+
},
|
|
190
|
+
"opacity": ["mul", 0.24, ["sin", ["mul", 3.141592653589793, "$age"]]],
|
|
191
|
+
"blur": 3
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "ember",
|
|
195
|
+
"kind": "ellipse",
|
|
196
|
+
"cx": 0,
|
|
197
|
+
"cy": 0,
|
|
198
|
+
"rx": ["rand", 2, 1, 2.8],
|
|
199
|
+
"ry": ["rand", 2, 1, 2.8],
|
|
200
|
+
"style": {
|
|
201
|
+
"fill": "#ffe3a0"
|
|
202
|
+
},
|
|
203
|
+
"opacity": ["sin", ["mul", 3.141592653589793, "$age"]]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "trail",
|
|
207
|
+
"kind": "path",
|
|
208
|
+
"d": [
|
|
209
|
+
["M", 0, 0],
|
|
210
|
+
["L", 0, 9]
|
|
211
|
+
],
|
|
212
|
+
"style": {
|
|
213
|
+
"fill": "none",
|
|
214
|
+
"stroke": "#ffba6b",
|
|
215
|
+
"strokeWidth": 1,
|
|
216
|
+
"linecap": "round",
|
|
217
|
+
"linejoin": "round"
|
|
218
|
+
},
|
|
219
|
+
"opacity": ["mul", 0.4, ["sin", ["mul", 3.141592653589793, "$age"]]]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|