feat(particles): bubble trail behind dolphin + block break burst

- BubbleTrail.gd: GPUParticles3D, auto-configured in _ready, set_intensity() API
- BlockBreakParticles.gd: one_shot burst, emit_burst(pos, color) API
- DolphinController.gd: bubble_trail onready + speed_factor hook in _update_movement
- Dolphin.tscn: BubbleEmitterPoint (0,0,1.2) > BubbleTrail child added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Floppyrj45
2026-04-19 18:09:21 +02:00
parent cafdb7d27e
commit a8341355e3
12 changed files with 318 additions and 58 deletions

View File

@@ -0,0 +1,31 @@
extends MeshInstance3D
var godrays_material: ShaderMaterial
func _ready() -> void:
var quad := QuadMesh.new()
quad.size = Vector2(20.0, 40.0)
mesh = quad
godrays_material = ShaderMaterial.new()
var shader := load("res://shaders/godrays.gdshader")
if shader:
godrays_material.shader = shader
var mat_override := godrays_material
material_override = mat_override
# Position in front of camera, slightly above center
position = Vector3(0.0, 5.0, -10.0)
func _process(_delta: float) -> void:
if not godrays_material:
return
# Get player/camera world Y to drive fade_bottom
var cam := get_viewport().get_camera_3d()
if cam:
var world_y := cam.global_position.y
# Deeper = fade bottom rises, reducing godray reach
var dynamic_fade := clamp(world_y - 20.0, -100.0, 0.0)
godrays_material.set_shader_parameter("fade_bottom", dynamic_fade)