Add scene-authored FX effect library and Fx autoload

Replace code-buried CPUParticles with inspector-editable effect scenes fired
through one Fx autoload: code names the effect (Fx.spawn(&"blood_burst", xform)),
the .tscn owns the look. Ships four placeholder effects (blood_burst, slam_dust,
spark, hit_flash) seeded from the old code params, a self-freeing one_shot_effect
root helper, a live preview gallery, and an FX style guide for Siim. CPUParticles
only (mobile GLES3 constraint). Existing call sites untouched -- migrated later.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-09-05 00:12:08 +03:00
parent 1ea7f7a744
commit 973db7d8b8
17 changed files with 623 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://fx/one_shot_effect.gd" id="1_l68fm"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_okatq"]
transparency = 1
cull_mode = 2
shading_mode = 0
vertex_color_use_as_albedo = true
[sub_resource type="SphereMesh" id="SphereMesh_n7uw4"]
material = SubResource("StandardMaterial3D_okatq")
radius = 0.07
height = 0.14
radial_segments = 4
rings = 2
[sub_resource type="Curve" id="Curve_a71nq"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.6, 0.5), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="Gradient" id="Gradient_mhqc0"]
colors = PackedColorArray(1, 0.02, 0.02, 1, 0.25, 0, 0, 0)
[node name="blood_burst" type="CPUParticles3D" unique_id=1553421910]
emitting = false
amount = 25
lifetime = 1.1
one_shot = true
explosiveness = 0.9
randomness = 0.4
mesh = SubResource("SphereMesh_n7uw4")
direction = Vector3(0, 1, 0)
spread = 80.0
gravity = Vector3(0, -7, 0)
initial_velocity_min = 4.0
initial_velocity_max = 11.0
scale_amount_min = 0.5
scale_amount_max = 1.6
scale_amount_curve = SubResource("Curve_a71nq")
color_ramp = SubResource("Gradient_mhqc0")
script = ExtResource("1_l68fm")