summer-engine 2.0.0 → 2.3.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 (62) hide show
  1. package/{marketplace.json → .claude-plugin/marketplace.json} +3 -3
  2. package/.claude-plugin/plugin.json +37 -4
  3. package/.codex-plugin/plugin.json +38 -5
  4. package/.cursor-plugin/plugin.json +37 -4
  5. package/.factory-plugin/plugin.json +20 -0
  6. package/.opencode/INSTALL.md +9 -3
  7. package/.opencode/plugins/summer.js +0 -2
  8. package/AGENTS.md +51 -0
  9. package/CLAUDE.md +5 -0
  10. package/GEMINI.md +56 -0
  11. package/README.md +211 -61
  12. package/_persona/summer/SKILL.md +113 -0
  13. package/dist/commands/install.js +2 -2
  14. package/dist/commands/setup.js +4 -0
  15. package/dist/commands/skills.js +115 -2
  16. package/dist/lib/agent-config.d.ts +2 -2
  17. package/dist/lib/agent-config.js +171 -5
  18. package/dist/lib/skills-registry.d.ts +290 -26
  19. package/dist/lib/skills-registry.js +503 -1
  20. package/dist/mcp/tools/generate-tools.js +101 -0
  21. package/gemini-extension.json +2 -2
  22. package/package.json +9 -3
  23. package/skills/2d-assets/character-portrait/SKILL.md +196 -0
  24. package/skills/2d-assets/concept-art/SKILL.md +152 -0
  25. package/skills/2d-assets/pixel-art/SKILL.md +180 -0
  26. package/skills/2d-assets/skybox-panorama/SKILL.md +207 -0
  27. package/skills/2d-assets/sprite-sheet/SKILL.md +239 -0
  28. package/skills/2d-assets/tileable-texture/SKILL.md +205 -0
  29. package/skills/2d-assets/ui-graphics/SKILL.md +210 -0
  30. package/skills/3d-assets/character-model/SKILL.md +225 -0
  31. package/skills/3d-assets/environment-kit/SKILL.md +164 -0
  32. package/skills/3d-assets/organic-model/SKILL.md +192 -0
  33. package/skills/3d-assets/prop-model/SKILL.md +133 -0
  34. package/skills/3d-assets/vehicle-model/SKILL.md +202 -0
  35. package/skills/ai-and-npcs/design-npc/SKILL.md +3 -1
  36. package/skills/animation/animation-tree/SKILL.md +260 -0
  37. package/skills/animation/facial-and-lipsync/SKILL.md +282 -0
  38. package/skills/animation/generate-motion/SKILL.md +129 -0
  39. package/skills/animation/procedural-animation/SKILL.md +234 -0
  40. package/skills/animation/retarget/SKILL.md +172 -0
  41. package/skills/asset-pipeline/asset-strategy/SKILL.md +102 -212
  42. package/skills/audio/adaptive-music/SKILL.md +326 -0
  43. package/skills/audio/ambient-bed/SKILL.md +278 -0
  44. package/skills/audio/music-track/SKILL.md +268 -0
  45. package/skills/audio/sound-effect/SKILL.md +237 -0
  46. package/skills/audio/voice-line/SKILL.md +253 -0
  47. package/skills/catalog.yaml +249 -3
  48. package/skills/video/animated-loop/SKILL.md +200 -0
  49. package/skills/video/cinematic-cutscene/SKILL.md +204 -0
  50. package/skills/video/trailer-shot/SKILL.md +203 -0
  51. package/skills/visual-effects/_building-blocks/additive-billboard-particles.md +28 -0
  52. package/skills/visual-effects/_building-blocks/noise-3d-fbm.gdshaderinc +45 -0
  53. package/skills/visual-effects/_building-blocks/trauma-shake-snippet.md +51 -0
  54. package/skills/visual-effects/{vfx → game-feel}/SKILL.md +1 -1
  55. package/skills/visual-effects/recipes/dissolve/SKILL.md +349 -0
  56. package/skills/visual-effects/recipes/fire/SKILL.md +387 -0
  57. package/skills/visual-effects/recipes/hit-spark/SKILL.md +330 -0
  58. package/skills/visual-effects/recipes/lightning/SKILL.md +372 -0
  59. package/skills/visual-effects/recipes/magic-glow/SKILL.md +377 -0
  60. package/skills/visual-effects/recipes/muzzle-flash/SKILL.md +326 -0
  61. package/skills/visual-effects/recipes/smoke/SKILL.md +381 -0
  62. package/skills/visual-effects/recipes/water-ripple/SKILL.md +340 -0
