claude-exode-mcp 7.5.7 → 7.5.8
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/MCP_DOCUMENTATION.md +1 -0
- package/SKILL.md +10 -0
- package/examples/aurum-product-page.exode +3208 -0
- package/examples/bell-ring-icon.exode +1 -0
- package/examples/drift-kinetic-type.exode +770 -0
- package/examples/earbuds-product.exode +214 -0
- package/examples/energy-flow.exode +1736 -0
- package/examples/flux-hero.exode +223 -0
- package/examples/gooey-toggle.exode +214 -0
- package/examples/gravity-well.exode +3113 -0
- package/examples/heart-icon.exode +1 -0
- package/examples/hologram-temple.exode +8100 -0
- package/examples/jarful-app.exode +1 -0
- package/examples/kip-character-rig.exode +1 -0
- package/examples/low-tide-tilt.exode +2216 -0
- package/examples/manifest.json +352 -0
- package/examples/swipe-stack-carousel.exode +4048 -0
- package/examples/tokyo-neon-weather.exode +470 -0
- package/examples/typographic-collapse.exode +1578 -0
- package/examples/void-product-ad.exode +1269 -0
- package/examples/wire-globe-card.exode +580 -0
- package/index.d.ts +41 -1
- package/index.js +2553 -2407
- package/package.json +4 -2
- package/render-runtime/exode-runtime.js +20 -20
- package/skills/creative-motion/SKILL.md +10 -0
- package/skills/creative-motion/recipes/character-rig.js +104 -0
- package/skills/creative-motion/recipes/dashboard.js +120 -0
- package/skills/creative-motion/recipes/game-arcade.js +203 -0
- package/skills/creative-motion/recipes/hero-physics.js +65 -0
- package/skills/creative-motion/recipes/pricing.js +88 -0
- package/skills/creative-motion/recipes/title-sequence.js +62 -0
- package/skills/creative-motion/references/apps.md +37 -0
- package/skills/creative-motion/references/gotchas.md +80 -0
- package/skills/creative-motion/references/native-layers.md +60 -0
- package/skills/creative-motion/references/quality.md +54 -0
- package/src/__tests__/buildKit.test.ts +127 -0
- package/src/__tests__/effectKnobs.test.ts +162 -0
- package/src/__tests__/nativeLayers.test.ts +178 -0
- package/src/buildKit.d.ts +301 -0
- package/src/buildKit.d.ts.map +1 -0
- package/src/buildKit.js +559 -0
- package/src/buildKit.js.map +1 -0
- package/src/buildKit.ts +520 -0
- package/src/compiler.d.ts +4 -0
- package/src/compiler.d.ts.map +1 -1
- package/src/compiler.js +21 -45
- package/src/compiler.js.map +1 -1
- package/src/compiler.ts +22 -51
- package/src/critique.d.ts +8 -0
- package/src/critique.d.ts.map +1 -0
- package/src/critique.js +348 -0
- package/src/critique.js.map +1 -0
- package/src/critique.ts +239 -0
- package/src/effectKnobs.d.ts +72 -0
- package/src/effectKnobs.d.ts.map +1 -0
- package/src/effectKnobs.js +541 -0
- package/src/effectKnobs.js.map +1 -0
- package/src/effectKnobs.ts +445 -0
- package/src/effectOptimizer.d.ts +18 -0
- package/src/effectOptimizer.d.ts.map +1 -0
- package/src/effectOptimizer.js +125 -0
- package/src/effectOptimizer.js.map +1 -0
- package/src/effectOptimizer.ts +104 -0
- package/src/engine/layout.js +1 -1
- package/src/engine/layout.js.map +1 -1
- package/src/engine/layout.ts +1 -1
- package/src/examples.d.ts +30 -0
- package/src/examples.d.ts.map +1 -0
- package/src/examples.js +168 -0
- package/src/examples.js.map +1 -0
- package/src/examples.ts +151 -0
- package/src/handlers/artboardHandlers.d.ts.map +1 -1
- package/src/handlers/artboardHandlers.js +45 -10
- package/src/handlers/artboardHandlers.js.map +1 -1
- package/src/handlers/artboardHandlers.ts +43 -12
- package/src/handlers/buildHandlers.d.ts +2 -0
- package/src/handlers/buildHandlers.d.ts.map +1 -0
- package/src/handlers/buildHandlers.js +86 -0
- package/src/handlers/buildHandlers.js.map +1 -0
- package/src/handlers/buildHandlers.ts +76 -0
- package/src/handlers/compilerHandlers.d.ts.map +1 -1
- package/src/handlers/compilerHandlers.js +32 -2
- package/src/handlers/compilerHandlers.js.map +1 -1
- package/src/handlers/compilerHandlers.ts +31 -2
- package/src/handlers/exampleHandlers.d.ts +2 -0
- package/src/handlers/exampleHandlers.d.ts.map +1 -0
- package/src/handlers/exampleHandlers.js +81 -0
- package/src/handlers/exampleHandlers.js.map +1 -0
- package/src/handlers/exampleHandlers.ts +76 -0
- package/src/handlers/renderHandlers.d.ts.map +1 -1
- package/src/handlers/renderHandlers.js +100 -2
- package/src/handlers/renderHandlers.js.map +1 -1
- package/src/handlers/renderHandlers.ts +90 -2
- package/src/handlers/scaffoldHandlers.d.ts.map +1 -1
- package/src/handlers/scaffoldHandlers.js +3 -0
- package/src/handlers/scaffoldHandlers.js.map +1 -1
- package/src/handlers/scaffoldHandlers.ts +2 -0
- package/src/handlers/widgetHandlers.js +1 -1
- package/src/handlers/widgetHandlers.js.map +1 -1
- package/src/handlers/widgetHandlers.ts +1 -1
- package/src/lottie/convert.d.ts +16 -0
- package/src/lottie/convert.d.ts.map +1 -0
- package/src/lottie/convert.js +1225 -0
- package/src/lottie/convert.js.map +1 -0
- package/src/lottie/convert.ts +1134 -0
- package/src/lottie/evaluate.d.ts +48 -0
- package/src/lottie/evaluate.d.ts.map +1 -0
- package/src/lottie/evaluate.js +174 -0
- package/src/lottie/evaluate.js.map +1 -0
- package/src/lottie/evaluate.ts +184 -0
- package/src/nativeLayers.d.ts +76 -0
- package/src/nativeLayers.d.ts.map +1 -0
- package/src/nativeLayers.js +404 -0
- package/src/nativeLayers.js.map +1 -0
- package/src/nativeLayers.ts +339 -0
- package/src/render/motionBrief.d.ts.map +1 -1
- package/src/render/motionBrief.js +4 -0
- package/src/render/motionBrief.js.map +1 -1
- package/src/render/motionBrief.ts +4 -0
- package/src/render/videoRenderer.d.ts.map +1 -1
- package/src/render/videoRenderer.js +5 -2
- package/src/render/videoRenderer.js.map +1 -1
- package/src/render/videoRenderer.ts +5 -2
- package/src/rive/convert.d.ts +17 -0
- package/src/rive/convert.d.ts.map +1 -0
- package/src/rive/convert.js +1779 -0
- package/src/rive/convert.js.map +1 -0
- package/src/rive/convert.ts +1492 -0
- package/src/rive/font.d.ts +13 -0
- package/src/rive/font.d.ts.map +1 -0
- package/src/rive/font.js +154 -0
- package/src/rive/font.js.map +1 -0
- package/src/rive/font.ts +132 -0
- package/src/rive/layout.d.ts +20 -0
- package/src/rive/layout.d.ts.map +1 -0
- package/src/rive/layout.js +145 -0
- package/src/rive/layout.js.map +1 -0
- package/src/rive/layout.ts +140 -0
- package/src/rive/reader.d.ts +32 -0
- package/src/rive/reader.d.ts.map +1 -0
- package/src/rive/reader.js +172 -0
- package/src/rive/reader.js.map +1 -0
- package/src/rive/reader.ts +160 -0
- package/src/rive/schema.generated.d.ts +9 -0
- package/src/rive/schema.generated.d.ts.map +1 -0
- package/src/rive/schema.generated.js +13 -0
- package/src/rive/schema.generated.js.map +1 -0
- package/src/rive/schema.generated.ts +13 -0
- package/src/schema.d.ts +5 -0
- package/src/schema.d.ts.map +1 -1
- package/src/schema.js +5 -0
- package/src/schema.js.map +1 -1
- package/src/schema.ts +6 -0
- package/src/serverInstructions.d.ts +2 -0
- package/src/serverInstructions.d.ts.map +1 -0
- package/src/serverInstructions.js +22 -0
- package/src/serverInstructions.js.map +1 -0
- package/src/serverInstructions.ts +21 -0
- package/src/sseServer.d.ts +2 -0
- package/src/sseServer.d.ts.map +1 -0
- package/src/sseServer.js +165 -0
- package/src/sseServer.js.map +1 -0
- package/src/sseServer.ts +189 -0
- package/src/utils.d.ts.map +1 -1
- package/src/utils.js +23 -1
- package/src/utils.js.map +1 -1
- package/src/utils.ts +13 -1
- package/src/widgets.d.ts +26 -0
- package/src/widgets.d.ts.map +1 -1
- package/src/widgets.js +89 -45
- package/src/widgets.js.map +1 -1
- package/src/widgets.ts +88 -45
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "03_tokyo_neon",
|
|
3
|
+
"name": "Tokyo Neon Rain",
|
|
4
|
+
"width": 720,
|
|
5
|
+
"height": 520,
|
|
6
|
+
"cornerRadius": 0,
|
|
7
|
+
"deviceFrame": "none",
|
|
8
|
+
"fit": "Layout",
|
|
9
|
+
"responsive": {
|
|
10
|
+
"enabled": true,
|
|
11
|
+
"mode": "constraint",
|
|
12
|
+
"width": {
|
|
13
|
+
"type": "fixed"
|
|
14
|
+
},
|
|
15
|
+
"height": {
|
|
16
|
+
"type": "fixed"
|
|
17
|
+
},
|
|
18
|
+
"maintainAspectRatio": false,
|
|
19
|
+
"scaleObjects": false,
|
|
20
|
+
"breakpoints": [
|
|
21
|
+
{
|
|
22
|
+
"id": "bp_mobile",
|
|
23
|
+
"name": "Mobile",
|
|
24
|
+
"minWidth": 0,
|
|
25
|
+
"maxWidth": 599
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "bp_tablet",
|
|
29
|
+
"name": "Tablet",
|
|
30
|
+
"minWidth": 600,
|
|
31
|
+
"maxWidth": 1023
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "bp_desktop",
|
|
35
|
+
"name": "Desktop",
|
|
36
|
+
"minWidth": 1024
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"backgroundColor": "#f4f1ea",
|
|
41
|
+
"opacity": 1,
|
|
42
|
+
"x": -360,
|
|
43
|
+
"y": -260,
|
|
44
|
+
"stateMachine": {
|
|
45
|
+
"inputs": [
|
|
46
|
+
{
|
|
47
|
+
"id": "city",
|
|
48
|
+
"name": "city",
|
|
49
|
+
"value": {
|
|
50
|
+
"type": "Text",
|
|
51
|
+
"value": "Shinjuku, Tokyo",
|
|
52
|
+
"defaultValue": "Shinjuku, Tokyo"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "condition",
|
|
57
|
+
"name": "condition",
|
|
58
|
+
"value": {
|
|
59
|
+
"type": "Text",
|
|
60
|
+
"value": "Heavy rain 12mm/h · tap",
|
|
61
|
+
"defaultValue": "Heavy rain 12mm/h · tap"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "tempC",
|
|
66
|
+
"name": "tempC",
|
|
67
|
+
"value": {
|
|
68
|
+
"type": "Number",
|
|
69
|
+
"value": 18,
|
|
70
|
+
"defaultValue": 18,
|
|
71
|
+
"min": -60,
|
|
72
|
+
"max": 60
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "unit",
|
|
77
|
+
"name": "unit",
|
|
78
|
+
"value": {
|
|
79
|
+
"type": "Text",
|
|
80
|
+
"value": "C",
|
|
81
|
+
"defaultValue": "C"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "bgColor",
|
|
86
|
+
"name": "bgColor",
|
|
87
|
+
"value": {
|
|
88
|
+
"type": "Color",
|
|
89
|
+
"value": "#07060d",
|
|
90
|
+
"defaultValue": "#07060d"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "neonColor",
|
|
95
|
+
"name": "neonColor",
|
|
96
|
+
"value": {
|
|
97
|
+
"type": "Color",
|
|
98
|
+
"value": "#ff5ee4",
|
|
99
|
+
"defaultValue": "#ff5ee4"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "neonGlow",
|
|
104
|
+
"name": "neonGlow",
|
|
105
|
+
"value": {
|
|
106
|
+
"type": "Color",
|
|
107
|
+
"value": "#ff2bd6",
|
|
108
|
+
"defaultValue": "#ff2bd6"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "accent",
|
|
113
|
+
"name": "accent",
|
|
114
|
+
"value": {
|
|
115
|
+
"type": "Color",
|
|
116
|
+
"value": "#00e5ff",
|
|
117
|
+
"defaultValue": "#00e5ff"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "textColor",
|
|
122
|
+
"name": "textColor",
|
|
123
|
+
"value": {
|
|
124
|
+
"type": "Color",
|
|
125
|
+
"value": "#c9fbff",
|
|
126
|
+
"defaultValue": "#c9fbff"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "cityColor",
|
|
131
|
+
"name": "cityColor",
|
|
132
|
+
"value": {
|
|
133
|
+
"type": "Color",
|
|
134
|
+
"value": "#ff7eea",
|
|
135
|
+
"defaultValue": "#ff7eea"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "signTop",
|
|
140
|
+
"name": "signTop",
|
|
141
|
+
"value": {
|
|
142
|
+
"type": "Text",
|
|
143
|
+
"value": "雨",
|
|
144
|
+
"defaultValue": "雨"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "signBottom",
|
|
149
|
+
"name": "signBottom",
|
|
150
|
+
"value": {
|
|
151
|
+
"type": "Text",
|
|
152
|
+
"value": "夜",
|
|
153
|
+
"defaultValue": "夜"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "radius",
|
|
158
|
+
"name": "radius",
|
|
159
|
+
"value": {
|
|
160
|
+
"type": "Number",
|
|
161
|
+
"value": 22,
|
|
162
|
+
"defaultValue": 22,
|
|
163
|
+
"min": 0,
|
|
164
|
+
"max": 60
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "intensity",
|
|
169
|
+
"name": "intensity",
|
|
170
|
+
"value": {
|
|
171
|
+
"type": "Number",
|
|
172
|
+
"value": 1,
|
|
173
|
+
"defaultValue": 1,
|
|
174
|
+
"min": 0,
|
|
175
|
+
"max": 2
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "lift",
|
|
180
|
+
"name": "lift",
|
|
181
|
+
"value": {
|
|
182
|
+
"type": "Number",
|
|
183
|
+
"value": 8,
|
|
184
|
+
"defaultValue": 8,
|
|
185
|
+
"min": 0,
|
|
186
|
+
"max": 24
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "interactive",
|
|
191
|
+
"name": "interactive",
|
|
192
|
+
"value": {
|
|
193
|
+
"type": "Boolean",
|
|
194
|
+
"value": true,
|
|
195
|
+
"defaultValue": true
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "tilt",
|
|
200
|
+
"name": "tilt",
|
|
201
|
+
"value": {
|
|
202
|
+
"type": "Number",
|
|
203
|
+
"value": 0,
|
|
204
|
+
"defaultValue": 0,
|
|
205
|
+
"min": 0,
|
|
206
|
+
"max": 12
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "press",
|
|
211
|
+
"name": "press",
|
|
212
|
+
"value": {
|
|
213
|
+
"type": "Number",
|
|
214
|
+
"value": 1,
|
|
215
|
+
"defaultValue": 1,
|
|
216
|
+
"min": 0,
|
|
217
|
+
"max": 2
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "float",
|
|
222
|
+
"name": "float",
|
|
223
|
+
"value": {
|
|
224
|
+
"type": "Number",
|
|
225
|
+
"value": 3,
|
|
226
|
+
"defaultValue": 3,
|
|
227
|
+
"min": 0,
|
|
228
|
+
"max": 12
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "speed",
|
|
233
|
+
"name": "speed",
|
|
234
|
+
"value": {
|
|
235
|
+
"type": "Number",
|
|
236
|
+
"value": 1,
|
|
237
|
+
"defaultValue": 1,
|
|
238
|
+
"min": 0,
|
|
239
|
+
"max": 3
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "intro",
|
|
244
|
+
"name": "intro",
|
|
245
|
+
"value": {
|
|
246
|
+
"type": "Boolean",
|
|
247
|
+
"value": true,
|
|
248
|
+
"defaultValue": true
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "introStyle",
|
|
253
|
+
"name": "introStyle",
|
|
254
|
+
"value": {
|
|
255
|
+
"type": "Text",
|
|
256
|
+
"value": "rise",
|
|
257
|
+
"defaultValue": "rise"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "introDuration",
|
|
262
|
+
"name": "introDuration",
|
|
263
|
+
"value": {
|
|
264
|
+
"type": "Number",
|
|
265
|
+
"value": 1.2,
|
|
266
|
+
"defaultValue": 1.2,
|
|
267
|
+
"min": 0.2,
|
|
268
|
+
"max": 3
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "colorTween",
|
|
273
|
+
"name": "colorTween",
|
|
274
|
+
"value": {
|
|
275
|
+
"type": "Number",
|
|
276
|
+
"value": 0.6,
|
|
277
|
+
"defaultValue": 0.6,
|
|
278
|
+
"min": 0,
|
|
279
|
+
"max": 3
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "pageMode",
|
|
284
|
+
"name": "pageMode",
|
|
285
|
+
"value": {
|
|
286
|
+
"type": "Text",
|
|
287
|
+
"value": "solid",
|
|
288
|
+
"defaultValue": "solid"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"id": "pageTop",
|
|
293
|
+
"name": "pageTop",
|
|
294
|
+
"value": {
|
|
295
|
+
"type": "Color",
|
|
296
|
+
"value": "#f4f1ea",
|
|
297
|
+
"defaultValue": "#f4f1ea"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"id": "pageBottom",
|
|
302
|
+
"name": "pageBottom",
|
|
303
|
+
"value": {
|
|
304
|
+
"type": "Color",
|
|
305
|
+
"value": "#ddd5c4",
|
|
306
|
+
"defaultValue": "#ddd5c4"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "replay",
|
|
311
|
+
"name": "replay",
|
|
312
|
+
"value": {
|
|
313
|
+
"type": "Trigger",
|
|
314
|
+
"value": false,
|
|
315
|
+
"defaultValue": false
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"id": "tap",
|
|
320
|
+
"name": "tap",
|
|
321
|
+
"value": {
|
|
322
|
+
"type": "Trigger",
|
|
323
|
+
"value": false,
|
|
324
|
+
"defaultValue": false
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"layers": [
|
|
329
|
+
{
|
|
330
|
+
"name": "Base Layer",
|
|
331
|
+
"entryStateId": "state_idle",
|
|
332
|
+
"states": [
|
|
333
|
+
{
|
|
334
|
+
"id": "state_idle",
|
|
335
|
+
"name": "Idle",
|
|
336
|
+
"transitions": []
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"logicNodes": []
|
|
342
|
+
},
|
|
343
|
+
"physics": {
|
|
344
|
+
"enabled": false,
|
|
345
|
+
"gravity": {
|
|
346
|
+
"x": 0,
|
|
347
|
+
"y": 9.8
|
|
348
|
+
},
|
|
349
|
+
"wind": {
|
|
350
|
+
"x": 0,
|
|
351
|
+
"y": 0
|
|
352
|
+
},
|
|
353
|
+
"timeScale": 1,
|
|
354
|
+
"collideWithBounds": true,
|
|
355
|
+
"joints": []
|
|
356
|
+
},
|
|
357
|
+
"guides": {
|
|
358
|
+
"horizontal": [],
|
|
359
|
+
"vertical": []
|
|
360
|
+
},
|
|
361
|
+
"animations": [
|
|
362
|
+
{
|
|
363
|
+
"id": "anim_03_tokyo_neon_onload",
|
|
364
|
+
"name": "onLoad",
|
|
365
|
+
"duration": 3,
|
|
366
|
+
"tracks": []
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"layoutProps": {
|
|
370
|
+
"mode": "linear",
|
|
371
|
+
"direction": "vertical",
|
|
372
|
+
"gap": 0,
|
|
373
|
+
"padding": {
|
|
374
|
+
"top": 0,
|
|
375
|
+
"right": 0,
|
|
376
|
+
"bottom": 0,
|
|
377
|
+
"left": 0
|
|
378
|
+
},
|
|
379
|
+
"alignItems": "stretch",
|
|
380
|
+
"layoutSizingHorizontal": "fixed",
|
|
381
|
+
"layoutSizingVertical": "fixed"
|
|
382
|
+
},
|
|
383
|
+
"animationFlow": [],
|
|
384
|
+
"navigation": [],
|
|
385
|
+
"stateVariables": [],
|
|
386
|
+
"lastModified": 1793007564857,
|
|
387
|
+
"logicEditorNodes": [],
|
|
388
|
+
"logicEditorEdges": [],
|
|
389
|
+
"stickyNotes": [],
|
|
390
|
+
"objects": [
|
|
391
|
+
{
|
|
392
|
+
"id": "03_tokyo_neon_stage",
|
|
393
|
+
"name": "Tokyo Neon Rain",
|
|
394
|
+
"type": "Group",
|
|
395
|
+
"transform": {
|
|
396
|
+
"x": 360,
|
|
397
|
+
"y": 260,
|
|
398
|
+
"rotation": 0,
|
|
399
|
+
"scale_x": 1,
|
|
400
|
+
"scale_y": 1,
|
|
401
|
+
"opacity": 1,
|
|
402
|
+
"skew_x": 0,
|
|
403
|
+
"skew_y": 0
|
|
404
|
+
},
|
|
405
|
+
"width": 720,
|
|
406
|
+
"height": 520,
|
|
407
|
+
"geometry": {
|
|
408
|
+
"type": "Rectangle",
|
|
409
|
+
"width": 720,
|
|
410
|
+
"height": 520,
|
|
411
|
+
"cornerRadius": 0
|
|
412
|
+
},
|
|
413
|
+
"cornerRadius": 0,
|
|
414
|
+
"children": [],
|
|
415
|
+
"clipContent": true,
|
|
416
|
+
"style": {
|
|
417
|
+
"fill": {
|
|
418
|
+
"type": "Solid",
|
|
419
|
+
"color": "#f4f1ea",
|
|
420
|
+
"opacity": 0
|
|
421
|
+
},
|
|
422
|
+
"effects": [
|
|
423
|
+
{
|
|
424
|
+
"id": "fx",
|
|
425
|
+
"type": "CustomEffect",
|
|
426
|
+
"name": "tokyo-neon",
|
|
427
|
+
"isEnabled": true,
|
|
428
|
+
"params": {
|
|
429
|
+
"city": "Shinjuku, Tokyo",
|
|
430
|
+
"condition": "Heavy rain 12mm/h · tap",
|
|
431
|
+
"tempC": 18,
|
|
432
|
+
"unit": "C",
|
|
433
|
+
"bgColor": "#07060d",
|
|
434
|
+
"neonColor": "#ff5ee4",
|
|
435
|
+
"neonGlow": "#ff2bd6",
|
|
436
|
+
"accent": "#00e5ff",
|
|
437
|
+
"textColor": "#c9fbff",
|
|
438
|
+
"cityColor": "#ff7eea",
|
|
439
|
+
"signTop": "雨",
|
|
440
|
+
"signBottom": "夜",
|
|
441
|
+
"radius": 22,
|
|
442
|
+
"intensity": 1,
|
|
443
|
+
"lift": 8,
|
|
444
|
+
"interactive": true,
|
|
445
|
+
"tilt": 0,
|
|
446
|
+
"press": 1,
|
|
447
|
+
"float": 3,
|
|
448
|
+
"speed": 1,
|
|
449
|
+
"intro": true,
|
|
450
|
+
"introStyle": "rise",
|
|
451
|
+
"introDuration": 1.2,
|
|
452
|
+
"colorTween": 0.6,
|
|
453
|
+
"pageMode": "solid",
|
|
454
|
+
"pageTop": "#f4f1ea",
|
|
455
|
+
"pageBottom": "#ddd5c4"
|
|
456
|
+
},
|
|
457
|
+
"code": "export const name = \"Tokyo Neon Rain\";\nexport const params = {\n city: { value: \"Shinjuku, Tokyo\", label: \"City\" },\n condition: { value: \"Heavy rain 12mm/h · tap\", label: \"Condition\" },\n tempC: { value: 18, min: -60, max: 60, step: 1, label: \"Temperature (°C)\" },\n unit: { value: \"C\", options: [\"C\", \"F\"], label: \"Unit\" },\n bgColor: { value: \"#07060d\", label: \"Background\" },\n neonColor: { value: \"#ff5ee4\", label: \"Neon sign\" },\n neonGlow: { value: \"#ff2bd6\", label: \"Neon glow\" },\n accent: { value: \"#00e5ff\", label: \"Temperature glow\" },\n textColor: { value: \"#c9fbff\", label: \"Temperature\" },\n cityColor: { value: \"#ff7eea\", label: \"City text\" },\n signTop: { value: \"雨\", label: \"Sign character 1\" },\n signBottom: { value: \"夜\", label: \"Sign character 2\" },\n radius: { value: 22, min: 0, max: 60, step: 1, label: \"Corner radius\" },\n intensity: { value: 1, min: 0, max: 2, step: 0.1, label: \"Particle intensity\" },\n lift: { value: 8, min: 0, max: 24, step: 1, label: \"Hover lift\" },\n interactive: { value: true, label: \"Mouse interaction\" },\n tilt: { value: 0, min: 0, max: 12, step: 0.5, label: \"Hover tilt (deg, 0 = off)\" },\n press: { value: 1, min: 0, max: 2, step: 0.1, label: \"Press squish\" },\n float: { value: 3, min: 0, max: 12, step: 0.5, label: \"Idle float (px)\" },\n speed: { value: 1, min: 0, max: 3, step: 0.1, label: \"Animation speed\" },\n intro: { value: true, label: \"Entrance animation\" },\n introStyle: { value: \"rise\", options: [\"rise\", \"drop\", \"zoom\", \"swing\", \"slide\", \"none\"], label: \"Entrance style\" },\n introDuration: { value: 1.2, min: 0.2, max: 3, step: 0.1, label: \"Entrance duration (s)\" },\n colorTween: { value: 0.6, min: 0, max: 3, step: 0.1, label: \"Colour change fade (s)\" },\n pageMode: { value: \"solid\", options: [\"solid\", \"gradient\", \"none\"], label: \"Page background\" },\n pageTop: { value: \"#f4f1ea\", label: \"Page colour\" },\n pageBottom: { value: \"#ddd5c4\", label: \"Page gradient end\" }\n};\nlet S = null;\nlet KS = null;\nfunction rr(ctx, x, y, w, h, r) {\n r = Math.max(0, Math.min(r, w / 2, h / 2));\n ctx.beginPath();\n ctx.moveTo(x + r, y); ctx.lineTo(x + w - r, y); ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r); ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h); ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r); ctx.arcTo(x, y, x + r, y, r); ctx.closePath();\n}\nfunction rnd(i) { const s = Math.sin(i * 127.1 + 311.7) * 43758.5453; return s - Math.floor(s); }\n/* accepts #rgb, #rrggbb, #rrggbbaa, rgb() and rgba() */\nfunction hx(c) {\n c = String(c).trim();\n if (c.charAt(0) === '#') {\n let h = c.slice(1);\n if (h.length === 3 || h.length === 4) h = h.split('').map(function (ch) { return ch + ch; }).join('');\n const n = parseInt(h.slice(0, 6), 16) || 0;\n return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n }\n const m = c.match(/[\\d.]+/g);\n return m && m.length >= 3 ? [Number(m[0]), Number(m[1]), Number(m[2])] : [0, 0, 0];\n}\nfunction isCol(v) { return typeof v === 'string' && /^(#[0-9a-f]{3,8}|rgba?\\()/i.test(v.trim()); }\nfunction mix(a, b, k) { const A = hx(a), B = hx(b); const r = A.map(function (v, i) { return Math.round(v + (B[i] - v) * k); }); return 'rgb(' + r[0] + ',' + r[1] + ',' + r[2] + ')'; }\nfunction deg(c, f) { const v = f ? Math.round(c * 9 / 5 + 32) : Math.round(c); return String(v).replace('-', '−') + '°'; }\nfunction ease(k) { return 1 - Math.pow(1 - k, 3); }\nfunction back(k) { const s = 1.7; k = k - 1; return 1 + k * k * ((s + 1) * k + s); }\n/* reads every param. A state machine input with the same name wins once it differs\n from the file default, so the editor panel keeps working and hosts can drive it live.\n Colour changes cross-fade; text changes replay the sheen. */\nfunction cfg(env, defs) {\n if (!KS) KS = { col: {}, txt: {}, sheen: -9 };\n const out = {}, now = env.time;\n for (const k in defs) {\n const d0 = defs[k] && typeof defs[k] === 'object' && 'value' in defs[k] ? defs[k].value : defs[k];\n let v = env.params ? env.params[k] : undefined;\n if (v && typeof v === 'object' && 'value' in v) v = v.value;\n const iv = env.inputs ? env.inputs[k] : undefined;\n if (iv !== undefined && iv !== null && iv !== '' && String(iv) !== String(d0)) v = iv;\n if (v === undefined || v === null || v === '') v = d0;\n if (typeof d0 === 'number') { const n = Number(v); v = isNaN(n) ? d0 : n; }\n else if (typeof d0 === 'boolean') v = v === true || v === 'true' || v === 1;\n else v = String(v);\n out[k] = v;\n }\n const tw = Math.max(0.01, out.colorTween === undefined ? 0.6 : out.colorTween);\n for (const k in out) {\n const v = out[k];\n if (isCol(v)) {\n let s = KS.col[k];\n if (!s) s = KS.col[k] = { from: v, to: v, t0: -99 };\n if (s.to !== v) { s.from = s.cur || s.to; s.to = v; s.t0 = now; }\n const p = Math.min(1, (now - s.t0) / tw);\n s.cur = p >= 1 ? v : mix(s.from, s.to, ease(p));\n out[k] = s.cur;\n } else if (typeof v === 'string' && k !== 'unit' && k !== 'introStyle' && k !== 'pageMode') {\n if (KS.txt[k] !== undefined && KS.txt[k] !== v) KS.sheen = now;\n KS.txt[k] = v;\n }\n }\n return out;\n}\n/* hover, tap (pointer or 'tap' trigger), unit, temperature tween, entrance and sheen timing */\nfunction card(S, env, P) {\n const now = env.time, inp = env.inputs || {};\n if (S.t0 === undefined) { S.t0 = now; S.tilt = 0; S.press = 0; S.tFrom = P.tempC; S.tTo = P.tempC; S.tt0 = -99; S.trg = {}; }\n if (S.unit !== P.unit) { S.unit = P.unit; S.f = P.unit === 'F'; }\n const trig = function (n) { const v = !!inp[n]; const r = v && !S.trg[n]; S.trg[n] = v; return r; };\n if (trig('replay')) S.t0 = now;\n /* interactive off: the piece ignores the pointer (hover, tilt, parallax, press, click);\n the tap and replay triggers still work from code */\n const pt = P.interactive === false ? {} : (env.pointer || {});\n const over = !!pt.isHovered && Math.abs(pt.x || 0) <= 150 && Math.abs(pt.y || 0) <= 180;\n S.lift += ((over ? 1 : 0) - S.lift) * 0.12;\n S.tilt += ((over ? (pt.x || 0) / 150 : 0) - S.tilt) * 0.1;\n const down = !!pt.isDown;\n const tap = (down && !S.wasDown && over) || trig('tap');\n S.wasDown = down;\n S.press += ((down && over ? 1 : 0) - S.press) * 0.3;\n if (S.tTo !== P.tempC) { S.tFrom = S.tShown === undefined ? S.tTo : S.tShown; S.tTo = P.tempC; S.tt0 = now; }\n const tp = Math.min(1, (now - S.tt0) / 0.9);\n S.tShown = S.tFrom + (S.tTo - S.tFrom) * ease(tp);\n const k = P.intro && P.introStyle !== 'none' ? Math.min(1, Math.max(0, (now - S.t0) / Math.max(0.05, P.introDuration))) : 1;\n const e = ease(k);\n const L = S.lift * P.lift;\n const fl = P.float * Math.sin(now * P.speed * Math.PI / 2);\n const sk = Math.min(1, Math.max(0, (now - KS.sheen) / 0.9));\n return { over: over, tap: tap, L: L, px: pt.x || 0, py: pt.y || 0, k: k, e: e, sk: sk, T: -180 - L + fl,\n temp: S.tShown * Math.min(1, e * 1.04), S: S };\n}\n/* page background, then the card transform: entrance style, hover tilt, press squish */\nfunction begin(ctx, c, P) {\n const pg = ctx.createLinearGradient(0, -260, 0, 260);\n pg.addColorStop(0, P.pageTop); pg.addColorStop(1, P.pageMode === 'gradient' ? P.pageBottom : P.pageTop);\n ctx.globalAlpha = P.pageMode === 'none' ? 0 : 1;\n ctx.fillStyle = pg; ctx.fillRect(-360, -260, 720, 520);\n ctx.globalAlpha = 1;\n ctx.save();\n const k = c.k, e = c.e, st = P.introStyle;\n let dx = 0, dy = 0, s = 1, rot = 0;\n if (st === 'rise') { dy = (1 - e) * 46; s = 0.9 + 0.1 * e; }\n else if (st === 'drop') { dy = (back(k) - 1) * 90; }\n else if (st === 'zoom') { s = 0.55 + 0.45 * back(k); }\n else if (st === 'swing') { rot = (1 - back(k)) * 0.35; dy = (1 - e) * 20; }\n else if (st === 'slide') { dx = (1 - back(k)) * 140; }\n rot += c.S.tilt * P.tilt * Math.PI / 180;\n s *= 1 - 0.035 * c.S.press * P.press;\n ctx.translate(dx, dy); ctx.rotate(rot); ctx.scale(s, s);\n}\n/* entrance sheen (also replays when a text setting changes) */\nfunction end(ctx, c, P) {\n ctx.save(); rr(ctx, -150, c.T, 300, 360, P.radius === undefined ? 4 : P.radius); ctx.clip();\n const q = c.k < 1 ? c.k : c.sk;\n const sx = -260 + q * 520;\n const g = ctx.createLinearGradient(sx - 60, c.T, sx + 60, c.T + 120);\n g.addColorStop(0, 'rgba(255,255,255,0)'); g.addColorStop(0.5, 'rgba(255,255,255,0.55)'); g.addColorStop(1, 'rgba(255,255,255,0)');\n ctx.globalAlpha = q < 1 ? 0.8 * Math.sin(q * Math.PI) : 0;\n ctx.fillStyle = g; ctx.fillRect(-150, c.T, 300, 360);\n ctx.globalAlpha = 1; ctx.restore();\n ctx.restore();\n}\nfunction shadowOn(ctx, S, c) { ctx.shadowColor = c || 'rgba(20,30,60,0.35)'; ctx.shadowBlur = 30 + 20 * S.lift; ctx.shadowOffsetY = 16 + 8 * S.lift; }\nfunction shadowOff(ctx) { ctx.shadowColor = 'transparent'; ctx.shadowBlur = 0; ctx.shadowOffsetY = 0; }\nexport function render(ctx, env) {\n const P = cfg(env, params), t = env.time * P.speed;\n if (!S) S = { lift: 0, wasDown: false, flick: 0, f: false };\n const c = card(S, env, P), x0 = -150, T = c.T;\n begin(ctx, c, P);\n if (c.tap) { S.flick = 1; S.f = !S.f; }\n S.flick *= 0.93;\n const buzz = S.flick > 0.05 ? (Math.sin(t * 90) > 0 ? 1 : 0.25) : 0.92 + 0.08 * Math.sin(t * Math.PI * 4);\n shadowOn(ctx, S, 'rgba(255,0,140,0.35)');\n rr(ctx, x0, T, 300, 360, P.radius);\n ctx.fillStyle = P.bgColor; ctx.fill(); shadowOff(ctx);\n ctx.save(); rr(ctx, x0, T, 300, 360, P.radius); ctx.clip();\n /* towers */\n const tw = [[0, 120, 70], [62, 70, 54], [112, 150, 60], [178, 96, 50], [232, 132, 68]];\n for (let i = 0; i < tw.length; i++) {\n ctx.fillStyle = i % 2 ? '#120f22' : '#0d0b18';\n ctx.fillRect(x0 + tw[i][0], T + 250 - tw[i][1] - 40, tw[i][2], tw[i][1] + 40);\n }\n /* neon sign with glow */\n ctx.globalAlpha = buzz; ctx.shadowColor = P.neonGlow; ctx.shadowBlur = 22;\n rr(ctx, x0 + 214, T + 36, 52, 128, 8); ctx.strokeStyle = P.neonColor; ctx.lineWidth = 3; ctx.stroke();\n ctx.fillStyle = '#ffd1f7'; ctx.font = '700 40px Hiragino Sans, sans-serif'; ctx.textAlign = 'center';\n ctx.fillText(P.signTop, x0 + 240, T + 92); ctx.fillText(P.signBottom, x0 + 240, T + 144);\n shadowOff(ctx);\n /* puddle reflection */\n ctx.globalAlpha = 0.28 * buzz; ctx.fillStyle = P.neonColor;\n ctx.fillRect(x0 + 222, T + 268 + 2 * Math.sin(t * Math.PI * 2), 36, 4);\n ctx.fillRect(x0 + 228, T + 278 + 2 * Math.sin(t * Math.PI * 2 + 1), 24, 3);\n ctx.globalAlpha = 1;\n ctx.fillStyle = '#0b1220'; ctx.fillRect(x0, T + 250, 300, 110);\n /* rain streaks (1 s loop) */\n ctx.strokeStyle = 'rgba(120,230,255,0.55)'; ctx.lineWidth = 1.2;\n for (let i = 0; i < Math.round(20 * P.intensity); i++) {\n const p = (t + rnd(i)) % 1;\n const x = x0 + rnd(i + 9) * 320 - p * 24, y = T + p * 380 - 20;\n ctx.globalAlpha = 0.25 + 0.5 * rnd(i + 3);\n ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x - 5, y + 18); ctx.stroke();\n }\n ctx.globalAlpha = 1;\n ctx.restore();\n ctx.textAlign = 'left'; ctx.textBaseline = 'alphabetic';\n ctx.shadowColor = P.accent; ctx.shadowBlur = 16;\n ctx.fillStyle = P.textColor; ctx.font = '800 76px Avenir Next Condensed, Helvetica Neue, sans-serif';\n ctx.fillText(deg(c.temp, S.f), x0 + 22, T + 314);\n shadowOff(ctx);\n ctx.fillStyle = P.cityColor; ctx.font = '700 13px Menlo, monospace';\n ctx.fillText((P.city || 'Shinjuku, Tokyo').toUpperCase(), x0 + 24, T + 336);\n ctx.fillStyle = 'rgba(200,240,255,0.6)'; ctx.font = '500 11px Menlo, monospace';\n ctx.fillText(P.condition.toUpperCase(), x0 + 24, T + 352);\n end(ctx, c, P);\n}\n"
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
"layoutProps": {
|
|
462
|
+
"layoutSizingHorizontal": "fill",
|
|
463
|
+
"layoutSizingVertical": "fill"
|
|
464
|
+
},
|
|
465
|
+
"zIndex": 1,
|
|
466
|
+
"interactions": [],
|
|
467
|
+
"isExpanded": true
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
}
|