@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.
Files changed (78) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +2 -0
  3. package/README.md +50 -2
  4. package/dist/bake.d.ts +80 -0
  5. package/dist/bake.js +214 -0
  6. package/dist/browser.d.ts +89 -0
  7. package/dist/browser.js +534 -0
  8. package/dist/compat.d.ts +17 -0
  9. package/dist/compat.js +153 -0
  10. package/dist/compiler.d.ts +18 -0
  11. package/dist/compiler.js +1264 -0
  12. package/dist/diagnostics.d.ts +5 -0
  13. package/dist/diagnostics.js +8 -0
  14. package/dist/export.d.ts +54 -0
  15. package/dist/export.js +272 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +3 -0
  18. package/dist/legacy.d.ts +36 -0
  19. package/dist/legacy.js +180 -0
  20. package/dist/math.d.ts +16 -0
  21. package/dist/math.js +62 -0
  22. package/dist/mesh.d.ts +11 -0
  23. package/dist/mesh.js +153 -0
  24. package/dist/motion.d.ts +63 -0
  25. package/dist/motion.js +1476 -0
  26. package/dist/pixel.d.ts +268 -0
  27. package/dist/pixel.js +942 -0
  28. package/dist/required.d.ts +2 -0
  29. package/dist/required.js +6 -0
  30. package/dist/shapes.d.ts +71 -0
  31. package/dist/shapes.js +396 -0
  32. package/dist/sprite-brief.d.ts +5 -0
  33. package/dist/sprite-brief.js +47 -0
  34. package/dist/sprite-compiler.d.ts +62 -0
  35. package/dist/sprite-compiler.js +1745 -0
  36. package/dist/sprite-decompile.d.ts +68 -0
  37. package/dist/sprite-decompile.js +786 -0
  38. package/dist/sprite-format.d.ts +4 -0
  39. package/dist/sprite-format.js +155 -0
  40. package/dist/sprite-guide.d.ts +40 -0
  41. package/dist/sprite-guide.js +330 -0
  42. package/dist/sprite-scene.d.ts +277 -0
  43. package/dist/sprite-scene.js +664 -0
  44. package/dist/sprite-types.d.ts +110 -0
  45. package/dist/sprite-types.js +1 -0
  46. package/dist/sprite.d.ts +8 -0
  47. package/dist/sprite.js +8 -0
  48. package/dist/svg/schema.d.ts +71 -0
  49. package/dist/svg/schema.js +217 -0
  50. package/dist/svg/types.d.ts +148 -0
  51. package/dist/svg/types.js +1 -0
  52. package/dist/svg.d.ts +26 -0
  53. package/dist/svg.js +539 -0
  54. package/dist/text.d.ts +12 -0
  55. package/dist/text.js +75 -0
  56. package/dist/types.d.ts +478 -0
  57. package/dist/types.js +1 -0
  58. package/docs/svg/README.md +150 -0
  59. package/docs/svg/specification.md +108 -0
  60. package/examples/svg/arcane-shield.json +261 -0
  61. package/examples/svg/aurora-ribbon.json +158 -0
  62. package/examples/svg/bouncing-ember.json +76 -0
  63. package/examples/svg/ember-fountain.json +224 -0
  64. package/examples/svg/lantern-keeper.json +1159 -0
  65. package/examples/svg/night-workshop.json +1120 -0
  66. package/examples/svg/waygate-platform.json +64 -0
  67. package/examples/svg/waygate-spark.json +92 -0
  68. package/examples/svg/waygate-wisp.json +105 -0
  69. package/examples/svg/waygate.json +485 -0
  70. package/package.json +132 -4
  71. package/schemas/asset-assembly-0.1.schema.json +354 -0
  72. package/schemas/asset-assembly-0.2.schema.json +429 -0
  73. package/schemas/asset-assembly-0.3.schema.json +572 -0
  74. package/schemas/motion-set-0.1.schema.json +178 -0
  75. package/schemas/pixel-sprite-0.1.schema.json +892 -0
  76. package/schemas/pixel-sprite-scene-0.1.schema.json +149 -0
  77. package/schemas/svg-asset-0.1.schema.json +1157 -0
  78. package/tools/svg-asset.mjs +106 -0