@@ -0,0 +1,330 @@
1
+ ---
2
+ name: hit-spark
3
+ description: Use when authoring a hit-spark visual effect — a one-shot burst of additive billboard particles oriented to a surface normal, fired on impact. Trigger on "hit spark", "impact spark", "bullet hit", "sword clash", "metal-on-metal", "ricochet", "impact effect", "spawn sparks at hit point".
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: visual-effects
7
+ user-invocable: true
8
+ allowed-tools: Read Write Edit summer_add_node summer_set_prop summer_set_resource_property summer_inspect_node summer_save_scene
9
+ paths: ["**/*.tscn", "**/*.gd", "**/*.gdshader", "addons/vfx/**"]
10
+ ---
11
+
12
+ # hit-spark — One-Shot Impact Sparks
13
+
14
+ Tiny stretched additive billboards spraying outward from an impact point, oriented to the surface normal so the burst points the right way. Used for: bullets hitting metal, sword clashes, footsteps on stone, ricochets, lightning endpoints, hammer strikes. The recipe is a `GPUParticles3D` configured for one-shot bursts plus a `spawn_hit_spark(position, normal)` static helper that orients the emitter, restarts it, and frees after lifetime.
15
+
16
+ ## When to use
17
+
18
+ - "Sparks when the bullet hits the wall."
19
+ - "Sword clash sparks."
20
+ - "Sparks under the hammer when the blacksmith works."
21
+ - "Footstep sparks on stone for the heavy armor."
22
+ - "Ricochet sparks when the projectile glances off."
23
+ - "Mining: sparks fly when pickaxe hits rock."
24
+ - Endpoint sparks on `lightning` and `muzzle-flash` recipes (they reference this).
25
+
26
+ ## When NOT to use
27
+
28
+ - The user wants a *flash* at the impact, not a spray of particles — use `muzzle-flash` (recolor it).
29
+ - The user wants debris chunks (rock pieces, splinters) — those are physics objects, not particles. Spawn `RigidBody3D` shards, then sparks on top.
30
+ - The user wants water droplets at a water impact — recolor this recipe blue/white (it works) or pair with `water-ripple` for the ring on the surface.
31
+ - The user wants persistent burning sparks that linger and cool down — that's a hybrid; use this for the burst, then tiny `fire` particles for residual embers.
32
+
33
+ ## Recipe
34
+
35
+ ### 1. Files to create
36
+
37
+ ```
38
+ addons/vfx/hit-spark/hit_spark.gd
39
+ addons/vfx/hit-spark/hit_spark.tscn
40
+ ```
41
+
42
+ No custom shader — uses the canonical additive billboard material (see `_building-blocks/additive-billboard-particles.md`). The default `BaseMaterial3D` with the right flags is enough.
43
+
44
+ ### 2. GDScript controller
45
+
46
+ `addons/vfx/hit-spark/hit_spark.gd`:
47
+
48
+ ```gdscript
49
+ @tool
50
+ class_name HitSpark
51
+ extends GPUParticles3D
52
+
53
+ @export_group("Spark size")
54
+ @export_range(8, 256) var spark_count: int = 24 :
55
+ set(v): spark_count = v; _apply()
56
+ @export_range(0.05, 1.5) var burst_speed: float = 0.6 :
57
+ set(v): burst_speed = v; _apply()
58
+ @export_range(0.05, 1.5) var spark_lifetime: float = 0.35 :
59
+ set(v): spark_lifetime = v; _apply()
60
+ @export_range(5.0, 90.0) var spread_degrees: float = 35.0 :
61
+ set(v): spread_degrees = v; _apply()
62
+ @export_range(0.0, 9.8) var gravity_strength: float = 4.0 :
63
+ set(v): gravity_strength = v; _apply()
64
+
65
+ @export_group("Look")
66
+ @export var spark_color: Color = Color(1.0, 0.85, 0.45)
67
+ @export_range(0.0, 12.0) var emission_boost: float = 5.0
68
+ @export var stretch_to_velocity: bool = true
69
+
70
+ func _ready() -> void:
71
+ one_shot = true
72
+ emitting = false
73
+ explosiveness = 1.0 # all particles spawn in frame 1
74
+ _apply()
75
+ _ensure_material()
76
+
77
+ func _apply() -> void:
78
+ amount = spark_count
79
+ lifetime = spark_lifetime
80
+
81
+ var pm := process_material as ParticleProcessMaterial
82
+ if pm == null:
83
+ pm = ParticleProcessMaterial.new()
84
+ process_material = pm
85
+ pm.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_POINT
86
+ pm.direction = Vector3.UP # local +Y; the controller orients the node to the surface normal
87
+ pm.spread = spread_degrees
88
+ pm.initial_velocity_min = burst_speed * 6.0
89
+ pm.initial_velocity_max = burst_speed * 12.0
90
+ pm.gravity = Vector3(0, -gravity_strength, 0)
91
+ pm.scale_min = 0.04
92
+ pm.scale_max = 0.10
93
+ pm.color = spark_color
94
+ pm.damping_min = 1.5
95
+ pm.damping_max = 3.0
96
+ if stretch_to_velocity:
97
+ pm.particle_flag_align_y = true
98
+ pm.scale_curve = _make_streak_curve()
99
+
100
+ func _ensure_material() -> void:
101
+ if draw_pass_1 == null:
102
+ var mesh := QuadMesh.new()
103
+ mesh.size = Vector2(0.08, 0.30) if stretch_to_velocity else Vector2(0.10, 0.10)
104
+ var bm := BaseMaterial3D.new()
105
+ bm.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
106
+ bm.blend_mode = BaseMaterial3D.BLEND_MODE_ADD
107
+ bm.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
108
+ bm.billboard_mode = BaseMaterial3D.BILLBOARD_PARTICLES
109
+ bm.albedo_color = spark_color
110
+ bm.emission_enabled = true
111
+ bm.emission = spark_color
112
+ bm.emission_energy_multiplier = emission_boost
113
+ mesh.material = bm
114
+ draw_pass_1 = mesh
115
+
116
+ func _make_streak_curve() -> CurveTexture:
117
+ var c := Curve.new()
118
+ c.add_point(Vector2(0.0, 1.0))
119
+ c.add_point(Vector2(0.8, 1.0))
120
+ c.add_point(Vector2(1.0, 0.0)) # shrink at end of life
121
+ var ct := CurveTexture.new()
122
+ ct.curve = c
123
+ return ct
124
+
125
+ ## Static helper. Spawns a transient one-shot burst at world `position`, oriented to `normal`.
126
+ ## parent: where to attach the spark instance (defaults to the scene tree root)
127
+ ## position: world-space impact point
128
+ ## normal: world-space surface normal at the impact
129
+ ## intensity: 0.0–1.0+ scales the burst (light tap = 0.4, heavy hit = 1.0, explosion = 1.6)
130
+ static func spawn_hit_spark(
131
+ parent: Node,
132
+ position: Vector3,
133
+ normal: Vector3 = Vector3.UP,
134
+ intensity: float = 1.0,
135
+ scene_path: String = "res://addons/vfx/hit-spark/hit_spark.tscn"
136
+ ) -> HitSpark:
137
+ if not ResourceLoader.exists(scene_path):
138
+ push_error("HitSpark: scene missing at %s" % scene_path)
139
+ return null
140
+ var inst := load(scene_path).instantiate() as HitSpark
141
+ parent.add_child(inst)
142
+ inst.global_position = position
143
+ # Orient local +Y (cone direction) to the surface normal.
144
+ if normal.length_squared() > 0.0001:
145
+ inst.look_at(position + normal, _safe_up(normal))
146
+ inst.rotate_object_local(Vector3.RIGHT, deg_to_rad(-90.0)) # because look_at uses -Z forward
147
+ inst.amount = max(4, int(inst.spark_count * intensity))
148
+ inst.restart()
149
+ inst.emitting = true
150
+ var t := inst.get_tree().create_timer(inst.spark_lifetime + 0.1)
151
+ t.timeout.connect(inst.queue_free)
152
+ return inst
153
+
154
+ static func _safe_up(n: Vector3) -> Vector3:
155
+ return Vector3.RIGHT if absf(n.dot(Vector3.UP)) > 0.99 else Vector3.UP
156
+ ```
157
+
158
+ ### 3. Node tree
159
+
160
+ ```
161
+ GPUParticles3D ("HitSpark") [script: hit_spark.gd]
162
+ ├── process_material: ParticleProcessMaterial (configured by script)
163
+ └── draw_pass_1: QuadMesh (0.08 × 0.30, additive billboard)
164
+ ```
165
+
166
+ The script builds material and process material on `_ready` if missing, so the `.tscn` can be empty besides the script.
167
+
168
+ ### 4. Wire it in (MCP calls)
169
+
170
+ This recipe is a `.tscn` you instantiate per impact, not added once to the scene. After writing the files, the rest is gameplay code:
171
+
172
+ ```
173
+ # No scene mutation — just create the .tscn at addons/vfx/hit-spark/hit_spark.tscn
174
+ # with one root GPUParticles3D node, script attached, and save it.
175
+ ```
176
+
177
+ Then from any impact handler:
178
+
179
+ ```gdscript
180
+ # Bullet impact:
181
+ var hit := space_state.intersect_ray(query)
182
+ if hit:
183
+ HitSpark.spawn_hit_spark(get_tree().root, hit.position, hit.normal, 1.0)
184
+
185
+ # Sword clash (perpendicular spray, normal = velocity reflection):
186
+ HitSpark.spawn_hit_spark(get_tree().root, clash_point, clash_normal, 0.7)
187
+
188
+ # Pickaxe on stone (heavier burst):
189
+ HitSpark.spawn_hit_spark(get_tree().root, hit_pos, hit_normal, 1.4)
190
+ ```
191
+
192
+ ### 5. Parameters to tune
193
+
194
+ | Parameter | Range | Effect |
195
+ |---|---|---|
196
+ | `spark_count` | 8–256 | particles per burst (24 is default; 64 for heavy hits) |
197
+ | `burst_speed` | 0.05–1.5 | how fast they fly outward |
198
+ | `spark_lifetime` | 0.05–1.5 s | how long visible (short = snappy, long = lingering trails) |
199
+ | `spread_degrees` | 5–90° | cone width; 35° = focused outward, 90° = hemisphere |
200
+ | `gravity_strength` | 0.0–9.8 | how much they arc downward |
201
+ | `spark_color` | Color | tint and emission color |
202
+ | `emission_boost` | 0.0–12.0 | bloom strength |
203
+ | `stretch_to_velocity` | bool | true = streaked sparks (metal); false = round dots (water) |
204
+
205
+ ## Cookbook — named variants
206
+
207
+ ### bullet-on-metal (default)
208
+
209
+ Bright orange, fast, gravity arcs them downward.
210
+
211
+ ```
212
+ spark_count = 24
213
+ burst_speed = 0.7
214
+ spark_lifetime = 0.35
215
+ spread_degrees = 35
216
+ gravity_strength = 5.0
217
+ spark_color = Color(1.0, 0.85, 0.45)
218
+ emission_boost = 5.0
219
+ stretch_to_velocity = true
220
+ ```
221
+
222
+ ### sword-clash
223
+
224
+ Wide spray, brief, white-hot.
225
+
226
+ ```
227
+ spark_count = 36
228
+ burst_speed = 0.6
229
+ spark_lifetime = 0.25
230
+ spread_degrees = 60
231
+ gravity_strength = 4.0
232
+ spark_color = Color(1.0, 0.95, 0.75)
233
+ emission_boost = 7.0
234
+ ```
235
+
236
+ ### water-droplet
237
+
238
+ No emission boost, blue-white, gravity-heavy, round dots.
239
+
240
+ ```
241
+ spark_count = 18
242
+ burst_speed = 0.5
243
+ spark_lifetime = 0.6
244
+ spread_degrees = 45
245
+ gravity_strength = 9.8
246
+ spark_color = Color(0.85, 0.95, 1.0)
247
+ emission_boost = 0.5
248
+ stretch_to_velocity = false
249
+ ```
250
+
251
+ ### blood-spurt
252
+
253
+ Recolor + heavy gravity. Pair with a small decal on the floor where they land.
254
+
255
+ ```
256
+ spark_count = 32
257
+ burst_speed = 0.8
258
+ spark_lifetime = 0.5
259
+ spread_degrees = 30
260
+ gravity_strength = 9.8
261
+ spark_color = Color(0.55, 0.05, 0.05)
262
+ emission_boost = 0.8
263
+ stretch_to_velocity = true
264
+ ```
265
+
266
+ ### electric-discharge (paired with lightning endpoints)
267
+
268
+ Cool blue, low gravity (sparks float briefly), high emission.
269
+
270
+ ```
271
+ spark_count = 20
272
+ burst_speed = 0.5
273
+ spark_lifetime = 0.20
274
+ spread_degrees = 70
275
+ gravity_strength = 1.0
276
+ spark_color = Color(0.55, 0.85, 1.0)
277
+ emission_boost = 9.0
278
+ ```
279
+
280
+ ## Anti-patterns
281
+
282
+ - **Forgetting `one_shot = true`.** Continuous-emission sparks look like a sparkler held still. One-shot + restart pattern is mandatory.
283
+ - **`explosiveness < 1.0` for a one-shot.** Particles spawn over the lifetime instead of in frame 1; the burst looks dribbly. Set `explosiveness = 1.0`.
284
+ - **Skipping the surface-normal orientation.** Sparks always shoot upward regardless of impact direction. The `spawn_hit_spark` helper handles `look_at` + the −90° rotate-around-X (because `look_at` uses −Z as forward).
285
+ - **Spawning the spark scene as a child of the impacted object.** If the object moves or frees, the sparks vanish. Spawn under the scene tree root.
286
+ - **`BLEND_MODE_MIX` instead of `BLEND_MODE_ADD`.** Sparks don't bloom; they look like flat orange triangles.
287
+ - **Forgetting to free.** The `spawn_hit_spark` helper creates a `Timer`-equivalent via `get_tree().create_timer` to free after lifetime. Otherwise spent emitters accumulate forever.
288
+ - **`spark_lifetime > 1.0` for sharp impacts.** Sparks lingering for a full second look like fairy dust. Keep ≤ 0.5 s for snappy hits.
289
+
290
+ ## Performance notes
291
+
292
+ - One burst: 24 particles × 0.35 s = ~negligible. Spawning 60 bursts/sec (full-auto fire) = ~1500 live particles. Still well under the GPU budget.
293
+ - For sustained automatic fire, pool the spark instances instead of instantiating per shot. Pre-create 16 spark scenes; round-robin them.
294
+ - The `look_at` + `rotate_object_local` pair is the most expensive part of the spawn (one matrix decompose). If you spawn 100/frame, cache the orientation math.
295
+ - Mobile: drop `spark_count` to 12, `spark_lifetime` to 0.20.
296
+
297
+ ## Edge cases
298
+
299
+ - **Surface normal points exactly UP.** `look_at` with up = UP fails. The `_safe_up` helper picks RIGHT in that case.
300
+ - **Surface normal is zero (interior trigger volume hit).** The function defaults to `Vector3.UP` if `normal.length_squared() < 0.0001`.
301
+ - **Impact inside a tight space (corner).** Sparks penetrate walls visually. Either accept it (additive bloom hides it well) or use a `Decal` for the burn mark and skip particles.
302
+ - **First-person view, sparks from your own gun's barrel hit.** Use a smaller burst (intensity 0.4) so the camera isn't flooded.
303
+ - **Networked multiplayer.** Spawn sparks client-side based on hit events; never replicate the spark node itself (waste of bandwidth).
304
+ - **Slow-motion.** Sparks freeze gracefully because `Engine.time_scale` slows the particle simulation. No special handling needed.
305
+
306
+ ## Fallback (no MCP)
307
+
308
+ VFX is code, no MCP required:
309
+
310
+ 1. Create `addons/vfx/hit-spark/` with the two files above.
311
+ 2. In Godot, add a `GPUParticles3D` to a new scene, attach `hit_spark.gd`. Save as `hit_spark.tscn`.
312
+ 3. From any impact handler: `HitSpark.spawn_hit_spark(get_tree().root, position, normal)`.
313
+
314
+ ## Handoff
315
+
316
+ After firing this recipe, suggest:
317
+
318
+ - `summer:visual-effects/recipes/muzzle-flash` — pair on the gun side; this recipe handles the bullet-impact side.
319
+ - `summer:visual-effects/recipes/lightning` — automatically calls this at endpoints.
320
+ - `summer:visual-effects/recipes/water-ripple` — pair the `water-droplet` variant with a ripple ring at the impact for water surfaces.
321
+ - `summer:visual-effects/game-feel` — `CameraShake.add_trauma(0.15)` on heavy hits, hit-stop for crit kills.
322
+ - `summer:audio/sound-effect` — generate `metal-on-metal clang, sharp transient, short ring, 350ms` per spark variant.
323
+
324
+ ## See also
325
+
326
+ - `_building-blocks/additive-billboard-particles.md` — canonical additive material settings (this recipe uses them)
327
+ - `summer:visual-effects/recipes/muzzle-flash` — the gun-end companion
328
+ - `summer:visual-effects/recipes/lightning` — caller; spawns sparks at bolt endpoints
329
+ - `summer:visual-effects/recipes/water-ripple` — surface companion for water impacts
330
+ - `summer:visual-effects/game-feel` — shake/hit-stop pairings