This commit is contained in:
Alexey 2025-07-14 20:47:53 +03:00
commit e973ab13ec
20 changed files with 346 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b0gyyb6xwfjex"
path="res://.godot/imported/0000.png-b903af487efa2fbcc832611e33cbf454.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0000.png"
dest_files=["res://.godot/imported/0000.png-b903af487efa2fbcc832611e33cbf454.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bp7iec52kc0ko"
path="res://.godot/imported/0001.png-b37bf2a8d5a87496e9149209ad9d9645.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0001.png"
dest_files=["res://.godot/imported/0001.png-b37bf2a8d5a87496e9149209ad9d9645.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bmjanur1y65ut"
path="res://.godot/imported/0002.png-9b12b65d0c4a70fdde18f69d2bbccc91.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0002.png"
dest_files=["res://.godot/imported/0002.png-9b12b65d0c4a70fdde18f69d2bbccc91.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://csyoosmr6c251"
path="res://.godot/imported/0003.png-1f669fd5f649d54756b5d5cbb6d54ede.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0003.png"
dest_files=["res://.godot/imported/0003.png-1f669fd5f649d54756b5d5cbb6d54ede.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8ijiv8ly74jg"
path="res://.godot/imported/0004.png-2fc0af59b10bb4de39b70e455e5a56ba.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0004.png"
dest_files=["res://.godot/imported/0004.png-2fc0af59b10bb4de39b70e455e5a56ba.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lbo6ygri22or"
path="res://.godot/imported/0005.png-ea4e5800e69dcb3db9c74e0d36f7dada.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0005.png"
dest_files=["res://.godot/imported/0005.png-ea4e5800e69dcb3db9c74e0d36f7dada.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bu54h8g5r50qp"
path="res://.godot/imported/0006.png-5ea93347fb4075fdeb67e91f967d8081.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0006.png"
dest_files=["res://.godot/imported/0006.png-5ea93347fb4075fdeb67e91f967d8081.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c57drlhnuicu5"
path="res://.godot/imported/0007.png-c700fd2bc75a43d8fec1237ad0c34562.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://base/assets/test_enemy/0007.png"
dest_files=["res://.godot/imported/0007.png-c700fd2bc75a43d8fec1237ad0c34562.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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,45 @@
[gd_scene load_steps=11 format=3 uid="uid://twqkevpn0q1a"]
[ext_resource type="Texture2D" uid="uid://b0gyyb6xwfjex" path="res://base/assets/test_enemy/0000.png" id="1_7qny8"]
[ext_resource type="Script" uid="uid://j0w37fjl13ox" path="res://base/scripts/enemies/directional_sprite3d.gd" id="2_hmq60"]
[ext_resource type="Texture2D" uid="uid://bp7iec52kc0ko" path="res://base/assets/test_enemy/0001.png" id="3_rvsun"]
[ext_resource type="Texture2D" uid="uid://bmjanur1y65ut" path="res://base/assets/test_enemy/0002.png" id="4_ajcop"]
[ext_resource type="Texture2D" uid="uid://csyoosmr6c251" path="res://base/assets/test_enemy/0003.png" id="5_xto1v"]
[ext_resource type="Texture2D" uid="uid://8ijiv8ly74jg" path="res://base/assets/test_enemy/0004.png" id="6_d1vpv"]
[ext_resource type="Texture2D" uid="uid://lbo6ygri22or" path="res://base/assets/test_enemy/0005.png" id="7_yln7d"]
[ext_resource type="Texture2D" uid="uid://bu54h8g5r50qp" path="res://base/assets/test_enemy/0006.png" id="8_snoby"]
[ext_resource type="Texture2D" uid="uid://c57drlhnuicu5" path="res://base/assets/test_enemy/0007.png" id="9_83myg"]
[sub_resource type="GDScript" id="GDScript_hmq60"]
resource_name = "temp_script"
script/source = "extends Node3D
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
rotate_y(TAU*delta)
"
[node name="TestEnemy" type="Node3D"]
[node name="RotationalSprite" type="Sprite3D" parent="."]
billboard = 2
texture_filter = 0
texture = ExtResource("1_7qny8")
script = ExtResource("2_hmq60")
rotations = Dictionary[float, Texture2D]({
0.0: ExtResource("6_d1vpv"),
0.785398: ExtResource("7_yln7d"),
1.5708: ExtResource("8_snoby"),
2.35619: ExtResource("9_83myg"),
3.14159: ExtResource("1_7qny8"),
3.92699: ExtResource("3_rvsun"),
4.71239: ExtResource("4_ajcop"),
5.49779: ExtResource("5_xto1v")
})
[node name="Node3D" type="Node3D" parent="."]
script = SubResource("GDScript_hmq60")
[node name="Camera3D" type="Camera3D" parent="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.19268)

View file

@ -0,0 +1,23 @@
@tool
extends Sprite3D
@export var rotations : Dictionary[float,Texture2D]
func _process(delta: float) -> void:
if Engine.is_editor_hint(): return
var camera = get_viewport().get_camera_3d()
var rotation_to_camera = global_transform.basis.z.signed_angle_to(camera.global_position,Vector3.UP) + PI
var chosen_index = 0
for i in rotations.keys():
if abs(rotation_to_camera-i) < abs(rotation_to_camera-chosen_index):
chosen_index = i
texture = rotations[chosen_index]
@export_tool_button("Generate entries") var generator = entry_generator
@export var rotation_count : float = 8
func entry_generator():
rotations.clear()
for i in range(rotation_count):
rotations[TAU/rotation_count*i] = Texture2D.new()

View file

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