@@ -0,0 +1,64 @@
1
+ {
2
+ "schema": "svg-asset/0.1",
3
+ "name": "Floating folio",
4
+ "viewBox": [0, 0, 112, 24],
5
+ "nodes": [
6
+ {
7
+ "id": "glow",
8
+ "kind": "rect",
9
+ "x": 3,
10
+ "y": 4,
11
+ "width": 106,
12
+ "height": 15,
13
+ "radius": 5,
14
+ "style": {
15
+ "fill": "#9cd6bf"
16
+ },
17
+ "opacity": 0.25,
18
+ "blur": 3
19
+ },
20
+ {
21
+ "id": "cover",
22
+ "kind": "rect",
23
+ "x": 3,
24
+ "y": 2,
25
+ "width": 106,
26
+ "height": 15,
27
+ "radius": 3,
28
+ "style": {
29
+ "fill": "#2e6468",
30
+ "stroke": "#c4a274",
31
+ "strokeWidth": 2
32
+ }
33
+ },
34
+ {
35
+ "id": "pages",
36
+ "kind": "rect",
37
+ "x": 9,
38
+ "y": 6,
39
+ "width": 95,
40
+ "height": 7,
41
+ "radius": 2,
42
+ "style": {
43
+ "fill": "#dfcea7"
44
+ }
45
+ },
46
+ {
47
+ "id": "binding",
48
+ "kind": "path",
49
+ "d": [
50
+ ["M", 17, 3],
51
+ ["L", 17, 17],
52
+ ["M", 85, 3],
53
+ ["L", 85, 17]
54
+ ],
55
+ "style": {
56
+ "fill": "none",
57
+ "stroke": "#466c67",
58
+ "strokeWidth": 3,
59
+ "linecap": "round",
60
+ "linejoin": "round"
61
+ }
62
+ }
63
+ ]
64
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "schema": "svg-asset/0.1",
3
+ "name": "A lost light",
4
+ "viewBox": [0, 0, 48, 48],
5
+ "nodes": [
6
+ {
7
+ "id": "light",
8
+ "kind": "group",
9
+ "transform": {
10
+ "pivot": [24, 24],
11
+ "rotate": "$turn"
12
+ },
13
+ "children": [
14
+ {
15
+ "id": "halo",
16
+ "kind": "ellipse",
17
+ "cx": 24,
18
+ "cy": 24,
19
+ "rx": 17,
20
+ "ry": 17,
21
+ "style": {
22
+ "fill": "#f9d397"
23
+ },
24
+ "opacity": 0.12,
25
+ "blur": 3
26
+ },
27
+ {
28
+ "id": "star",
29
+ "kind": "path",
30
+ "d": [
31
+ ["M", 24, 7],
32
+ ["Q", 26, 21, 40, 24],
33
+ ["Q", 26, 27, 24, 41],
34
+ ["Q", 21, 27, 8, 24],
35
+ ["Q", 21, 21, 24, 7],
36
+ ["Z"]
37
+ ],
38
+ "style": {
39
+ "fill": "#ffe4a1",
40
+ "stroke": "#dca456",
41
+ "strokeWidth": 1.5,
42
+ "linecap": "round",
43
+ "linejoin": "round"
44
+ }
45
+ },
46
+ {
47
+ "id": "core",
48
+ "kind": "ellipse",
49
+ "cx": 24,
50
+ "cy": 24,
51
+ "rx": 3,
52
+ "ry": 3,
53
+ "style": {
54
+ "fill": "#ffffff"
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ ],
60
+ "params": {
61
+ "turn": {
62
+ "default": 0,
63
+ "min": -10,
64
+ "max": 10
65
+ }
66
+ },
67
+ "animations": {
68
+ "idle": {
69
+ "duration": 2,
70
+ "loop": true,
71
+ "tracks": {
72
+ "turn": [
73
+ {
74
+ "time": 0,
75
+ "value": -8,
76
+ "ease": "smooth"
77
+ },
78
+ {
79
+ "time": 1,
80
+ "value": 8,
81
+ "ease": "smooth"
82
+ },
83
+ {
84
+ "time": 2,
85
+ "value": -8
86
+ }
87
+ ]
88
+ }
89
+ }
90
+ },
91
+ "defaultAnimation": "idle"
92
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "schema": "svg-asset/0.1",
3
+ "name": "The cold wisp",
4
+ "viewBox": [0, 0, 64, 64],
5
+ "nodes": [
6
+ {
7
+ "id": "aura",
8
+ "kind": "ellipse",
9
+ "cx": 32,
10
+ "cy": 32,
11
+ "rx": 24,
12
+ "ry": 23,
13
+ "style": {
14
+ "fill": "#88c6f8"
15
+ },
16
+ "opacity": 0.2,
17
+ "blur": 4
18
+ },
19
+ {
20
+ "id": "body",
21
+ "kind": "path",
22
+ "d": [
23
+ ["M", 14, 41],
24
+ ["C", 5, 25, 25, 18, 30, 8],
25
+ ["C", 30, 20, 55, 19, 51, 37],
26
+ ["Q", 51, 45, 43, 50],
27
+ ["L", 37, 43],
28
+ ["L", 30, 52],
29
+ ["L", 25, 43],
30
+ ["L", 17, 50],
31
+ ["Z"]
32
+ ],
33
+ "style": {
34
+ "fill": "#94d5e8",
35
+ "stroke": "#cce9ef",
36
+ "strokeWidth": 1.5,
37
+ "linecap": "round",
38
+ "linejoin": "round"
39
+ }
40
+ },
41
+ {
42
+ "id": "eyes",
43
+ "kind": "group",
44
+ "transform": {
45
+ "translate": ["$look", 0]
46
+ },
47
+ "children": [
48
+ {
49
+ "id": "left",
50
+ "kind": "ellipse",
51
+ "cx": 25,
52
+ "cy": 32,
53
+ "rx": 3,
54
+ "ry": 5,
55
+ "style": {
56
+ "fill": "#26465f"
57
+ }
58
+ },
59
+ {
60
+ "id": "right",
61
+ "kind": "ellipse",
62
+ "cx": 39,
63
+ "cy": 32,
64
+ "rx": 3,
65
+ "ry": 5,
66
+ "style": {
67
+ "fill": "#26465f"
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ],
73
+ "params": {
74
+ "look": {
75
+ "default": 0,
76
+ "min": -2,
77
+ "max": 2
78
+ }
79
+ },
80
+ "animations": {
81
+ "idle": {
82
+ "duration": 2,
83
+ "loop": true,
84
+ "tracks": {
85
+ "look": [
86
+ {
87
+ "time": 0,
88
+ "value": -2,
89
+ "ease": "smooth"
90
+ },
91
+ {
92
+ "time": 1,
93
+ "value": 2,
94
+ "ease": "smooth"
95
+ },
96
+ {
97
+ "time": 2,
98
+ "value": -2
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ "defaultAnimation": "idle"
105
+ }