feat(dolphin): proper 3D mesh + swim animations (procedural)

- DolphinMeshBuilder.gd: ArrayMesh procédural, 14 sections elliptiques,
  nageoire dorsale, pectorales, queue horizontale (caudale), gradient
  dos #4a6d82 / ventre #d8e2ea
- Animations: battement caudale (sin), lean virage, flap pectorales,
  bob corps — fréquence x2 en boost
- Dolphin.tscn: remplace 6 capsules CSG par DolphinMesh + DolphinMeshBuilder
- DolphinController: corrige double-déclaration speed, pilote animate()
- CREDITS.md: mesh procédural CC0 original

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Floppyrj45
2026-04-19 18:11:03 +02:00
parent 52dc661e7b
commit e1fda4d393
4 changed files with 305 additions and 69 deletions

View File

@@ -1,47 +1,14 @@
[gd_scene load_steps=24 format=3 uid="uid://dolphin_main"]
[gd_scene load_steps=7 format=3 uid="uid://dolphin_main"]
[ext_resource type="Script" path="res://scripts/dolphin/DolphinController.gd" id="1_controller"]
[ext_resource type="Script" path="res://scripts/dolphin/HUD.gd" id="2_hud"]
[ext_resource type="Script" path="res://scripts/dolphin/EcholocationPulse.gd" id="3_echo"]
[ext_resource type="Script" path="res://scripts/dolphin/BubbleTrail.gd" id="4_bubble_trail"]
[ext_resource type="Script" path="res://scripts/dolphin/DolphinMeshBuilder.gd" id="5_builder"]
[sub_resource type="CapsuleShape3D" id="1_colshape"]
radius = 0.4
height = 2.0
[sub_resource type="CapsuleMesh" id="2_body_mesh"]
radius = 0.4
height = 2.0
[sub_resource type="StandardMaterial3D" id="3_body_mat"]
albedo_color = Color(0.29, 0.478, 0.584, 1)
[sub_resource type="CapsuleMesh" id="4_belly_mesh"]
radius = 0.35
height = 1.6
[sub_resource type="StandardMaterial3D" id="5_belly_mat"]
albedo_color = Color(0.91, 0.933, 0.949, 1)
[sub_resource type="CapsuleMesh" id="6_tail_mesh"]
radius = 0.2
height = 0.9
[sub_resource type="StandardMaterial3D" id="7_tail_mat"]
albedo_color = Color(0.29, 0.478, 0.584, 1)
[sub_resource type="PrismMesh" id="8_fin_mesh"]
size = Vector3(0.15, 0.4, 0.08)
[sub_resource type="StandardMaterial3D" id="9_fin_mat"]
albedo_color = Color(0.29, 0.478, 0.584, 1)
[sub_resource type="CapsuleMesh" id="10_pec_mesh"]
radius = 0.1
height = 0.5
[sub_resource type="StandardMaterial3D" id="11_pec_mat"]
albedo_color = Color(0.29, 0.478, 0.584, 1)
height = 1.8
[sub_resource type="StyleBoxFlat" id="12_panel_style"]
bg_color = Color(0.05, 0.05, 0.05, 0.7)
@@ -57,39 +24,9 @@ script = ExtResource("1_controller")
shape = SubResource("1_colshape")
[node name="DolphinBody" type="Node3D" parent="."]
rotation = Vector3(0, 0, 0)
[node name="Body" type="MeshInstance3D" parent="DolphinBody"]
rotation = Vector3(1.5708, 0, 0)
mesh = SubResource("2_body_mesh")
surface_material_override/0 = SubResource("3_body_mat")
[node name="Belly" type="MeshInstance3D" parent="DolphinBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.05, 0.15)
rotation = Vector3(1.5708, 0, 0)
mesh = SubResource("4_belly_mesh")
surface_material_override/0 = SubResource("5_belly_mat")
[node name="Tail" type="MeshInstance3D" parent="DolphinBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.1)
rotation = Vector3(1.5708, 0, 0)
mesh = SubResource("6_tail_mesh")
surface_material_override/0 = SubResource("7_tail_mat")
[node name="DorsalFin" type="MeshInstance3D" parent="DolphinBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, -0.1)
mesh = SubResource("8_fin_mesh")
surface_material_override/0 = SubResource("9_fin_mat")
[node name="PecFinLeft" type="MeshInstance3D" parent="DolphinBody"]
transform = Transform3D(1, 0, 0, 0, 0.866, -0.5, 0, 0.5, 0.866, -0.45, 0.0, 0.1)
mesh = SubResource("10_pec_mesh")
surface_material_override/0 = SubResource("11_pec_mat")
[node name="PecFinRight" type="MeshInstance3D" parent="DolphinBody"]
transform = Transform3D(1, 0, 0, 0, 0.866, 0.5, 0, -0.5, 0.866, 0.45, 0.0, 0.1)
mesh = SubResource("10_pec_mesh")
surface_material_override/0 = SubResource("11_pec_mat")
[node name="DolphinMesh" type="MeshInstance3D" parent="DolphinBody"]
script = ExtResource("5_builder")
[node name="CameraPivot" type="Node3D" parent="."]