Allelic crossingover

This commit is contained in:
Rendo 2026-04-06 00:46:11 +05:00
commit 471f14c19e
26 changed files with 334 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dme2xuu2886mk"
path="res://.godot/imported/grid.png-d8f6e3f14599d8a5bb4b96e2954f4f80.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/grid.png"
dest_files=["res://.godot/imported/grid.png-d8f6e3f14599d8a5bb4b96e2954f4f80.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://c4p0w1ep8mutp"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_xd0dq"]
[resource]
atlas = ExtResource("1_xd0dq")
region = Rect2(11, 25, 10, 7)

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nh1y4mfx4rrd"
path="res://.godot/imported/peashooter.png-db7abc19d230ed9641fba8e2be04db38.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/peashooter/peashooter.png"
dest_files=["res://.godot/imported/peashooter.png-db7abc19d230ed9641fba8e2be04db38.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://xu3tlqphgkr3"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_73ycv"]
[resource]
atlas = ExtResource("1_73ycv")
region = Rect2(27, 0, 27, 13)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://0dplt1rhyuk6"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_nquma"]
[resource]
atlas = ExtResource("1_nquma")
region = Rect2(45, 25, 8, 5)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://c3hpdbuk7rebb"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_g74w2"]
[resource]
atlas = ExtResource("1_g74w2")
region = Rect2(0, 0, 26, 24)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://75qm5vda4cv0"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_grs1b"]
[resource]
atlas = ExtResource("1_grs1b")
region = Rect2(45, 14, 8, 10)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://dreb6csxlyicd"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_08t6g"]
[resource]
atlas = ExtResource("1_08t6g")
region = Rect2(27, 14, 17, 16)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://cx83t1td6bh8e"]
[ext_resource type="Texture2D" uid="uid://nh1y4mfx4rrd" path="res://assets/sprites/peashooter/peashooter.png" id="1_o137y"]
[resource]
atlas = ExtResource("1_o137y")
region = Rect2(0, 25, 10, 22)

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bupexenm876vs"
path="res://.godot/imported/sunflower.png-7cae6838947dd3a5909615f4eea40816.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/sunflower/sunflower.png"
dest_files=["res://.godot/imported/sunflower.png-7cae6838947dd3a5909615f4eea40816.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://5s41s8aqpnoy"]
[ext_resource type="Texture2D" uid="uid://bupexenm876vs" path="res://assets/sprites/sunflower/sunflower.png" id="1_scut2"]
[resource]
atlas = ExtResource("1_scut2")
region = Rect2(32, 0, 27, 16)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://yndxoww4o0p"]
[ext_resource type="Texture2D" uid="uid://bupexenm876vs" path="res://assets/sprites/sunflower/sunflower.png" id="1_63wbg"]
[resource]
atlas = ExtResource("1_63wbg")
region = Rect2(46, 17, 8, 6)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://d0ywidssladw4"]
[ext_resource type="Texture2D" uid="uid://bupexenm876vs" path="res://assets/sprites/sunflower/sunflower.png" id="1_nloe6"]
[resource]
atlas = ExtResource("1_nloe6")
region = Rect2(0, 0, 31, 28)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://cknlcspmr37l2"]
[ext_resource type="Texture2D" uid="uid://bupexenm876vs" path="res://assets/sprites/sunflower/sunflower.png" id="1_pkohe"]
[resource]
atlas = ExtResource("1_pkohe")
region = Rect2(0, 29, 18, 6)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://4am05ghs7is0"]
[ext_resource type="Texture2D" uid="uid://bupexenm876vs" path="res://assets/sprites/sunflower/sunflower.png" id="1_j0gxw"]
[resource]
atlas = ExtResource("1_j0gxw")
region = Rect2(32, 17, 13, 26)

View file

@ -21,4 +21,5 @@ config/icon="res://icon.svg"
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0
rendering_device/driver.windows="d3d12" rendering_device/driver.windows="d3d12"

View file

@ -0,0 +1,33 @@
[gd_scene format=3 uid="uid://ishuj6fmytsi"]
[ext_resource type="Texture2D" uid="uid://xu3tlqphgkr3" path="res://assets/sprites/peashooter/peashooter_base.tres" id="1_e6yey"]
[ext_resource type="Texture2D" uid="uid://cx83t1td6bh8e" path="res://assets/sprites/peashooter/peashooter_stem.tres" id="2_s68lj"]
[ext_resource type="Texture2D" uid="uid://c3hpdbuk7rebb" path="res://assets/sprites/peashooter/peashooter_head.tres" id="3_nb43f"]
[ext_resource type="Texture2D" uid="uid://dreb6csxlyicd" path="res://assets/sprites/peashooter/peashooter_mouth.tres" id="4_lujl4"]
[ext_resource type="Texture2D" uid="uid://0dplt1rhyuk6" path="res://assets/sprites/peashooter/peashooter_eyes.tres" id="5_m4f03"]
[ext_resource type="Texture2D" uid="uid://75qm5vda4cv0" path="res://assets/sprites/peashooter/peashooter_leaf.tres" id="6_x0fsv"]
[node name="PeashooterReference" type="Node2D" unique_id=1009091297]
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1099676460]
texture = ExtResource("1_e6yey")
[node name="Sprite2D" type="Sprite2D" parent="Sprite2D" unique_id=99781643]
position = Vector2(-1.5, -10.5)
texture = ExtResource("2_s68lj")
[node name="Sprite2D" type="Sprite2D" parent="Sprite2D/Sprite2D" unique_id=349584811]
position = Vector2(4, -15)
texture = ExtResource("3_nb43f")
[node name="PeashooterLeaf" type="Sprite2D" parent="Sprite2D/Sprite2D/Sprite2D" unique_id=1491279544]
position = Vector2(-12, -13)
texture = ExtResource("6_x0fsv")
[node name="PeashooterMouth" type="Sprite2D" parent="Sprite2D/Sprite2D/Sprite2D" unique_id=775438590]
position = Vector2(6.5, 5)
texture = ExtResource("4_lujl4")
[node name="PeashooterEyes" type="Sprite2D" parent="Sprite2D/Sprite2D/Sprite2D" unique_id=109271766]
position = Vector2(1.5, -3.5)
texture = ExtResource("5_m4f03")

View file

@ -0,0 +1,28 @@
[gd_scene format=3 uid="uid://cexjyd7e5oxk2"]
[ext_resource type="Texture2D" uid="uid://5s41s8aqpnoy" path="res://assets/sprites/sunflower/sunflower_base.tres" id="1_pcoyu"]
[ext_resource type="Texture2D" uid="uid://4am05ghs7is0" path="res://assets/sprites/sunflower/sunflower_stem.tres" id="2_cis81"]
[ext_resource type="Texture2D" uid="uid://d0ywidssladw4" path="res://assets/sprites/sunflower/sunflower_head.tres" id="3_sawyv"]
[ext_resource type="Texture2D" uid="uid://cknlcspmr37l2" path="res://assets/sprites/sunflower/sunflower_mouth.tres" id="4_mabgo"]
[ext_resource type="Texture2D" uid="uid://yndxoww4o0p" path="res://assets/sprites/sunflower/sunflower_eyes.tres" id="5_k7g3o"]
[node name="SunflowerReference" type="Node2D" unique_id=1269760637]
[node name="SunflowerBase" type="Sprite2D" parent="." unique_id=1672078764]
texture = ExtResource("1_pcoyu")
[node name="SunflowerStem" type="Sprite2D" parent="SunflowerBase" unique_id=186393666]
position = Vector2(-1, -12)
texture = ExtResource("2_cis81")
[node name="SunflowerHead" type="Sprite2D" parent="SunflowerBase/SunflowerStem" unique_id=1079676912]
position = Vector2(4, -13)
texture = ExtResource("3_sawyv")
[node name="SunflowerMouth" type="Sprite2D" parent="SunflowerBase/SunflowerStem/SunflowerHead" unique_id=539805721]
position = Vector2(1, 4)
texture = ExtResource("4_mabgo")
[node name="SunflowerEyes" type="Sprite2D" parent="SunflowerBase/SunflowerStem/SunflowerHead" unique_id=968075238]
position = Vector2(1, -2)
texture = ExtResource("5_k7g3o")

View file

@ -1,9 +1,58 @@
[gd_scene format=3 uid="uid://bh0bpqalry5my"] [gd_scene format=3 uid="uid://bh0bpqalry5my"]
[ext_resource type="Texture2D" uid="uid://dme2xuu2886mk" path="res://assets/sprites/grid.png" id="1_nnsk1"]
[ext_resource type="Script" uid="uid://g1poxl04shm6" path="res://ui/debug_modifiers.gd" id="2_rwgxs"]
[node name="World" type="Node2D" unique_id=1672334032] [node name="World" type="Node2D" unique_id=1672334032]
[node name="GodotGenome" type="GodotGenome" parent="." unique_id=1134546682] [node name="Camera2D" type="Camera2D" parent="." unique_id=1587010905]
from_plant = "CherryBomb" position = Vector2(271, 151)
zoom = Vector2(1.825, 1.825)
[node name="Plant" type="Plant" parent="." unique_id=1494298949 node_paths=PackedStringArray("genome")] [node name="GenomeA" type="GodotGenome" parent="." unique_id=1134546682]
genome = NodePath("../GodotGenome") from_plant = "Peashooter"
[node name="GenomeB" type="GodotGenome" parent="." unique_id=1110322162]
from_plant = "Sunflower"
[node name="GenomeADisplay" type="Plant" parent="." unique_id=1494298949 node_paths=PackedStringArray("genome")]
genome = NodePath("../GenomeA")
position = Vector2(271, 151)
[node name="GenomeBDisplay" type="Plant" parent="." unique_id=1637617745 node_paths=PackedStringArray("genome")]
genome = NodePath("../GenomeB")
position = Vector2(333, 151)
[node name="Grid" type="Sprite2D" parent="." unique_id=1161746624]
z_index = -10
texture = ExtResource("1_nnsk1")
centered = false
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1946950805]
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer" unique_id=277004490]
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
script = ExtResource("2_rwgxs")
[node name="Allelic" type="Button" parent="CanvasLayer/HBoxContainer" unique_id=564440120]
layout_mode = 2
size_flags_horizontal = 3
text = "Аллельная трансформация"
[node name="Categoric" type="Button" parent="CanvasLayer/HBoxContainer" unique_id=741994465]
layout_mode = 2
size_flags_horizontal = 3
text = "Категориальная трансформация"
[node name="ReferencePairModifier" type="ReferencePairModifier" parent="CanvasLayer" unique_id=2068562861 node_paths=PackedStringArray("godot_genome_a", "godot_genome_b")]
godot_genome_a = NodePath("../../GenomeA")
godot_genome_b = NodePath("../../GenomeB")
[connection signal="genome_updated" from="GenomeA" to="CanvasLayer/HBoxContainer" method="_on_genome_a_genome_updated"]
[connection signal="pressed" from="CanvasLayer/HBoxContainer/Allelic" to="CanvasLayer/HBoxContainer" method="_on_allelic_pressed"]
[connection signal="pressed" from="CanvasLayer/HBoxContainer/Categoric" to="CanvasLayer/HBoxContainer" method="_on_categoric_pressed"]

View file

@ -0,0 +1,14 @@
extends Node
@onready var reference_pair_modifier: ReferencePairModifier = $"../ReferencePairModifier"
func _on_allelic_pressed() -> void:
reference_pair_modifier.allelic_crossingover()
func _on_categoric_pressed() -> void:
pass # Replace with function body.
func _on_genome_a_genome_updated() -> void:
print("test")

View file

@ -0,0 +1 @@
uid://g1poxl04shm6