Compare commits
52 Commits
5642ba946f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2358dc8b53 | |||
| 185b1b4744 | |||
| e86da0c2bc | |||
| 5341fdd3f5 | |||
|
|
d58c31ac65 | ||
|
|
48ba1761e0 | ||
|
|
0ce2cc6b04 | ||
| 8ff14f3455 | |||
| 6da7021a58 | |||
| b87be91521 | |||
|
|
9f3acbccf9 | ||
| 4aaf8e3fd3 | |||
| dc76181cc0 | |||
| 0f7bb6308a | |||
| a944492dbd | |||
| 15f38c096b | |||
| c296531214 | |||
| bdca270dca | |||
| d47bc26583 | |||
|
|
cc7f819628 | ||
| 802a7ef7c1 | |||
| 3e2739cf02 | |||
| 7be800398d | |||
| 7db1df9ab6 | |||
| 8198f7df1f | |||
| 952058b0e0 | |||
| 475749c4df | |||
| 086167a5a6 | |||
| 885bac9a4a | |||
| 496a271946 | |||
| d0d052f65b | |||
| 67a99051bd | |||
| fb848a9848 | |||
| bc30a169dc | |||
| f5576959b7 | |||
| b8ab8f4971 | |||
| 22653d62bc | |||
| 6a2a2d2e8a | |||
| 77df5fbbfd | |||
|
|
ed5eb706a1 | ||
|
|
58f9188794 | ||
|
|
b463f55f53 | ||
| c0a68da7d1 | |||
| 97bbca95e8 | |||
|
|
ed25b40969 | ||
| 2b1370bd40 | |||
| d09a975578 | |||
| c77d227f33 | |||
| aad14ab242 | |||
| 298e6cd229 | |||
| efb7a78cf1 | |||
| 5dd8f8092c |
BIN
addons/PageFlip/Assets/back.png
Normal file
BIN
addons/PageFlip/Assets/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 KiB |
@@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d4e1lbng4uqk"
|
||||
path="res://.godot/imported/quad_main.png-af26b29d5c3350fc4d75e08ad350ccc7.ctex"
|
||||
uid="uid://bjowpx1ap4uxt"
|
||||
path="res://.godot/imported/back.png-bddbf3418b746eb53bc79fd4d0989d41.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/game_menu/assets/page_3/quad_main.png"
|
||||
dest_files=["res://.godot/imported/quad_main.png-af26b29d5c3350fc4d75e08ad350ccc7.ctex"]
|
||||
source_file="res://addons/PageFlip/Assets/back.png"
|
||||
dest_files=["res://.godot/imported/back.png-bddbf3418b746eb53bc79fd4d0989d41.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
BIN
addons/PageFlip/Assets/blank_page.png
Normal file
BIN
addons/PageFlip/Assets/blank_page.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 300 KiB |
40
addons/PageFlip/Assets/blank_page.png.import
Normal file
40
addons/PageFlip/Assets/blank_page.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cen51wqc15b14"
|
||||
path="res://.godot/imported/blank_page.png-589b6dfce0585742cc1d305c391c9cd9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/blank_page.png"
|
||||
dest_files=["res://.godot/imported/blank_page.png-589b6dfce0585742cc1d305c391c9cd9.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
|
||||
BIN
addons/PageFlip/Assets/book_impact.ogg
Normal file
BIN
addons/PageFlip/Assets/book_impact.ogg
Normal file
Binary file not shown.
19
addons/PageFlip/Assets/book_impact.ogg.import
Normal file
19
addons/PageFlip/Assets/book_impact.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://bhitebdghyhua"
|
||||
path="res://.godot/imported/book_impact.ogg-ae2f194921fcd1bc549a3ddb37fab4ba.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/book_impact.ogg"
|
||||
dest_files=["res://.godot/imported/book_impact.ogg-ae2f194921fcd1bc549a3ddb37fab4ba.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
addons/PageFlip/Assets/front.png
Normal file
BIN
addons/PageFlip/Assets/front.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 765 KiB |
40
addons/PageFlip/Assets/front.png.import
Normal file
40
addons/PageFlip/Assets/front.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbdwbowx32d3v"
|
||||
path="res://.godot/imported/front.png-76dff7071666496195badceef4e0ce67.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/front.png"
|
||||
dest_files=["res://.godot/imported/front.png-76dff7071666496195badceef4e0ce67.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
|
||||
BIN
addons/PageFlip/Assets/interior.png
Normal file
BIN
addons/PageFlip/Assets/interior.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 772 KiB |
40
addons/PageFlip/Assets/interior.png.import
Normal file
40
addons/PageFlip/Assets/interior.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dt1tiecgw5rip"
|
||||
path="res://.godot/imported/interior.png-d4b06daf084fdb8a90836ec57d2dd53f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/interior.png"
|
||||
dest_files=["res://.godot/imported/interior.png-d4b06daf084fdb8a90836ec57d2dd53f.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
|
||||
BIN
addons/PageFlip/Assets/page_flip.ogg
Normal file
BIN
addons/PageFlip/Assets/page_flip.ogg
Normal file
Binary file not shown.
19
addons/PageFlip/Assets/page_flip.ogg.import
Normal file
19
addons/PageFlip/Assets/page_flip.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://bylfc3b5pmbij"
|
||||
path="res://.godot/imported/page_flip.ogg-aabb6ae51ff161ae6afa52da11fe75de.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/page_flip.ogg"
|
||||
dest_files=["res://.godot/imported/page_flip.ogg-aabb6ae51ff161ae6afa52da11fe75de.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
49
addons/PageFlip/Assets/page_flip_final.gdshader
Normal file
49
addons/PageFlip/Assets/page_flip_final.gdshader
Normal file
@@ -0,0 +1,49 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D front_texture : source_color, filter_linear_mipmap;
|
||||
uniform sampler2D back_texture : source_color, filter_linear_mipmap;
|
||||
|
||||
uniform sampler2D spine_shadow_gradient : source_color, filter_linear, repeat_disable;
|
||||
uniform float shadow_intensity : hint_range(0.0, 1.0) = 0.0;
|
||||
uniform float max_shadow_spread : hint_range(0.0, 1.0) = 0.35;
|
||||
|
||||
uniform bool debug_mode = false;
|
||||
uniform bool is_backward = false;
|
||||
|
||||
void fragment() {
|
||||
vec2 uv_dx = dFdx(UV);
|
||||
vec2 uv_dy = dFdy(UV);
|
||||
float face_dir = uv_dx.x * uv_dy.y - uv_dx.y * uv_dy.x;
|
||||
bool is_front = face_dir > 0.0;
|
||||
|
||||
vec4 base_color;
|
||||
|
||||
if (is_front) {
|
||||
if (is_backward) {
|
||||
// Let's try flipping Y just in case they meant upside down!
|
||||
// And keep X normal, since UV goes 0 to 1.
|
||||
base_color = texture(front_texture, UV);
|
||||
} else {
|
||||
base_color = texture(front_texture, UV);
|
||||
}
|
||||
} else {
|
||||
if (is_backward) {
|
||||
base_color = texture(back_texture, vec2(1.0 - UV.x, UV.y));
|
||||
} else {
|
||||
base_color = texture(back_texture, vec2(1.0 - UV.x, UV.y));
|
||||
}
|
||||
}
|
||||
|
||||
float current_spread = max_shadow_spread * (shadow_intensity + 0.001);
|
||||
float sample_x = UV.x / current_spread;
|
||||
float shadow_alpha = texture(spine_shadow_gradient, vec2(sample_x, 0.0)).a;
|
||||
|
||||
if (sample_x > 1.0) {
|
||||
shadow_alpha = 0.0;
|
||||
}
|
||||
|
||||
shadow_alpha *= shadow_intensity;
|
||||
|
||||
vec3 final_rgb = mix(base_color.rgb, vec3(0.0, 0.0, 0.0), shadow_alpha);
|
||||
COLOR = vec4(final_rgb, base_color.a);
|
||||
}
|
||||
1
addons/PageFlip/Assets/page_flip_final.gdshader.uid
Normal file
1
addons/PageFlip/Assets/page_flip_final.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b57sdbj15qx37
|
||||
9
addons/PageFlip/Assets/page_flip_shader_material.tres
Normal file
9
addons/PageFlip/Assets/page_flip_shader_material.tres
Normal file
@@ -0,0 +1,9 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://ddw2ie8wnrnre"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://b57sdbj15qx37" path="res://addons/PageFlip/Assets/page_flip_final.gdshader" id="1_cl0rr"]
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_cl0rr")
|
||||
shader_parameter/shadow_intensity = 0.0
|
||||
shader_parameter/max_shadow_spread = 0.35
|
||||
shader_parameter/debug_mode = false
|
||||
8
addons/PageFlip/Assets/shadow_gradient.tres
Normal file
8
addons/PageFlip/Assets/shadow_gradient.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="GradientTexture2D" format=3 uid="uid://rm7bporlv3cf"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_3i6i7"]
|
||||
offsets = PackedFloat32Array(0, 0.2731183, 0.44731182, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 0.521, 0, 0, 0, 0.492, 0, 0, 0, 0.358, 0, 0, 0, 0)
|
||||
|
||||
[resource]
|
||||
gradient = SubResource("Gradient_3i6i7")
|
||||
BIN
addons/PageFlip/Assets/spine.png
Normal file
BIN
addons/PageFlip/Assets/spine.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
40
addons/PageFlip/Assets/spine.png.import
Normal file
40
addons/PageFlip/Assets/spine.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cit41jypw2sy1"
|
||||
path="res://.godot/imported/spine.png-c2fa10bef4996b84a954651c908149a7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/PageFlip/Assets/spine.png"
|
||||
dest_files=["res://.godot/imported/spine.png-c2fa10bef4996b84a954651c908149a7.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
|
||||
229
addons/PageFlip/book_api.gd
Normal file
229
addons/PageFlip/book_api.gd
Normal file
@@ -0,0 +1,229 @@
|
||||
@tool
|
||||
class_name BookAPI
|
||||
extends RefCounted
|
||||
|
||||
## Static utility class for the PageFlip2D system by Newold.
|
||||
## Provides helper methods to configure the book and facilitate interaction
|
||||
## from embedded scenes (UI, puzzles, maps).
|
||||
##
|
||||
## [b]How to use:[/b][br]
|
||||
## This class is designed to be used statically. You do not need to instance it.
|
||||
## Simply call [code]BookAPI.function_name()[/code] from anywhere in your project.
|
||||
## It automatically tracks the active [PageFlip2D] instance.
|
||||
## (When a PageFlip scene enters the tree, it registers itself as the current_book.)
|
||||
|
||||
# ==============================================================================
|
||||
# ENUMS (Mirrored for easy access)
|
||||
# ==============================================================================
|
||||
|
||||
enum JumpTarget {
|
||||
## Jump to the closed state showing the Front Cover.
|
||||
FRONT_COVER,
|
||||
## Jump to the closed state showing the Back Cover.
|
||||
BACK_COVER,
|
||||
## Jump to a specific content page number.
|
||||
CONTENT_PAGE
|
||||
}
|
||||
|
||||
# Internal reference to the currently active book.
|
||||
static var _current_book: PageFlip2D
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# SETUP & REFERENCES
|
||||
# ==============================================================================
|
||||
|
||||
## Registers a book instance as the currently active one.
|
||||
## Automatically called by [PageFlip2D] in its [method Node._ready].
|
||||
static func set_current_book(book: PageFlip2D) -> void:
|
||||
_current_book = book
|
||||
|
||||
|
||||
## Returns the currently active book instance, or null if none is registered.
|
||||
static func get_current_book() -> PageFlip2D:
|
||||
return _current_book
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# NAVIGATION CONTROLS
|
||||
# ==============================================================================
|
||||
|
||||
## Turns the page forward (to the next page/spread).
|
||||
## Does nothing if the book is animating or at the end.
|
||||
static func next_page() -> void:
|
||||
if is_instance_valid(_current_book):
|
||||
force_release_control(_current_book)
|
||||
_current_book.next_page()
|
||||
|
||||
|
||||
## Turns the page backward (to the previous page/spread).
|
||||
## Does nothing if the book is animating or at the beginning.
|
||||
static func prev_page() -> void:
|
||||
if is_instance_valid(_current_book):
|
||||
force_release_control(_current_book)
|
||||
_current_book.prev_page()
|
||||
|
||||
|
||||
## Forces the active book to close towards a specific cover.
|
||||
## [param to_front_cover]: If true, closes to the Front Cover (Right to Left). If false, closes to Back Cover.
|
||||
static func force_close_book(to_front_cover: bool) -> void:
|
||||
if is_instance_valid(_current_book):
|
||||
force_release_control(_current_book)
|
||||
_current_book.force_close_book(to_front_cover)
|
||||
|
||||
|
||||
## Navigates to a specific page number (1-based index).
|
||||
## Acts as a wrapper for go_to_spread, calculating the correct index automatically.
|
||||
## [b]ASYNC:[/b] Must be called with 'await' if animated is true.
|
||||
## [param page_num]: The 1-based page number (1 = first texture in pages_paths).
|
||||
## [param target]: Specifies if the target is a content page or a cover.
|
||||
static func go_to_page(page_num: int = 1, target: JumpTarget = JumpTarget.CONTENT_PAGE, animated: bool = true) -> void:
|
||||
var book = _current_book
|
||||
if not is_instance_valid(book): return
|
||||
|
||||
var target_spread_idx: int = 0
|
||||
|
||||
match target:
|
||||
JumpTarget.FRONT_COVER:
|
||||
target_spread_idx = -1
|
||||
JumpTarget.BACK_COVER:
|
||||
target_spread_idx = book.total_spreads
|
||||
JumpTarget.CONTENT_PAGE:
|
||||
# Calculate spread index: 1-2 -> Spread 0, 3-4 -> Spread 1, etc.
|
||||
var safe_page = max(1, page_num)
|
||||
target_spread_idx = int(safe_page / 2.0)
|
||||
target_spread_idx = clampi(target_spread_idx, 0, book.total_spreads - 1)
|
||||
|
||||
await go_to_spread(book, target_spread_idx, animated)
|
||||
|
||||
|
||||
## Navigates to a specific spread index directly.
|
||||
## [b]ASYNC:[/b] Must be called with 'await' if animated is true.
|
||||
## - Animated: Fast-forwards through pages with dynamic speed.
|
||||
## - Instant: Snaps to page and manually triggers the scene activation handshake.
|
||||
static func go_to_spread(book: PageFlip2D, target_spread: int, animated: bool = true) -> void:
|
||||
if not is_instance_valid(book): return
|
||||
|
||||
# Clamp target
|
||||
var final_target = clampi(target_spread, -1, book.total_spreads)
|
||||
var diff = final_target - book.current_spread
|
||||
|
||||
if diff == 0:
|
||||
return
|
||||
|
||||
force_release_control(book)
|
||||
|
||||
if not animated:
|
||||
# INSTANT TELEPORT
|
||||
book.current_spread = final_target
|
||||
book.call("_update_static_visuals_immediate")
|
||||
book.call("_update_volume_visuals")
|
||||
# Force check for interactive scenes after teleport
|
||||
book.call("_check_scene_activation")
|
||||
|
||||
else:
|
||||
# ANIMATED FAST-FORWARD
|
||||
if book.is_animating: return # Don't interrupt an existing animation
|
||||
|
||||
var original_speed = book.anim_player.speed_scale
|
||||
|
||||
# --- DYNAMIC SPEED CALCULATION ---
|
||||
var steps = abs(diff)
|
||||
# Base speed: 1.5x -> Max speed: 10.0x
|
||||
var dynamic_speed = remap(float(steps), 0.0, float(book.total_spreads), 1.5, 10.0)
|
||||
book.anim_player.speed_scale = dynamic_speed
|
||||
|
||||
var going_forward = diff > 0
|
||||
|
||||
for i in range(steps):
|
||||
if not is_instance_valid(book): break
|
||||
|
||||
if going_forward: book.next_page()
|
||||
else: book.prev_page()
|
||||
|
||||
# Wait for the physical page turn to finish before starting the next one.
|
||||
if book.anim_player.is_playing():
|
||||
await book.anim_player.animation_finished
|
||||
else:
|
||||
await book.get_tree().process_frame
|
||||
|
||||
# RESTORE STATE
|
||||
if is_instance_valid(book):
|
||||
book.anim_player.speed_scale = original_speed
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# STATE & INTERACTION HELPERS
|
||||
# ==============================================================================
|
||||
|
||||
## Returns true if the book (active or specific) is currently animating.
|
||||
static func is_busy(book_instance: PageFlip2D = null) -> bool:
|
||||
var book = book_instance if book_instance else _current_book
|
||||
if not is_instance_valid(book): return false
|
||||
return book.is_animating
|
||||
|
||||
|
||||
## Locates the PageFlip2D controller ancestor from any node inside an interactive page.
|
||||
static func find_book_controller(caller_node: Node) -> PageFlip2D:
|
||||
var current = caller_node
|
||||
while current:
|
||||
if current is PageFlip2D:
|
||||
return current
|
||||
current = current.get_parent()
|
||||
return null
|
||||
|
||||
|
||||
## Safely locks or unlocks the book's ability to turn pages manually.
|
||||
## WARNING: If locked, the interactive scene MUST be responsible for unlocking it later.
|
||||
static func set_interaction_lock(book: PageFlip2D, locked: bool) -> void:
|
||||
if not is_instance_valid(book): return
|
||||
book.call("_pageflip_set_input_enabled", not locked)
|
||||
|
||||
|
||||
## Forces the book to regain input control immediately.
|
||||
## Useful as a failsafe if an interactive scene closes unexpectedly.
|
||||
static func force_release_control(book: PageFlip2D) -> void:
|
||||
if not is_instance_valid(book): return
|
||||
book.call("_pageflip_set_input_enabled", true)
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# CONFIGURATION HELPERS
|
||||
# ==============================================================================
|
||||
|
||||
## Configures the visual properties of a Book instance via a dictionary.
|
||||
static func configure_visuals(book: PageFlip2D, data: Dictionary) -> void:
|
||||
if not is_instance_valid(book): return
|
||||
|
||||
if "pages" in data:
|
||||
book.pages_paths = data["pages"]
|
||||
book.call("_prepare_book_content")
|
||||
|
||||
if "cover_front_out" in data: book.tex_cover_front_out = data["cover_front_out"]
|
||||
if "cover_front_in" in data: book.tex_cover_front_in = data["cover_front_in"]
|
||||
if "cover_back_in" in data: book.tex_cover_back_in = data["cover_back_in"]
|
||||
if "cover_back_out" in data: book.tex_cover_back_out = data["cover_back_out"]
|
||||
|
||||
if "spine_col" in data: book.spine_color = data["spine_col"]
|
||||
if "spine_width" in data:
|
||||
book.spine_width = data["spine_width"]
|
||||
book.call("_build_spine")
|
||||
|
||||
if "size" in data:
|
||||
book.target_page_size = data["size"]
|
||||
book.call("_apply_new_size")
|
||||
|
||||
book.call("_update_static_visuals_immediate")
|
||||
book.call("_update_volume_visuals")
|
||||
|
||||
|
||||
## Configures the physics simulation of the page turning effect.
|
||||
static func configure_physics(book: PageFlip2D, data: Dictionary) -> void:
|
||||
if not is_instance_valid(book) or not book.dynamic_poly: return
|
||||
|
||||
var rigger = book.dynamic_poly
|
||||
for key in data.keys():
|
||||
rigger.set(key, data[key])
|
||||
|
||||
if rigger.has_method("rebuild"):
|
||||
rigger.rebuild(book.target_page_size)
|
||||
1
addons/PageFlip/book_api.gd.uid
Normal file
1
addons/PageFlip/book_api.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c2dx1dksgeey6
|
||||
1416
addons/PageFlip/page_flip.gd
Normal file
1416
addons/PageFlip/page_flip.gd
Normal file
File diff suppressed because it is too large
Load Diff
1
addons/PageFlip/page_flip.gd.uid
Normal file
1
addons/PageFlip/page_flip.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ctw83iqgqxjjt
|
||||
1980
addons/PageFlip/page_flip.tscn
Normal file
1980
addons/PageFlip/page_flip.tscn
Normal file
File diff suppressed because one or more lines are too long
587
addons/PageFlip/page_rigger.gd
Normal file
587
addons/PageFlip/page_rigger.gd
Normal file
@@ -0,0 +1,587 @@
|
||||
@tool
|
||||
class_name DynamicPage
|
||||
extends Polygon2D
|
||||
|
||||
# ==============================================================================
|
||||
# ENUMS & CONSTANTS
|
||||
# ==============================================================================
|
||||
|
||||
## Defines the material physical properties for the page simulation.
|
||||
enum PagePreset {
|
||||
CUSTOM,
|
||||
DEFAULT,
|
||||
STANDARD_PAPER,
|
||||
HEAVY_GRIMOIRE,
|
||||
LIGHT_MAGAZINE,
|
||||
OLD_SCROLL,
|
||||
RIGID_BOARD,
|
||||
WET_CLOTH,
|
||||
PLASTIC_SHEET,
|
||||
METAL_PLATE
|
||||
}
|
||||
|
||||
## Determines the direction of the page turn curve.
|
||||
enum CurlMode {
|
||||
STRAIGHT,
|
||||
TOP_CORNER_FIRST,
|
||||
BOTTOM_CORNER_FIRST
|
||||
}
|
||||
|
||||
const SKELETON_NAME = "AutoSkeleton"
|
||||
const SHADOW_NAME = "AutoShadow"
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# SIGNALS
|
||||
# ==============================================================================
|
||||
|
||||
signal change_page_requested
|
||||
signal end_animation
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# INTERNAL CACHE
|
||||
# ==============================================================================
|
||||
|
||||
var _custom_cache: Dictionary = {}
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================
|
||||
|
||||
@export_category("Rig Generator")
|
||||
|
||||
## Horizontal mesh subdivision. Higher values create smoother bends.
|
||||
@export_range(1, 20) var subdivision_x: int = 8
|
||||
## Vertical mesh subdivision. Higher values allow for better corner curling.
|
||||
@export_range(1, 10) var subdivision_y: int = 5
|
||||
## Generates the mesh, skeleton, weights and animations.
|
||||
@export var rebuild_all: bool = false : set = _on_generate_pressed
|
||||
|
||||
|
||||
@export_category("Animation Generator")
|
||||
|
||||
@export_group("Quick Presets")
|
||||
## Select a material style to auto-configure physics.
|
||||
@export var animation_preset: PagePreset = PagePreset.CUSTOM : set = _on_preset_changed
|
||||
|
||||
|
||||
@export_group("Manual Configuration")
|
||||
## The AnimationPlayer node to store the generated animations.
|
||||
@export var anim_player: AnimationPlayer
|
||||
## Duration of the page turn animation in seconds.
|
||||
@export var anim_duration: float = 0.75
|
||||
|
||||
|
||||
@export_subgroup("Paper Physics")
|
||||
## Stiffness of the material. 0.5 = Rubber, 5.0 = Wood.
|
||||
@export_range(0.5, 5.0, 0.1) var paper_stiffness: float = 2.0
|
||||
## Bend angle during the lift phase (Negative = Tip drags down).
|
||||
@export_range(-180.0, 180.0) var lift_bend: float = -10.0
|
||||
## Bend angle during the landing phase (Negative = Tip floats up).
|
||||
@export_range(-180.0, 180.0) var land_bend: float = -8.0
|
||||
|
||||
|
||||
@export_subgroup("Curl Effect")
|
||||
## Which part of the page initiates the movement.
|
||||
@export var curl_mode: CurlMode = CurlMode.TOP_CORNER_FIRST
|
||||
## Time delay for the trailing corner (0.0 = None, 1.0 = High lag).
|
||||
@export_range(0.0, 1.0, 0.05) var curl_lag: float = 0.8
|
||||
|
||||
|
||||
@export_subgroup("Shadow FX")
|
||||
## Create a dynamic shadow behind the page (Background Shadow).
|
||||
@export var enable_shadow: bool = false
|
||||
## The gradient texture used for the back shadow.
|
||||
@export var shadow_gradient: GradientTexture2D
|
||||
|
||||
|
||||
@export_subgroup("Fine Timing")
|
||||
## Normalized time (0.0 - 1.0) for the peak lift position.
|
||||
@export_range(0.05, 0.45, 0.01) var timing_peak_lift: float = 0.15
|
||||
## Normalized time (0.0 - 1.0) for the landing contact.
|
||||
@export_range(0.55, 0.95, 0.01) var timing_peak_land: float = 0.85
|
||||
|
||||
@export var generate_anims_btn: bool = false : set = _on_anim_pressed
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# RUNTIME INITIALIZATION
|
||||
# ==============================================================================
|
||||
|
||||
func _ready():
|
||||
self.z_index = 10
|
||||
if animation_preset == PagePreset.CUSTOM:
|
||||
_save_state_to_cache()
|
||||
|
||||
|
||||
func rebuild(current_page_size: Vector2 = Vector2.ZERO) -> void:
|
||||
if not anim_player: return
|
||||
_clean_previous_rig()
|
||||
_create_rig_logic(current_page_size)
|
||||
_generate_animations_logic()
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# PRESET LOGIC
|
||||
# ==============================================================================
|
||||
|
||||
func _on_preset_changed(val):
|
||||
if animation_preset == PagePreset.CUSTOM:
|
||||
_save_state_to_cache()
|
||||
|
||||
animation_preset = val
|
||||
|
||||
if val == PagePreset.CUSTOM:
|
||||
if not _custom_cache.is_empty():
|
||||
_load_state_from_cache()
|
||||
print("[PageRigger] Restored Custom Settings.")
|
||||
notify_property_list_changed()
|
||||
return
|
||||
|
||||
# Defaults
|
||||
curl_mode = CurlMode.BOTTOM_CORNER_FIRST
|
||||
curl_lag = 0.3
|
||||
enable_shadow = false
|
||||
anim_duration = 0.75
|
||||
|
||||
match val:
|
||||
PagePreset.DEFAULT:
|
||||
paper_stiffness = 2.0; lift_bend = -15.0; land_bend = 5.0
|
||||
curl_mode = CurlMode.TOP_CORNER_FIRST; curl_lag = 0.5
|
||||
anim_duration = 0.75; timing_peak_lift = 0.15; timing_peak_land = 0.85
|
||||
|
||||
PagePreset.STANDARD_PAPER:
|
||||
paper_stiffness = 2.5; lift_bend = -12.0; land_bend = 3.0
|
||||
curl_mode = CurlMode.TOP_CORNER_FIRST; curl_lag = 0.4
|
||||
anim_duration = 0.65; timing_peak_lift = 0.12; timing_peak_land = 0.88
|
||||
|
||||
PagePreset.HEAVY_GRIMOIRE:
|
||||
paper_stiffness = 4.0; lift_bend = -3.0; land_bend = 1.0
|
||||
curl_mode = CurlMode.STRAIGHT; curl_lag = 0.1
|
||||
anim_duration = 1.1; timing_peak_lift = 0.25; timing_peak_land = 0.75
|
||||
|
||||
PagePreset.LIGHT_MAGAZINE:
|
||||
paper_stiffness = 0.8; lift_bend = -16.0; land_bend = 0.0
|
||||
curl_mode = CurlMode.BOTTOM_CORNER_FIRST; curl_lag = 0.6
|
||||
anim_duration = 0.8; timing_peak_lift = 0.10; timing_peak_land = 0.92
|
||||
|
||||
PagePreset.OLD_SCROLL:
|
||||
paper_stiffness = 1.8; lift_bend = -20.0; land_bend = 8.0
|
||||
curl_mode = CurlMode.TOP_CORNER_FIRST; curl_lag = 0.9
|
||||
anim_duration = 0.9; timing_peak_lift = 0.18; timing_peak_land = 0.82
|
||||
|
||||
PagePreset.RIGID_BOARD:
|
||||
paper_stiffness = 5.0; lift_bend = 0.0; land_bend = 0.0
|
||||
curl_mode = CurlMode.STRAIGHT; curl_lag = 0.0
|
||||
anim_duration = 0.8; timing_peak_lift = 0.2; timing_peak_land = 0.8
|
||||
|
||||
PagePreset.WET_CLOTH:
|
||||
paper_stiffness = 0.3; lift_bend = -28.0; land_bend = -0.0
|
||||
curl_mode = CurlMode.BOTTOM_CORNER_FIRST; curl_lag = 0.6
|
||||
anim_duration = 1.3; timing_peak_lift = 0.2; timing_peak_land = 0.95
|
||||
|
||||
PagePreset.PLASTIC_SHEET:
|
||||
paper_stiffness = 3.5; lift_bend = -12.0; land_bend = 12.0
|
||||
curl_mode = CurlMode.TOP_CORNER_FIRST; curl_lag = 0.2
|
||||
anim_duration = 0.5; timing_peak_lift = 0.08; timing_peak_land = 0.92
|
||||
|
||||
PagePreset.METAL_PLATE:
|
||||
paper_stiffness = 5.0; lift_bend = 0.0; land_bend = 0.0
|
||||
curl_mode = CurlMode.STRAIGHT; curl_lag = 0.0
|
||||
anim_duration = 1.4; timing_peak_lift = 0.15; timing_peak_land = 0.98
|
||||
|
||||
notify_property_list_changed()
|
||||
if anim_player and skeleton != NodePath(""):
|
||||
_generate_animations_logic()
|
||||
print("[PageRigger] Preset Applied: ", PagePreset.keys()[val])
|
||||
|
||||
|
||||
func _save_state_to_cache():
|
||||
_custom_cache = {
|
||||
"stiffness": paper_stiffness, "lift": lift_bend, "land": land_bend,
|
||||
"curl_m": curl_mode, "curl_l": curl_lag,
|
||||
"t_lift": timing_peak_lift, "t_land": timing_peak_land,
|
||||
"dur": anim_duration, "shadow": enable_shadow
|
||||
}
|
||||
|
||||
|
||||
func _load_state_from_cache():
|
||||
paper_stiffness = _custom_cache.get("stiffness", 1.5)
|
||||
lift_bend = _custom_cache.get("lift", -30.0)
|
||||
land_bend = _custom_cache.get("land", -15.0)
|
||||
curl_mode = _custom_cache.get("curl_m", CurlMode.BOTTOM_CORNER_FIRST)
|
||||
curl_lag = _custom_cache.get("curl_l", 0.3)
|
||||
timing_peak_lift = _custom_cache.get("t_lift", 0.15)
|
||||
timing_peak_land = _custom_cache.get("t_land", 0.85)
|
||||
anim_duration = _custom_cache.get("dur", 1.0)
|
||||
enable_shadow = false # Force disable shadow
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# RIGGING LOGIC
|
||||
# ==============================================================================
|
||||
|
||||
func _calculate_polygon_rect() -> Rect2:
|
||||
if polygon.size() == 0:
|
||||
return Rect2(0,0,0,0)
|
||||
|
||||
var min_v = polygon[0]
|
||||
var max_v = polygon[0]
|
||||
|
||||
for v in polygon:
|
||||
min_v.x = min(min_v.x, v.x)
|
||||
min_v.y = min(min_v.y, v.y)
|
||||
max_v.x = max(max_v.x, v.x)
|
||||
max_v.y = max(max_v.y, v.y)
|
||||
|
||||
return Rect2(min_v, max_v - min_v)
|
||||
|
||||
|
||||
func _create_rig_logic(current_page_size: Vector2 = Vector2.ZERO):
|
||||
self.z_index = 10
|
||||
|
||||
var original_size = Vector2(512, 820)
|
||||
var tex_size: Vector2 = Vector2.ZERO
|
||||
if current_page_size != Vector2.ZERO:
|
||||
tex_size = current_page_size
|
||||
elif texture:
|
||||
tex_size = texture.get_size()
|
||||
if tex_size == Vector2.ZERO:
|
||||
tex_size = original_size
|
||||
|
||||
var step_x = tex_size.x / subdivision_x
|
||||
var step_y = tex_size.y / subdivision_y
|
||||
|
||||
# Prepare Gradient Texture for Background Shadow
|
||||
var applied_shadow_tex: Texture2D = null
|
||||
if not shadow_gradient:
|
||||
shadow_gradient = preload("uid://rm7bporlv3cf")
|
||||
var dup = shadow_gradient.duplicate()
|
||||
if dup is GradientTexture2D:
|
||||
dup.width = int(tex_size.x)
|
||||
applied_shadow_tex = dup
|
||||
|
||||
# --- 0. BACKGROUND SHADOW ---
|
||||
if enable_shadow:
|
||||
var shadow = Polygon2D.new()
|
||||
shadow.name = SHADOW_NAME
|
||||
shadow.z_index = -1
|
||||
|
||||
if applied_shadow_tex:
|
||||
shadow.texture = applied_shadow_tex
|
||||
shadow.color = Color.WHITE
|
||||
else:
|
||||
shadow.color = Color(0, 0, 0, 0.5)
|
||||
|
||||
var margin = 4.0
|
||||
shadow.polygon = PackedVector2Array([
|
||||
Vector2(margin, margin), Vector2(tex_size.x - margin, margin),
|
||||
Vector2(tex_size.x - margin, tex_size.y - margin), Vector2(margin, tex_size.y - margin)
|
||||
])
|
||||
shadow.uv = shadow.polygon
|
||||
add_child(shadow)
|
||||
|
||||
# --- 1. MESH & UV ---
|
||||
var new_uvs = PackedVector2Array()
|
||||
for y in range(subdivision_y + 1):
|
||||
for x in range(subdivision_x + 1):
|
||||
new_uvs.append(Vector2(x * step_x, y * step_y))
|
||||
self.uv = new_uvs
|
||||
self.polygon = new_uvs
|
||||
|
||||
var new_polygons = []
|
||||
var rc = subdivision_x + 1
|
||||
for y in range(subdivision_y):
|
||||
for x in range(subdivision_x):
|
||||
var i = y * rc + x
|
||||
new_polygons.append(PackedInt32Array([i, i + 1, i + rc + 1, i + rc]))
|
||||
self.polygons = new_polygons
|
||||
|
||||
# --- 2. SKELETON ---
|
||||
var sk = Skeleton2D.new()
|
||||
sk.name = SKELETON_NAME
|
||||
add_child(sk)
|
||||
self.skeleton = NodePath(SKELETON_NAME)
|
||||
|
||||
# --- 3. BONES (Structured Hierarchy) ---
|
||||
for y in range(subdivision_y + 1):
|
||||
var parent_bone: Bone2D = null
|
||||
|
||||
for x in range(subdivision_x + 1):
|
||||
var b = Bone2D.new()
|
||||
b.name = "Bone_%d_%d" % [x, y]
|
||||
b.set_autocalculate_length_and_angle(false)
|
||||
b.set_length(step_x)
|
||||
|
||||
if x == 0:
|
||||
# Root bone (Spine)
|
||||
sk.add_child(b)
|
||||
b.position = Vector2(0, y * step_y)
|
||||
else:
|
||||
# Child bone
|
||||
if parent_bone:
|
||||
parent_bone.add_child(b)
|
||||
b.position = Vector2(step_x, 0)
|
||||
|
||||
b.set_rest(b.transform)
|
||||
parent_bone = b
|
||||
|
||||
# --- 4. WEIGHTS (Gradient Skinning) ---
|
||||
_apply_weights_to_polygon(self, sk)
|
||||
|
||||
queue_redraw()
|
||||
notify_property_list_changed()
|
||||
|
||||
|
||||
func _apply_weights_to_polygon(poly: Polygon2D, sk: Skeleton2D):
|
||||
poly.clear_bones()
|
||||
|
||||
var bone_map = {}
|
||||
for y in range(subdivision_y + 1):
|
||||
for x in range(subdivision_x + 1):
|
||||
var bname = "Bone_%d_%d" % [x, y]
|
||||
var bone_node = sk.find_child(bname, true, false)
|
||||
if bone_node:
|
||||
bone_map[bname] = bone_node.get_path()
|
||||
|
||||
var vertex_count = poly.polygon.size()
|
||||
|
||||
var weights_per_bone = {}
|
||||
|
||||
for bpath in bone_map.values():
|
||||
var w_arr = PackedFloat32Array()
|
||||
w_arr.resize(vertex_count)
|
||||
w_arr.fill(0.0)
|
||||
weights_per_bone[bpath] = w_arr
|
||||
|
||||
var vert_idx = 0
|
||||
for y in range(subdivision_y + 1):
|
||||
for x in range(subdivision_x + 1):
|
||||
var primary_name = "Bone_%d_%d" % [x, y]
|
||||
var prev_name = "Bone_%d_%d" % [x - 1, y]
|
||||
var next_name = "Bone_%d_%d" % [x + 1, y]
|
||||
|
||||
var primary_path = bone_map.get(primary_name)
|
||||
var prev_path = bone_map.get(prev_name)
|
||||
var next_path = bone_map.get(next_name)
|
||||
|
||||
var w_center = 0.7
|
||||
var w_neighbor = 0.15
|
||||
|
||||
if primary_path: weights_per_bone[primary_path][vert_idx] += w_center
|
||||
if prev_path: weights_per_bone[prev_path][vert_idx] += w_neighbor
|
||||
else: weights_per_bone[primary_path][vert_idx] += w_neighbor
|
||||
if next_path: weights_per_bone[next_path][vert_idx] += w_neighbor
|
||||
else: weights_per_bone[primary_path][vert_idx] += w_neighbor
|
||||
|
||||
vert_idx += 1
|
||||
|
||||
for bpath in weights_per_bone:
|
||||
poly.add_bone(bpath, weights_per_bone[bpath])
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# ANIMATION LOGIC
|
||||
# ==============================================================================
|
||||
|
||||
func _generate_animations_logic():
|
||||
var library: AnimationLibrary
|
||||
if anim_player.has_animation_library(""): library = anim_player.get_animation_library("")
|
||||
else: library = AnimationLibrary.new(); anim_player.add_animation_library("", library)
|
||||
|
||||
_create_single_anim(library, "turn_flexible_page", false, false)
|
||||
_create_single_anim(library, "turn_rigid_page", true, false)
|
||||
_create_single_anim(library, "turn_flexible_page_mirror", false, true)
|
||||
_create_single_anim(library, "turn_rigid_page_mirror", true, true)
|
||||
notify_property_list_changed()
|
||||
|
||||
|
||||
func _create_single_anim(library: AnimationLibrary, anim_name: String, is_rigid: bool, is_mirror: bool):
|
||||
var anim = Animation.new()
|
||||
anim.length = anim_duration
|
||||
anim.step = 0.01
|
||||
|
||||
if library.has_animation(anim_name): library.remove_animation(anim_name)
|
||||
library.add_animation(anim_name, anim)
|
||||
|
||||
var sk_node = find_child(SKELETON_NAME, true, false)
|
||||
if not sk_node: return
|
||||
|
||||
var my_path = anim_player.get_node(anim_player.root_node).get_path_to(self)
|
||||
|
||||
var visible_col = Color(1, 1, 1, 1)
|
||||
var invisible_col = Color(1, 1, 1, 0)
|
||||
var faded_col = Color(1, 1, 1, 0.6)
|
||||
|
||||
var t_mid = anim_duration * 0.5
|
||||
var t_end_snap = anim_duration * 0.95
|
||||
|
||||
# ==========================================================================
|
||||
# 1. VISIBILITY & Z-INDEX
|
||||
# ==========================================================================
|
||||
var z_track = anim.add_track(Animation.TYPE_VALUE)
|
||||
anim.track_set_path(z_track, str(my_path) + ":z_index")
|
||||
anim.track_set_interpolation_type(z_track, Animation.INTERPOLATION_NEAREST)
|
||||
anim.track_insert_key(z_track, 0.0, 10)
|
||||
anim.track_insert_key(z_track, anim_duration * 0.15, 25)
|
||||
anim.track_insert_key(z_track, anim_duration * 0.65, 10)
|
||||
|
||||
# ==========================================================================
|
||||
# 2. BACKGROUND SHADOW
|
||||
# ==========================================================================
|
||||
var shadow_node = find_child(SHADOW_NAME, true, false)
|
||||
if shadow_node and enable_shadow:
|
||||
var shadow_path = anim_player.get_node(anim_player.root_node).get_path_to(shadow_node)
|
||||
var t_scale = anim.add_track(Animation.TYPE_VALUE)
|
||||
anim.track_set_path(t_scale, str(shadow_path) + ":scale")
|
||||
anim.track_set_interpolation_type(t_scale, Animation.INTERPOLATION_CUBIC)
|
||||
var t_mod = anim.add_track(Animation.TYPE_VALUE)
|
||||
anim.track_set_path(t_mod, str(shadow_path) + ":modulate")
|
||||
|
||||
var s_start = Vector2(-1.0, 1.0) if is_mirror else Vector2(1.0, 1.0)
|
||||
var s_end = Vector2(1.0, 1.0) if is_mirror else Vector2(-1.0, 1.0)
|
||||
|
||||
anim.track_insert_key(t_scale, 0.0, s_start)
|
||||
anim.track_insert_key(t_mod, 0.0, invisible_col)
|
||||
anim.track_insert_key(t_mod, anim_duration * 0.1, visible_col)
|
||||
|
||||
anim.track_insert_key(t_scale, t_mid, Vector2(0.01, 1.0))
|
||||
anim.track_insert_key(t_mod, t_mid, faded_col)
|
||||
|
||||
anim.track_insert_key(t_scale, t_end_snap, s_end)
|
||||
anim.track_insert_key(t_scale, anim_duration, s_end)
|
||||
anim.track_insert_key(t_mod, t_end_snap, invisible_col)
|
||||
anim.track_insert_key(t_mod, anim_duration, invisible_col)
|
||||
|
||||
# ==========================================================================
|
||||
# 3. BONE ANIMATION
|
||||
# ==========================================================================
|
||||
for y in range(subdivision_y + 1):
|
||||
var row_factor = 1.0
|
||||
if not is_rigid and curl_mode != CurlMode.STRAIGHT:
|
||||
var y_ratio = float(y) / float(max(1, subdivision_y))
|
||||
if curl_mode == CurlMode.TOP_CORNER_FIRST:
|
||||
row_factor = lerp(1.0, 1.0 - curl_lag, y_ratio)
|
||||
elif curl_mode == CurlMode.BOTTOM_CORNER_FIRST:
|
||||
row_factor = lerp(1.0 - curl_lag, 1.0, y_ratio)
|
||||
|
||||
var time_offset = (1.0 - row_factor) * (anim_duration * 0.1)
|
||||
|
||||
for x in range(subdivision_x + 1):
|
||||
var bone_name = "Bone_%d_%d" % [x, y]
|
||||
var bone = sk_node.find_child(bone_name, true, false)
|
||||
if not bone: continue
|
||||
|
||||
var t_idx = anim.add_track(Animation.TYPE_VALUE)
|
||||
var path = anim_player.get_node(anim_player.root_node).get_path_to(bone)
|
||||
anim.track_set_path(t_idx, str(path) + ":rotation_degrees")
|
||||
anim.track_set_interpolation_type(t_idx, Animation.INTERPOLATION_CUBIC)
|
||||
|
||||
var deg_flat_right = 0.0; var deg_flat_left = -179.9; var deg_mid = -90.0
|
||||
|
||||
if is_rigid:
|
||||
if x == 0:
|
||||
var s = deg_flat_left if is_mirror else deg_flat_right
|
||||
var e = deg_flat_right if is_mirror else deg_flat_left
|
||||
anim.track_insert_key(t_idx, 0.0, s)
|
||||
anim.track_insert_key(t_idx, anim_duration * 0.5, deg_mid)
|
||||
anim.track_insert_key(t_idx, anim_duration, e)
|
||||
else:
|
||||
anim.track_insert_key(t_idx, 0.0, 0.0)
|
||||
anim.track_insert_key(t_idx, anim_duration, 0.0)
|
||||
else:
|
||||
var x_ratio = float(x) / float(subdivision_x)
|
||||
var influence = pow(x_ratio, paper_stiffness)
|
||||
var t_lift = clamp((anim_duration * timing_peak_lift) + time_offset, 0.0, (anim_duration * 0.5) - 0.05)
|
||||
var t_mid_bone = anim_duration * 0.5
|
||||
var t_land = clamp((anim_duration * timing_peak_land) - time_offset, t_mid_bone + 0.05, anim_duration)
|
||||
|
||||
if x == 0:
|
||||
# ROOT BONE
|
||||
var s = deg_flat_left if is_mirror else deg_flat_right
|
||||
var e = deg_flat_right if is_mirror else deg_flat_left
|
||||
var sl = -15.0 * row_factor
|
||||
if is_mirror: sl = deg_flat_left - sl
|
||||
var slt = lerp(-90.0, -180.0, timing_peak_land)
|
||||
if is_mirror: slt = lerp(-90.0, 0.0, timing_peak_land)
|
||||
|
||||
anim.track_insert_key(t_idx, 0.0, s)
|
||||
anim.track_insert_key(t_idx, t_lift, sl)
|
||||
anim.track_insert_key(t_idx, t_mid_bone, deg_mid)
|
||||
anim.track_insert_key(t_idx, t_land, slt)
|
||||
|
||||
var t_settle = lerp(t_land, anim_duration, 0.7)
|
||||
var s_settle = lerp(slt, e, 0.85)
|
||||
anim.track_insert_key(t_idx, t_settle, s_settle)
|
||||
|
||||
anim.track_insert_key(t_idx, anim_duration, e)
|
||||
else:
|
||||
# SURFACE BONES (CURVED)
|
||||
var bm = -1.0 if is_mirror else 1.0
|
||||
|
||||
anim.track_insert_key(t_idx, 0.0, 0.0)
|
||||
anim.track_insert_key(t_idx, t_lift, lift_bend * row_factor * bm * influence)
|
||||
# REMOVED FORCED 0.0 AT MIDPOINT FOR ORGANIC CURVE
|
||||
|
||||
var val_land = land_bend * row_factor * bm * influence
|
||||
anim.track_insert_key(t_idx, t_land, val_land)
|
||||
|
||||
var t_settle = lerp(t_land, anim_duration, 0.75)
|
||||
anim.track_insert_key(t_idx, t_settle, val_land * 0.15)
|
||||
|
||||
anim.track_insert_key(t_idx, anim_duration, 0.0)
|
||||
|
||||
# ==========================================================================
|
||||
# 4. MAIN POLYGON SCALE ("SQUASH & STRETCH")
|
||||
# ==========================================================================
|
||||
if not is_rigid:
|
||||
var t_main_scale = anim.add_track(Animation.TYPE_VALUE)
|
||||
anim.track_set_path(t_main_scale, str(my_path) + ":scale")
|
||||
anim.track_set_interpolation_type(t_main_scale, Animation.INTERPOLATION_LINEAR)
|
||||
var squash_x = 0.88
|
||||
|
||||
anim.track_insert_key(t_main_scale, 0.0, Vector2(1, 1))
|
||||
anim.track_insert_key(t_main_scale, t_mid, Vector2(1, 1))
|
||||
anim.track_insert_key(t_main_scale, t_mid + (anim_duration * 0.1), Vector2(squash_x, 1))
|
||||
anim.track_insert_key(t_main_scale, anim_duration * 0.85, Vector2(1, 1))
|
||||
anim.track_insert_key(t_main_scale, anim_duration, Vector2(1, 1))
|
||||
|
||||
var method_track = anim.add_track(Animation.TYPE_METHOD)
|
||||
anim.track_set_path(method_track, str(my_path))
|
||||
anim.track_insert_key(method_track, anim_duration * 0.5, {"method": "_trigger_midpoint", "args": []})
|
||||
anim.track_insert_key(method_track, anim_duration, {"method": "_trigger_end", "args": []})
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# HELPER FUNCTIONS
|
||||
# ==============================================================================
|
||||
|
||||
func _trigger_midpoint(): emit_signal("change_page_requested")
|
||||
func _trigger_end(): emit_signal("end_animation")
|
||||
|
||||
|
||||
func _on_generate_pressed(val):
|
||||
if val:
|
||||
rebuild_all=false
|
||||
_clean_previous_rig()
|
||||
_create_rig_logic()
|
||||
_generate_animations_logic()
|
||||
|
||||
|
||||
func _on_anim_pressed(val):
|
||||
if val:
|
||||
generate_anims_btn=false
|
||||
if anim_player and skeleton!=NodePath(""):
|
||||
_generate_animations_logic()
|
||||
|
||||
|
||||
func _clean_previous_rig():
|
||||
for c in get_children():
|
||||
remove_child(c)
|
||||
c.free()
|
||||
var old_shadow = find_child(SHADOW_NAME, true, false)
|
||||
if old_shadow: old_shadow.free()
|
||||
clear_bones()
|
||||
skeleton = NodePath("")
|
||||
1
addons/PageFlip/page_rigger.gd.uid
Normal file
1
addons/PageFlip/page_rigger.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ce5ib2f4qff24
|
||||
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/androidarm64/libsteam_api.so
Normal file
BIN
addons/godotsteam/androidarm64/libsteam_api.so
Normal file
Binary file not shown.
8
addons/godotsteam/editor/steamworks_panel.gd
Normal file
8
addons/godotsteam/editor/steamworks_panel.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
@onready var container_frame: VBoxContainer = %ContainerFrame
|
||||
|
||||
|
||||
func add_companion_dock(companion_dock: Control) -> void:
|
||||
container_frame.add_child(companion_dock)
|
||||
1
addons/godotsteam/editor/steamworks_panel.gd.uid
Normal file
1
addons/godotsteam/editor/steamworks_panel.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://1oo0gvamoxgp
|
||||
125
addons/godotsteam/editor/steamworks_panel.tscn
Normal file
125
addons/godotsteam/editor/steamworks_panel.tscn
Normal file
@@ -0,0 +1,125 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cyniebd6yahu5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1oo0gvamoxgp" path="res://addons/godotsteam/editor/steamworks_panel.gd" id="1_qn6cd"]
|
||||
[ext_resource type="Script" uid="uid://b4nvgu7h84u53" path="res://addons/godotsteam/editor/updates/updates.gd" id="2_qn6cd"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qn6cd"]
|
||||
content_margin_top = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0.0980392, 0.0980392, 0.0980392, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qf1vo"]
|
||||
content_margin_top = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0.337255, 0.619608, 1, 1)
|
||||
|
||||
[sub_resource type="Theme" id="Theme_sqmbs"]
|
||||
ProgressBar/styles/background = SubResource("StyleBoxFlat_qn6cd")
|
||||
ProgressBar/styles/fill = SubResource("StyleBoxFlat_qf1vo")
|
||||
|
||||
[node name="Steamworks" type="Control"]
|
||||
process_mode = 3
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_qn6cd")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Scroller" type="ScrollContainer" parent="."]
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="DockFrame" type="TabContainer" parent="Scroller"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Updates" type="MarginContainer" parent="Scroller/DockFrame"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
script = ExtResource("2_qn6cd")
|
||||
metadata/_tab_index = 0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ContainerFrame" type="VBoxContainer" parent="Scroller/DockFrame/Updates"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="HFrame" type="HBoxContainer" parent="Scroller/DockFrame/Updates/ContainerFrame"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 25
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Type" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"]
|
||||
custom_minimum_size = Vector2(125, 25)
|
||||
layout_mode = 2
|
||||
text = "GodotSteam"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="InstalledLabel" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Installed version 4.18"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="UpdateLabel" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Updating" type="HBoxContainer" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
theme_override_constants/separation = 25
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Downloading" type="ProgressBar" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(200, 30)
|
||||
layout_mode = 2
|
||||
theme = SubResource("Theme_sqmbs")
|
||||
step = 1.0
|
||||
rounded = true
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="InstallButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Install"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="UpdateButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
disabled = true
|
||||
text = "Up-to-date"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="CancelButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Cancel"
|
||||
metadata/_edit_lock_ = true
|
||||
1
addons/godotsteam/editor/ui/steam.svg
Normal file
1
addons/godotsteam/editor/ui/steam.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="50px" height="50px" fill-rule="nonzero"><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.12,5.12)"><path d="M25,3c-11.41,0 -20.79062,8.68078 -21.89062,19.80078l11.19141,5.72852c1.13,-0.95 2.59922,-1.5293 4.19922,-1.5293h0.05078c0.39,-0.6 0.83859,-1.35086 1.30859,-2.13086c0.98,-1.61 2.08016,-3.43008 3.16016,-4.83008c0.24,-4.47 3.95047,-8.03906 8.48047,-8.03906c4.69,0 8.5,3.81 8.5,8.5c0,4.53 -3.56906,8.24047 -8.03906,8.48047c-1.4,1.08 -3.21008,2.18039 -4.83008,3.15039c-0.78,0.48 -1.53086,0.92836 -2.13086,1.31836v0.05078c0,3.59 -2.91,6.5 -6.5,6.5c-3.59,0 -6.5,-2.91 -6.5,-6.5c0,-0.17 0.00953,-0.33 0.01953,-0.5l-8.74023,-4.48047c1.69,10.48 10.7707,18.48047 21.7207,18.48047c12.15,0 22,-9.85 22,-22c0,-12.15 -9.85,-22 -22,-22zM31.5,14c-3.58,0 -6.5,2.92 -6.5,6.5c0,3.58 2.92,6.5 6.5,6.5c3.58,0 6.5,-2.92 6.5,-6.5c0,-3.58 -2.92,-6.5 -6.5,-6.5zM31.5,16c2.49,0 4.5,2.01 4.5,4.5c0,2.49 -2.01,4.5 -4.5,4.5c-2.49,0 -4.5,-2.01 -4.5,-4.5c0,-2.49 2.01,-4.5 4.5,-4.5zM18.5,29c-0.79,0 -1.53969,0.20031 -2.17969,0.57031l3.32031,1.69922c1.23,0.63 1.70984,2.14109 1.08984,3.37109c-0.45,0.86 -1.32047,1.35938 -2.23047,1.35938c-0.39,0 -0.77062,-0.08953 -1.14062,-0.26953l-3.33008,-1.71094c0.26,2.24 2.1607,3.98047 4.4707,3.98047c2.49,0 4.5,-2.01 4.5,-4.5c0,-2.49 -2.01,-4.5 -4.5,-4.5z"></path></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
43
addons/godotsteam/editor/ui/steam.svg.import
Normal file
43
addons/godotsteam/editor/ui/steam.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhn3vkdxvetbn"
|
||||
path="res://.godot/imported/steam.svg-1c1b1c87b286630e8735047e7af015ac.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/godotsteam/editor/ui/steam.svg"
|
||||
dest_files=["res://.godot/imported/steam.svg-1c1b1c87b286630e8735047e7af015ac.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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
59
addons/godotsteam/editor/updates/confirmation.gd
Normal file
59
addons/godotsteam/editor/updates/confirmation.gd
Normal file
@@ -0,0 +1,59 @@
|
||||
@tool
|
||||
extends ConfirmationDialog
|
||||
|
||||
signal cancel_update
|
||||
signal continue_update
|
||||
|
||||
@onready var cancel_button: Button = %Cancel
|
||||
@onready var continue_button: Button = %Continue
|
||||
@onready var downloading: ProgressBar = %Downloading
|
||||
@onready var message: Label = %Message
|
||||
@onready var version_title: Label = %VersionTitle
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
connect_signals()
|
||||
set_defaults()
|
||||
|
||||
|
||||
#region Setup
|
||||
func set_defaults() -> void:
|
||||
size = Vector2(450, 330)
|
||||
get_ok_button().visible = false
|
||||
get_cancel_button().visible = false
|
||||
#endregion
|
||||
|
||||
|
||||
#region Signals
|
||||
func connect_signals() -> void:
|
||||
cancel_button.pressed.connect(_on_cancel_pressed)
|
||||
continue_button.pressed.connect(_on_continue_pressed)
|
||||
|
||||
|
||||
func _on_cancel_pressed() -> void:
|
||||
cancel_update.emit()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_continue_pressed() -> void:
|
||||
continue_update.emit()
|
||||
#endregion
|
||||
|
||||
|
||||
#region Updating text
|
||||
func update_interface(version_string: String, is_downloader: bool) -> void:
|
||||
if not is_node_ready(): await ready
|
||||
cancel_button.visible = true
|
||||
continue_button.visible = not is_downloader
|
||||
downloading.visible = is_downloader
|
||||
if is_downloader:
|
||||
message.text = "You are downloading the update, please wait. Closing this window will cancel the update."
|
||||
version_title.text = "Downloading GodotSteam %s" % version_string
|
||||
else:
|
||||
message.text = "You are about to update plug-in version to %s. The editor will restart at the end of this process." % version_string
|
||||
version_title.text = "Update To GodotSteam %s" % version_string
|
||||
|
||||
|
||||
func update_progress(new_percentage: int) -> void:
|
||||
downloading.value = new_percentage
|
||||
#endregion
|
||||
1
addons/godotsteam/editor/updates/confirmation.gd.uid
Normal file
1
addons/godotsteam/editor/updates/confirmation.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bjb747gou4fbo
|
||||
174
addons/godotsteam/editor/updates/confirmation.tscn
Normal file
174
addons/godotsteam/editor/updates/confirmation.tscn
Normal file
@@ -0,0 +1,174 @@
|
||||
[gd_scene format=3 uid="uid://bb6pyk4s77qvo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bjb747gou4fbo" path="res://addons/godotsteam/editor/updates/confirmation.gd" id="1_fskym"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhn3vkdxvetbn" path="res://addons/godotsteam/editor/ui/steam.svg" id="1_xklt4"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cnr4s"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jjufo"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_fskym"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0ql43"]
|
||||
content_margin_left = 10.0
|
||||
content_margin_top = 5.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.3372549, 0.61960787, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_apu4b"]
|
||||
content_margin_left = 10.0
|
||||
content_margin_top = 5.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.09803922, 0.09803922, 0.09803922, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bi3ss"]
|
||||
content_margin_left = 10.0
|
||||
content_margin_top = 5.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cnr4s"]
|
||||
content_margin_top = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0.09803922, 0.09803922, 0.09803922, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jjufo"]
|
||||
content_margin_top = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0.3372549, 0.61960787, 1, 1)
|
||||
|
||||
[sub_resource type="Theme" id="Theme_cnr4s"]
|
||||
AcceptDialog/constants/title_height = 0
|
||||
AcceptDialog/styles/embedded_border = SubResource("StyleBoxEmpty_cnr4s")
|
||||
AcceptDialog/styles/embedded_unfocused_border = SubResource("StyleBoxEmpty_jjufo")
|
||||
AcceptDialog/styles/panel = SubResource("StyleBoxEmpty_fskym")
|
||||
Button/colors/font_color = Color(1, 1, 1, 1)
|
||||
Button/styles/hover = SubResource("StyleBoxFlat_0ql43")
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_apu4b")
|
||||
Button/styles/pressed = SubResource("StyleBoxFlat_bi3ss")
|
||||
ProgressBar/styles/background = SubResource("StyleBoxFlat_cnr4s")
|
||||
ProgressBar/styles/fill = SubResource("StyleBoxFlat_jjufo")
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fskym"]
|
||||
bg_color = Color(0.15686275, 0.15686275, 0.15686275, 1)
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.3372549, 0.61960787, 1, 1)
|
||||
|
||||
[node name="Confirmation" type="ConfirmationDialog" unique_id=1649782113]
|
||||
transparent_bg = true
|
||||
oversampling_override = 1.0
|
||||
title = "Updating GodotSteam"
|
||||
initial_position = 1
|
||||
size = Vector2i(450, 330)
|
||||
visible = true
|
||||
wrap_controls = false
|
||||
unresizable = true
|
||||
borderless = true
|
||||
min_size = Vector2i(450, 200)
|
||||
keep_title_visible = false
|
||||
content_scale_mode = 1
|
||||
theme = SubResource("Theme_cnr4s")
|
||||
ok_button_text = "Continue"
|
||||
dialog_hide_on_ok = false
|
||||
dialog_close_on_escape = false
|
||||
script = ExtResource("1_fskym")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Panel" type="Panel" parent="." unique_id=336687509]
|
||||
custom_minimum_size = Vector2(450, 330)
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -225.0
|
||||
offset_top = -165.0
|
||||
offset_right = 225.0
|
||||
offset_bottom = 165.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fskym")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="Panel" unique_id=598549467]
|
||||
custom_minimum_size = Vector2(450, 330)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_top = 50
|
||||
theme_override_constants/margin_right = 50
|
||||
theme_override_constants/margin_bottom = 50
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="VFrame" type="VBoxContainer" parent="Panel/Margin" unique_id=7442794]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 15
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="HFrame" type="HBoxContainer" parent="Panel/Margin/VFrame" unique_id=1314013334]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 15
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="Panel/Margin/VFrame/HFrame" unique_id=521288466]
|
||||
custom_minimum_size = Vector2(26, 30)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_xklt4")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="VersionTitle" type="Label" parent="Panel/Margin/VFrame/HFrame" unique_id=906249057]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(275, 30)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
|
||||
theme_override_constants/outline_size = 1
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "Downloading GodotSteam 99.99"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Message" type="Label" parent="Panel/Margin/VFrame" unique_id=345793881]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(315, 85)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
text = "You are about to update plug-in version to %s. The editor will restart at the end of this process."
|
||||
autowrap_mode = 3
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Downloading" type="ProgressBar" parent="Panel/Margin/VFrame" unique_id=1922739661]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
step = 1.0
|
||||
value = 50.0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Options" type="HBoxContainer" parent="Panel/Margin/VFrame" unique_id=2126576529]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 10
|
||||
theme_override_constants/separation = 15
|
||||
alignment = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Continue" type="Button" parent="Panel/Margin/VFrame/Options" unique_id=851000998]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Continue"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Cancel" type="Button" parent="Panel/Margin/VFrame/Options" unique_id=1895267580]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Cancel"
|
||||
metadata/_edit_lock_ = true
|
||||
186
addons/godotsteam/editor/updates/updates.gd
Normal file
186
addons/godotsteam/editor/updates/updates.gd
Normal file
@@ -0,0 +1,186 @@
|
||||
@tool
|
||||
extends MarginContainer
|
||||
###
|
||||
# Super-huge thanks to Nathan Hoad and Marcus Skov for ideas and inspiration on how to create a
|
||||
# plug-in updater.
|
||||
###
|
||||
|
||||
const TEMP_FILE = "user://update.zip"
|
||||
const VERSION_URL: StringName = "https://godotengine.org/asset-library/api/asset/2445"
|
||||
|
||||
var download_location: String = ""
|
||||
var downloading_update: bool = false
|
||||
# This will act as both our version checker and update downloader
|
||||
var http_request: HTTPRequest = null
|
||||
var is_actively_downloading: bool = false
|
||||
var new_version: String = ""
|
||||
|
||||
@onready var cancel_button: Button = %CancelButton
|
||||
@onready var downloading: ProgressBar = %Downloading
|
||||
@onready var install_button: Button = %InstallButton
|
||||
@onready var installed_label: Label = %InstalledLabel
|
||||
@onready var update_label: Label = %UpdateLabel
|
||||
@onready var update_button: Button = %UpdateButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
connect_signals()
|
||||
set_defaults()
|
||||
check_for_updates()
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if is_actively_downloading:
|
||||
downloading.value = http_request.get_downloaded_bytes() * 100 / http_request.get_body_size()
|
||||
|
||||
|
||||
#region Setup
|
||||
func set_defaults() -> void:
|
||||
downloading.value = 0
|
||||
installed_label.text = "Installed version %s" % Steam.get_godotsteam_version()
|
||||
update_button.text = "Up-to-date"
|
||||
update_button.disabled = true
|
||||
update_label.text = ""
|
||||
updating_visibility(false, false, false, true)
|
||||
#endregion
|
||||
|
||||
|
||||
#region Signals
|
||||
func connect_signals() -> void:
|
||||
cancel_button.pressed.connect(_on_cancel_pressed)
|
||||
install_button.pressed.connect(_on_install_pressed)
|
||||
update_button.pressed.connect(_on_update_pressed)
|
||||
#endregion
|
||||
|
||||
|
||||
#region Checking for updates
|
||||
func check_for_updates() -> void:
|
||||
if not ProjectSettings.get_setting("steam/updates/godotsteam/check_for_updates"):
|
||||
return
|
||||
|
||||
http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(_on_http_request_completed)
|
||||
if http_request.request(VERSION_URL) != OK:
|
||||
printerr("Failed to request GodotSteam plug-in remote current version")
|
||||
|
||||
|
||||
func _on_http_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
|
||||
http_request.request_completed.disconnect(_on_http_request_completed)
|
||||
http_request.queue_free()
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS:
|
||||
return
|
||||
var response = JSON.parse_string(body.get_string_from_utf8())
|
||||
if response == null:
|
||||
return
|
||||
|
||||
download_location = response.download_url
|
||||
new_version = response.version_string
|
||||
|
||||
if convert_version(new_version) > convert_version(Steam.get_godotsteam_version()):
|
||||
print("New GodotSteam version %s available" % new_version)
|
||||
update_label.text = "New version %s" % new_version
|
||||
update_button.text = "Download"
|
||||
update_button.disabled = false
|
||||
#endregion
|
||||
|
||||
|
||||
#region Updating versions
|
||||
func _on_cancel_pressed() -> void:
|
||||
updating_visibility(false, false, false, true)
|
||||
|
||||
if is_actively_downloading:
|
||||
http_request.cancel_request()
|
||||
http_request.queue_free()
|
||||
is_actively_downloading = false
|
||||
update_label.text = "Canceling %s plug-in update download" % new_version
|
||||
else:
|
||||
DirAccess.remove_absolute(TEMP_FILE)
|
||||
update_label.text = "Canceling %s plug-in update and deleting temporary files" % new_version
|
||||
|
||||
update_button.text = "Download"
|
||||
update_button.disabled = false
|
||||
update_label.text = "New version %s" % new_version
|
||||
|
||||
|
||||
func _on_install_pressed() -> void:
|
||||
print("Removing older GodotSteam %s plug-in" % Steam.get_godotsteam_version())
|
||||
OS.move_to_trash(ProjectSettings.globalize_path("res://addons/godotsteam"))
|
||||
|
||||
update_button.text = "Unpacking"
|
||||
print("Unpacking new %s plug-in" % new_version)
|
||||
var zip_reader: ZIPReader = ZIPReader.new()
|
||||
zip_reader.open(TEMP_FILE)
|
||||
var files: PackedStringArray = zip_reader.get_files()
|
||||
|
||||
var base_path := files[1]
|
||||
# Remove archive folder
|
||||
files.remove_at(0)
|
||||
# Remove assets folder
|
||||
files.remove_at(0)
|
||||
|
||||
for path in files:
|
||||
var new_file_path: String = path.replace(base_path, "")
|
||||
if path.ends_with("/"):
|
||||
DirAccess.make_dir_recursive_absolute("res://addons/%s" % new_file_path)
|
||||
else:
|
||||
var file: FileAccess = FileAccess.open("res://addons/%s" % new_file_path, FileAccess.WRITE)
|
||||
file.store_buffer(zip_reader.read_file(path))
|
||||
|
||||
zip_reader.close()
|
||||
restart_post_update()
|
||||
|
||||
|
||||
func _on_update_pressed() -> void:
|
||||
is_actively_downloading = true
|
||||
update_label.text = "Downloading %s plug-in update, please wait" % new_version
|
||||
updating_visibility(true, true, false, false)
|
||||
|
||||
http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(_on_download_request_completed)
|
||||
if http_request.request(download_location) != OK:
|
||||
printerr("Failed to request %s plug-in update download" % new_version)
|
||||
is_actively_downloading = false
|
||||
update_button.text = "Failed"
|
||||
update_button.disabled = false
|
||||
return
|
||||
|
||||
|
||||
func _on_download_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
|
||||
http_request.request_completed.disconnect(_on_download_request_completed)
|
||||
http_request.queue_free()
|
||||
is_actively_downloading = false
|
||||
updating_visibility(true, false, true, false)
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS:
|
||||
printerr("Failed to download new GodotSteam version %s" % result)
|
||||
update_button.disabled = false
|
||||
return
|
||||
|
||||
update_label.text = "Update downloaded, ready to install %s" % new_version
|
||||
var zip_file: FileAccess = FileAccess.open(TEMP_FILE, FileAccess.WRITE)
|
||||
zip_file.store_buffer(body)
|
||||
zip_file.close()
|
||||
|
||||
|
||||
func restart_post_update() -> void:
|
||||
update_button.text = "Restarting"
|
||||
update_label.text = "Updated to version %s, restarting the editor" % new_version
|
||||
DirAccess.remove_absolute(TEMP_FILE)
|
||||
EditorInterface.restart_editor(true)
|
||||
#endregion
|
||||
|
||||
|
||||
#region Helpers
|
||||
func convert_version(version_string: String) -> int:
|
||||
return int(version_string.replace(".", "").rpad(4, "0"))
|
||||
|
||||
|
||||
func updating_visibility(cancel: bool, download: bool, install: bool, update: bool) -> void:
|
||||
cancel_button.visible = cancel
|
||||
downloading.visible = download
|
||||
install_button.visible = install
|
||||
update_button.visible = update
|
||||
#endregion
|
||||
1
addons/godotsteam/editor/updates/updates.gd.uid
Normal file
1
addons/godotsteam/editor/updates/updates.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b4nvgu7h84u53
|
||||
29
addons/godotsteam/godotsteam.gdextension
Normal file
29
addons/godotsteam/godotsteam.gdextension
Normal file
@@ -0,0 +1,29 @@
|
||||
[configuration]
|
||||
entry_symbol = "godotsteam_init"
|
||||
compatibility_minimum = "4.4"
|
||||
|
||||
[libraries]
|
||||
android.debug.arm64 = "res://addons/godotsteam/androidarm64/libgodotsteam.android.template_debug.arm64.so"
|
||||
android.release.arm64 = "res://addons/godotsteam/androidarm64/libgodotsteam.android.template_release.arm64.so"
|
||||
linux.debug.arm64 = "res://addons/godotsteam/linuxarm64/libgodotsteam.linux.template_debug.arm64.so"
|
||||
linux.debug.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so"
|
||||
linux.debug.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so"
|
||||
linux.release.arm64 = "res://addons/godotsteam/linuxarm64/libgodotsteam.linux.template_release.arm64.so"
|
||||
linux.release.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so"
|
||||
linux.release.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so"
|
||||
macos.debug = "res://addons/godotsteam/osx/libgodotsteam.macos.template_debug.dylib"
|
||||
macos.release = "res://addons/godotsteam/osx/libgodotsteam.macos.template_release.dylib"
|
||||
windows.debug.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll"
|
||||
windows.debug.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll"
|
||||
windows.release.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll"
|
||||
windows.release.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll"
|
||||
|
||||
[dependencies]
|
||||
android.arm64 = { "res://addons/godotsteam/androidarm64/libsteam_api.so": "" }
|
||||
linux.arm64 = { "res://addons/godotsteam/linuxarm64/libsteam_api.so": "" }
|
||||
linux.x86_64 = { "res://addons/godotsteam/linux64/libsteam_api.so": "" }
|
||||
linux.x86_32 = { "res://addons/godotsteam/linux32/libsteam_api.so": "" }
|
||||
macos.universal = { "res://addons/godotsteam/osx/libsteam_api.dylib": "" }
|
||||
windows.x86_64 = { "res://addons/godotsteam/win64/steam_api64.dll": "" }
|
||||
windows.x86_32 = { "res://addons/godotsteam/win32/steam_api.dll": "" }
|
||||
|
||||
1
addons/godotsteam/godotsteam.gdextension.uid
Normal file
1
addons/godotsteam/godotsteam.gdextension.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d4gadhvchsddo
|
||||
86
addons/godotsteam/godotsteam_plugin.gd
Normal file
86
addons/godotsteam/godotsteam_plugin.gd
Normal file
@@ -0,0 +1,86 @@
|
||||
@tool
|
||||
class_name GodotSteamPlugin
|
||||
extends EditorPlugin
|
||||
|
||||
const EDITOR_PANEL = preload("uid://cyniebd6yahu5")
|
||||
|
||||
static var dock_frame
|
||||
|
||||
var link_changelog: String = "[url=https://godotsteam.com/changelog/gdextension/]changelog[/url]"
|
||||
var link_website: String = "[url=https://godotsteam.com]website[/url]"
|
||||
var steamworks_dock: Control
|
||||
|
||||
|
||||
## Used specifically to add/remove additional dock content
|
||||
static func get_dock_frame() -> Control:
|
||||
return dock_frame
|
||||
|
||||
|
||||
func _enable_plugin() -> void:
|
||||
print("GodotSteam GDExtension updater functionality enabled")
|
||||
|
||||
|
||||
func _disable_plugin() -> void:
|
||||
print("GodotSteam GDEXtension updater functionality disabled")
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
print_rich("GodotSteam v%s | %s | %s" % [Steam.get_godotsteam_version(), link_website, link_changelog])
|
||||
add_project_settings()
|
||||
add_steamworks_dock()
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
remove_steamworks_dock()
|
||||
|
||||
|
||||
func _make_visible(visible) -> void:
|
||||
if steamworks_dock:
|
||||
steamworks_dock.set_visible(visible)
|
||||
|
||||
|
||||
#region Add and remove things
|
||||
func add_project_settings() -> void:
|
||||
# Used for the Updater looking for redist files and SteamCMD
|
||||
if not ProjectSettings.has_setting("steam/updates/godotsteam/check_for_updates"):
|
||||
ProjectSettings.set_setting("steam/updates/godotsteam/check_for_updates", true)
|
||||
ProjectSettings.add_property_info({
|
||||
"name": "steam/updates/godotsteam/check_for_updates",
|
||||
"type": TYPE_BOOL
|
||||
})
|
||||
ProjectSettings.set_initial_value("steam/updates/godotsteam/check_for_updates", true)
|
||||
ProjectSettings.set_as_basic("steam/updates/godotsteam/check_for_updates", true)
|
||||
# Which channel of updates to pull from
|
||||
# Sponsors repo should require the user to have access to that repository already
|
||||
# In theory, they can connect via SSH?
|
||||
if not ProjectSettings.has_setting("steam/updates/godotsteam/update_channel"):
|
||||
ProjectSettings.set_setting("steam/updates/godotsteam/update_channel", 0)
|
||||
ProjectSettings.add_property_info({
|
||||
"name": "steam/updates/godotsteam/update_channel",
|
||||
"type": TYPE_INT,
|
||||
"hint": PROPERTY_HINT_ENUM,
|
||||
"hint_string": "Community, Sponsors"
|
||||
})
|
||||
ProjectSettings.set_initial_value("steam/updates/godotsteam/update_channel", 0)
|
||||
ProjectSettings.set_as_basic("steam/updates/godotsteam/update_channel", true)
|
||||
|
||||
|
||||
func add_steamworks_dock() -> void:
|
||||
steamworks_dock = EDITOR_PANEL.instantiate()
|
||||
# This will be used when 4.4.x is deprecated
|
||||
#add_control_to_dock(DockSlot.DOCK_SLOT_BOTTOM, steamworks_dock)
|
||||
# This is deprecated as of 4.6; when it is removed then 4.4.x will be deprecated for GodotSteam
|
||||
add_control_to_bottom_panel(steamworks_dock, "Steamworks")
|
||||
dock_frame = steamworks_dock
|
||||
|
||||
|
||||
func remove_steamworks_dock() -> void:
|
||||
# This will be used when 4.4.x is deprecated
|
||||
#remove_control_from_docks(steamworks_dock)
|
||||
# This is deprecated as of 4.6; when it is removed then 4.4.x will be deprecated for GodotSteam
|
||||
remove_control_from_bottom_panel(steamworks_dock)
|
||||
# This may be causing crashes for some people and is unnecessary with the call above
|
||||
# steamworks_dock.queue_free()
|
||||
steamworks_dock = null
|
||||
dock_frame = null
|
||||
#endregion
|
||||
1
addons/godotsteam/godotsteam_plugin.gd.uid
Normal file
1
addons/godotsteam/godotsteam_plugin.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://btts11rgropcp
|
||||
23
addons/godotsteam/license.md
Normal file
23
addons/godotsteam/license.md
Normal file
@@ -0,0 +1,23 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015-Current | GP Garcia, Chris Ridenour, and Contributors
|
||||
|
||||
View all contributors at https://godotsteam.com/contribute/contributors/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/linux32/libsteam_api.so
Normal file
BIN
addons/godotsteam/linux32/libsteam_api.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/linux64/libsteam_api.so
Normal file
BIN
addons/godotsteam/linux64/libsteam_api.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/linuxarm64/libsteam_api.so
Normal file
BIN
addons/godotsteam/linuxarm64/libsteam_api.so
Normal file
Binary file not shown.
BIN
addons/godotsteam/osx/libgodotsteam.macos.template_debug.dylib
Normal file
BIN
addons/godotsteam/osx/libgodotsteam.macos.template_debug.dylib
Normal file
Binary file not shown.
BIN
addons/godotsteam/osx/libgodotsteam.macos.template_release.dylib
Normal file
BIN
addons/godotsteam/osx/libgodotsteam.macos.template_release.dylib
Normal file
Binary file not shown.
BIN
addons/godotsteam/osx/libsteam_api.dylib
Normal file
BIN
addons/godotsteam/osx/libsteam_api.dylib
Normal file
Binary file not shown.
7
addons/godotsteam/plugin.cfg
Normal file
7
addons/godotsteam/plugin.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="GodotSteam GDExtension Updater"
|
||||
description="An updater for GodotSteam GDExtension. This is not required to use Steamworks functionality, just updating the plug-in."
|
||||
author="Gramps Garcia, GodotSteam"
|
||||
version="4.19.1"
|
||||
script="godotsteam_plugin.gd"
|
||||
95
addons/godotsteam/readme.md
Normal file
95
addons/godotsteam/readme.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# GodotSteam for GDExtension | Community Edition
|
||||
An ecosystem of tools for [Godot Engine](https://godotengine.org) and [Valve's Steam](https://store.steampowered.com). For the Windows, Linux, and Mac platforms.
|
||||
|
||||
|
||||
Additional Flavors
|
||||
---
|
||||
Standard Module | Standard Plug-ins | Server Module | Server Plug-ins | Examples
|
||||
--- | --- | --- | --- | ---
|
||||
[Godot 2.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot2) | [GDNative](https://codeberg.org/godotsteam/godotsteam/src/branch/gdnative) | [Server 3.x](https://codeberg.org/godotsteam/godotsteam-server/src/branch/godot3) | [GDNative](https://codeberg.org/godotsteam/godotsteam-server/src/branch/gdnative) | [Skillet](https://codeberg.org/godotsteam/skillet)
|
||||
[Godot 3.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot3) | [GDExtension](https://codeberg.org/godotsteam/godotsteam/src/branch/gdextension) | [Server 4.x](https://codeberg.org/godotsteam/godotsteam-server/src/branch/godot4) | [GDExtension](https://codeberg.org/godotsteam/godotsteam-server/src/branch/gdextension) | [Skillet UGC Editor](https://codeberg.org/godotsteam/skillet/src/branch/ugc_editor)
|
||||
[Godot 4.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot4) | --- | --- | --- | ---
|
||||
[MultiplayerPeer](https://codeberg.org/godotsteam/multiplayerpeer)| --- | --- | --- | ---
|
||||
|
||||
|
||||
Documentation
|
||||
---
|
||||
[Documentation is available here](https://godotsteam.com/). You can also check out the Search Help section inside Godot Engine. [To start, try checking out our tutorial on initializing Steam.](https://godotsteam.com/tutorials/initializing/) There are additional tutorials, with more in the works. You can also [check out additional Godot and Steam related videos, text, additional tools, plug-ins, etc. here.](https://godotsteam.com/resources/external/)
|
||||
|
||||
Feel free to chat with us about GodotSteam or ask for assistance on the [Stoat server](https://stt.gg/9DxQ3Dcd) or [IRC on Libera Chat](irc://irc.libera.chat/#godotsteam).
|
||||
|
||||
|
||||
Donate
|
||||
---
|
||||
Pull-requests are the best way to help the project out but you can also donate through [Github Sponsors](https://github.com/sponsors/Gramps) or [LiberaPay](https://liberapay.com/godotsteam/donate)! [You can read more about donor perks here.](https://godotsteam.com/contribute/donations/) [You can also view all our awesome donors here.](https://godotsteam.com/contribute/donors/)
|
||||
|
||||
|
||||
Current Build
|
||||
---
|
||||
You can [download pre-compiled versions of this repo here](https://codeberg.org/godotsteam/godotsteam/releases).
|
||||
|
||||
**Version 4.19.1 Changes**
|
||||
|
||||
- Changed: commented out possible issue with removing dock node
|
||||
- Fixed: in-editor docs error, thanks to ***evanwang0***
|
||||
|
||||
[You can read more change-logs here](https://godotsteam.com/changelog/gdextension/).
|
||||
|
||||
|
||||
Compatibility
|
||||
---
|
||||
While rare, sometimes Steamworks SDK updates will break compatilibity with older GodotSteam versions. Any compatability breaks are noted below. Newer API files (dll, so, dylib) _should_ still work for older versions.
|
||||
|
||||
Steamworks SDK Version | GodotSteam Version
|
||||
---|---
|
||||
1.63 or newer | 4.17
|
||||
1.62 | 4.14 or 4.16.2
|
||||
1.61 | 4.12 to 4.13
|
||||
1.60 | 4.6 to 4.11
|
||||
1.59 | 4.6 to 4.8
|
||||
1.58a or older | 4.5.4 or older
|
||||
|
||||
Versions of GodotSteam that have compatibility breaks introduced.
|
||||
|
||||
GodotSteam Version | Broken Compatibility
|
||||
---|---
|
||||
4.8 | Networking identity system removed, replaced with Steam IDs
|
||||
4.9 | sendMessages returns an Array
|
||||
4.11 | setLeaderboardDetailsMax removed
|
||||
4.13 | getItemDefinitionProperty return a dictionary, html_needs_paint key 'bgra' changed to 'rbga'
|
||||
4.14 | Removed first argument for stat request in steamInit and steamInitEx, steamInit returns intended bool value
|
||||
4.16 | Variety of small break points, refer to [4.16 changelog for details](https://godotsteam.com/changelog/godot4/#version-416)
|
||||
4.17 | Windows projects using Steam SDK 1.63 are meant to work with Proton 11 or Experimental on Linux / Steam Deck.
|
||||
4.19 | Lots of changes to Voice functions, refer to [4.19 changelog for details](https://godotsteam.com/changelog/godot4/#version-419)
|
||||
|
||||
|
||||
Known Issues
|
||||
---
|
||||
- GDExtension for 4.4 is **not** compatible with 4.3.x or lower. Please check the versions you are using.
|
||||
- Overlay will not work in the editor but will work in export projects when uploaded to Steam. This seems to a limitation with Vulkan currently.
|
||||
|
||||
|
||||
Quick How-To
|
||||
---
|
||||
For complete instructions on how to build the GDExtension version of GodotSteam, [please refer to our documentation's 'How-To GDExtension' section.](https://godotsteam.com/howto/gdextension/) It will have the most up-to-date information.
|
||||
|
||||
Alternatively, you can just [download the pre-compiled versions in our Releases section](https://codeberg.org/godotsteam/godotsteam/releases) or [from the Godot Asset Library](https://godotengine.org/asset-library/asset/2445) and skip compiling it yourself!
|
||||
|
||||
|
||||
Usage
|
||||
---
|
||||
Once the plug-in is added to your project, the Steam class should be available and ready to go. Enabling the plug-in in the ProjectSettings only affects the Steamworks dock and not the actual functionality.
|
||||
|
||||
Do not use the GDExtension version of GodotSteam with any of the module versions whether it be our pre-compiled versions or ones you compile. They are not compatible with each other.
|
||||
|
||||
When exporting with the GDExtension version, please use the normal Godot Engine templates instead of our GodotSteam templates or you will have a lot of issues.
|
||||
|
||||
|
||||
No LLM Policy / No "AI" Policy
|
||||
---
|
||||
No LLMs are allowed to be used for issues, patches, or pull-requests. They will be closed or rejected and the submitter may be blocked from future submissions.
|
||||
|
||||
|
||||
License
|
||||
---
|
||||
MIT license
|
||||
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/win32/steam_api.dll
Normal file
BIN
addons/godotsteam/win32/steam_api.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
addons/godotsteam/win64/steam_api64.dll
Normal file
BIN
addons/godotsteam/win64/steam_api64.dll
Normal file
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,7 @@ class_name AIBase
|
||||
|
||||
@export_group("Settings")
|
||||
@export var speed: float = 4.0
|
||||
@export_flags_3d_navigation var navigation_layers: int = 1
|
||||
var _enable_state_machine: bool = true
|
||||
@export var enable_state_machine: bool:
|
||||
set(value):
|
||||
@@ -14,8 +15,8 @@ var _enable_state_machine: bool = true
|
||||
@export var anim_player: AnimationPlayer
|
||||
|
||||
@export_group("Entities")
|
||||
enum EntityType { HUMANOID, ANIMAL }
|
||||
@export var entity_type: EntityType = EntityType.HUMANOID
|
||||
enum EntityType { FARMER, CITIZEN_WALKER, CITIZEN_SITTER, CAT, CROW, FOX, GOAT, RACOON, WAGYU }
|
||||
@export var entity_type: EntityType = EntityType.FARMER
|
||||
@export var entity_name: String = ""
|
||||
@export var allowed_biomes: Array[String] = []
|
||||
@export_range(0.0, 100.0, 0.1) var spawn_uniqueness: float = 1.0
|
||||
@@ -26,10 +27,13 @@ enum EntityType { HUMANOID, ANIMAL }
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
if nav_agent:
|
||||
nav_agent.navigation_layers = navigation_layers
|
||||
toggle_enable_state_machine()
|
||||
|
||||
func toggle_enable_state_machine() -> void:
|
||||
state_machine.enable = _enable_state_machine
|
||||
if state_machine:
|
||||
state_machine.enable = _enable_state_machine
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if !_enable_state_machine:
|
||||
@@ -52,7 +56,7 @@ func _physics_process(delta: float) -> void:
|
||||
var look_dir = Vector3(velocity.x, 0, velocity.z)
|
||||
var target_transform = global_transform.looking_at(global_position - look_dir, Vector3.UP)
|
||||
global_transform = global_transform.interpolate_with(target_transform, delta * 10.0)
|
||||
|
||||
|
||||
move_and_slide()
|
||||
|
||||
func navigate_to_random_point() -> void:
|
||||
@@ -67,4 +71,6 @@ func navigate_to_random_point() -> void:
|
||||
if nav_agent.is_target_reachable():
|
||||
return
|
||||
|
||||
nav_agent.target_position = global_position
|
||||
# Fallback: if we can't find a reachable point (e.g. we drifted slightly off navmesh),
|
||||
# try to navigate to the closest navmesh point to our CURRENT position to get unstuck.
|
||||
nav_agent.target_position = NavigationServer3D.map_get_closest_point(nav_map_rid, global_position)
|
||||
|
||||
BIN
core/ai/agents/cat/Cat_rig.fbx
Normal file
BIN
core/ai/agents/cat/Cat_rig.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bi5f24frndw7j"
|
||||
path="res://.godot/imported/pig.fbx-9a85be4e550d2dcb19fad4ead53d1bfb.scn"
|
||||
uid="uid://c5rccx22gs6jt"
|
||||
path="res://.godot/imported/Cat_rig.fbx-bc3034028add79e5e269f1589fc49554.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/pig/pig.fbx"
|
||||
dest_files=["res://.godot/imported/pig.fbx-9a85be4e550d2dcb19fad4ead53d1bfb.scn"]
|
||||
source_file="res://core/ai/agents/cat/Cat_rig.fbx"
|
||||
dest_files=["res://.godot/imported/Cat_rig.fbx-bc3034028add79e5e269f1589fc49554.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -39,12 +39,12 @@ materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"animations": {
|
||||
"Armature|Idle": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/pig/idle.res",
|
||||
"Cat_Idle": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://c4ingpw0co8v2",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
@@ -2095,12 +2095,12 @@ _subresources={
|
||||
"slice_99/start_frame": 0,
|
||||
"slices/amount": 0
|
||||
},
|
||||
"Armature|Jump": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/pig/walking.res",
|
||||
"Cat_Walk": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://ct46v2up1gmdn",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
38
core/ai/agents/cat/ai_cat.gd
Normal file
38
core/ai/agents/cat/ai_cat.gd
Normal file
@@ -0,0 +1,38 @@
|
||||
extends AIBase
|
||||
|
||||
class_name AICat
|
||||
|
||||
@export_group("Cat Colors")
|
||||
@export var mesh: MeshInstance3D
|
||||
@export var fur_colors: Array[Color] = []
|
||||
@export var eye_colors: Array[Color] = []
|
||||
|
||||
@export var fur_material_index: int = 0
|
||||
@export var eye_material_index: int = 1
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
_apply_random_color()
|
||||
|
||||
func _apply_random_color() -> void:
|
||||
if fur_colors.is_empty() or eye_colors.is_empty():
|
||||
return
|
||||
|
||||
if not mesh or not mesh.mesh:
|
||||
return
|
||||
|
||||
var max_index = min(fur_colors.size(), eye_colors.size())
|
||||
var random_idx = randi() % max_index
|
||||
|
||||
_override_material_color(mesh, fur_material_index, fur_colors[random_idx])
|
||||
_override_material_color(mesh, eye_material_index, eye_colors[random_idx])
|
||||
|
||||
func _override_material_color(mesh_node: MeshInstance3D, surface_idx: int, color: Color) -> void:
|
||||
if surface_idx < 0 or surface_idx >= mesh_node.mesh.get_surface_count():
|
||||
return
|
||||
|
||||
var mat = mesh_node.mesh.surface_get_material(surface_idx)
|
||||
if mat and mat is StandardMaterial3D:
|
||||
var new_mat = mat.duplicate() as StandardMaterial3D
|
||||
new_mat.albedo_color = color
|
||||
mesh_node.set_surface_override_material(surface_idx, new_mat)
|
||||
1
core/ai/agents/cat/ai_cat.gd.uid
Normal file
1
core/ai/agents/cat/ai_cat.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cx67xas1hxv3x
|
||||
122
core/ai/agents/cat/ai_cat.tscn
Normal file
122
core/ai/agents/cat/ai_cat.tscn
Normal file
@@ -0,0 +1,122 @@
|
||||
[gd_scene format=3 uid="uid://duppccreftg3v"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_85o24"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_6mu8r"]
|
||||
[ext_resource type="Script" uid="uid://cx67xas1hxv3x" path="res://core/ai/agents/cat/ai_cat.gd" id="2_cat_script"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5rccx22gs6jt" path="res://core/ai/agents/cat/Cat_rig.fbx" id="2_rohxe"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_0jm3k"]
|
||||
[ext_resource type="Script" uid="uid://dty1p02kqviwf" path="res://core/ai/framework/sit_state.gd" id="3_scd7t"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="7_rxsfd"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_1rb57"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("7_rxsfd")
|
||||
shader_parameter/albedo_color = Color(0.7389186, 0.53468716, 0.19165063, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_42ie3"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("7_rxsfd")
|
||||
shader_parameter/albedo_color = Color(0.099985994, 0.09998601, 0.099985965, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiCat" unique_id=1228675528 node_paths=PackedStringArray("mesh", "anim_player") instance=ExtResource("1_85o24")]
|
||||
script = ExtResource("2_cat_script")
|
||||
mesh = NodePath("Cat_rig/Rig_Cat/Skeleton3D/Cat")
|
||||
fur_colors = Array[Color]([Color(0.8716863, 0.762116, 0.1809479, 1)])
|
||||
eye_colors = Array[Color]([Color(0.12955844, 0.12955847, 0.12955844, 1), Color(0.6901961, 0.3019608, 0.12156863, 1), Color(0.6830768, 0.6830776, 0.68307686, 1), Color(0.6273405, 0.15743047, 0, 1)])
|
||||
fur_material_index = 0
|
||||
eye_material_index = 1
|
||||
anim_player = NodePath("Cat_rig/AnimationPlayer")
|
||||
entity_type = 3
|
||||
entity_name = "Cat"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=1884542620]
|
||||
script = ExtResource("2_6mu8r")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
random_next_state_ids = Array[StringName]([&"patrol", &"sit"])
|
||||
animation_name = "Cat_Idle"
|
||||
|
||||
[node name="SitState" type="Node" parent="StateMachine" index="1" unique_id=860354787]
|
||||
script = ExtResource("3_scd7t")
|
||||
state_id = &"sit"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "Cat_Sit"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="2" unique_id=1861645340]
|
||||
script = ExtResource("3_0jm3k")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "Cat_Walk"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="Cat_rig" parent="." index="3" unique_id=1332997618 instance=ExtResource("2_rohxe")]
|
||||
|
||||
[node name="Skeleton3D" parent="Cat_rig/Rig_Cat" parent_id_path=PackedInt32Array(1332997618, 1024066488) index="0" unique_id=1455145313]
|
||||
bones/1/position = Vector3(1.6719584e-08, 0.23547882, 0.34218493)
|
||||
bones/1/rotation = Quaternion(0.12769094, -0.6954821, -0.12769029, 0.69548184)
|
||||
bones/2/rotation = Quaternion(-1.5819447e-07, -1.9079575e-07, -0.5904159, 0.8070992)
|
||||
bones/3/position = Vector3(0.21655759, -1.1490099e-06, 4.6904738e-08)
|
||||
bones/3/rotation = Quaternion(4.4475364e-08, -1.16689236e-07, 0.042394996, 0.999101)
|
||||
bones/4/rotation = Quaternion(4.694551e-09, 1.2888964e-07, 0.30337927, 0.9528699)
|
||||
bones/7/rotation = Quaternion(9.573777e-09, -1.3302474e-07, -0.40028554, 0.9163905)
|
||||
bones/9/rotation = Quaternion(0.0005057682, -0.00040186392, -0.7732871, 0.63405573)
|
||||
bones/10/rotation = Quaternion(7.318899e-08, 1.07771655e-07, 0.23513123, 0.97196364)
|
||||
bones/11/rotation = Quaternion(-0.013215952, -0.0063107302, 0.33804607, 0.9410156)
|
||||
bones/13/rotation = Quaternion(-0.00018823319, 2.7849663e-05, -0.77314246, 0.6342325)
|
||||
bones/14/rotation = Quaternion(7.324482e-08, 1.0779509e-07, 0.23506226, 0.9719804)
|
||||
bones/15/rotation = Quaternion(0.01474526, 0.007664346, 0.33750835, 0.94117594)
|
||||
bones/17/rotation = Quaternion(0.06574773, -0.012684476, 0.9796892, 0.18901183)
|
||||
bones/18/rotation = Quaternion(-0.046865243, -0.04779876, -0.69851494, 0.7124576)
|
||||
bones/19/position = Vector3(0.18072681, -0.041122876, -4.2319297e-08)
|
||||
bones/19/rotation = Quaternion(-0.0051541063, -0.0666377, -0.080000654, 0.9945516)
|
||||
bones/21/rotation = Quaternion(1.2657155e-07, 4.030732e-07, 0.96184576, -0.27359232)
|
||||
bones/22/position = Vector3(0.0749221, -0.0072982265, -0.03856178)
|
||||
bones/22/rotation = Quaternion(-8.139895e-08, 1.15607975e-07, -0.47071916, 0.88228315)
|
||||
bones/23/position = Vector3(0.18089643, -0.000116025236, -0.011642921)
|
||||
bones/23/rotation = Quaternion(2.998039e-07, -1.6746765e-07, 0.5290288, 0.84860384)
|
||||
bones/26/position = Vector3(-0.03817617, 0.03956073, 0.04669925)
|
||||
bones/26/rotation = Quaternion(-3.380398e-05, -0.00016875651, 0.9618461, -0.27359122)
|
||||
bones/27/rotation = Quaternion(-8.140452e-08, 1.1560887e-07, -0.47071794, 0.8822838)
|
||||
bones/28/position = Vector3(0.18089616, -0.000116375166, 0.011642809)
|
||||
bones/28/rotation = Quaternion(4.5638826e-05, -8.8217595e-05, 0.5290293, 0.84860367)
|
||||
|
||||
[node name="Cat" parent="Cat_rig/Rig_Cat/Skeleton3D" index="0" unique_id=869144045]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_1rb57")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_42ie3")
|
||||
|
||||
[editable path="Cat_rig"]
|
||||
@@ -1,32 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://dd8wn62anbts8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_p2hpa"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjp8wbrtfl4v2" path="res://core/ai/agents/cow/cow_mannequin.tscn" id="2_6gadt"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_vlvvc"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_su7en"]
|
||||
|
||||
[node name="AiCow" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_p2hpa")]
|
||||
anim_player = NodePath("CowMannequin/AnimationPlayer")
|
||||
entity_type = 1
|
||||
entity_name = "Cow"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=2033863310]
|
||||
script = ExtResource("2_vlvvc")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "custom/idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=2076820654]
|
||||
script = ExtResource("3_su7en")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "custom/walking"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="CowMannequin" parent="." index="3" unique_id=1390675137 instance=ExtResource("2_6gadt")]
|
||||
transform = Transform3D(0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, -0.9, 0)
|
||||
|
||||
[editable path="CowMannequin"]
|
||||
Binary file not shown.
@@ -1,81 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://bjp8wbrtfl4v2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b7d57tyxi41r1" path="res://core/ai/agents/cow/cow.fbx" id="1_60f5q"]
|
||||
[ext_resource type="Animation" uid="uid://bsuoywknbbnm0" path="res://core/ai/agents/cow/idle.res" id="2_5ukcj"]
|
||||
[ext_resource type="Animation" uid="uid://ckmybsnuf4stp" path="res://core/ai/agents/cow/walking.res" id="3_0mu5m"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_lowte"]
|
||||
_data = {
|
||||
&"idle": ExtResource("2_5ukcj"),
|
||||
&"walking": ExtResource("3_0mu5m")
|
||||
}
|
||||
|
||||
[node name="CowMannequin" unique_id=786985233 instance=ExtResource("1_60f5q")]
|
||||
|
||||
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(792301245) index="0" unique_id=1950086664]
|
||||
bones/1/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.7071067)
|
||||
bones/1/scale = Vector3(1, 1, 1)
|
||||
bones/4/rotation = Quaternion(0.0015316998, -0.0015319793, 0.70710516, 0.70710516)
|
||||
bones/5/position = Vector3(1.3183898e-16, 0.006025583, -6.675722e-10)
|
||||
bones/5/rotation = Quaternion(0.703962, -0.69745475, -0.08083715, 0.10705068)
|
||||
bones/5/scale = Vector3(1, 0.99999976, 1)
|
||||
bones/6/position = Vector3(-1.403955e-10, 0.009248152, 3.7406075e-11)
|
||||
bones/6/rotation = Quaternion(0.18324056, -0.018661192, 0.0034790868, 0.98288476)
|
||||
bones/6/scale = Vector3(1, 1, 1)
|
||||
bones/8/scale = Vector3(0.99999994, 0.99999994, 1)
|
||||
bones/9/position = Vector3(-3.8163916e-17, 0.0046958304, 1.907358e-10)
|
||||
bones/9/rotation = Quaternion(0.6754388, -0.68119305, 0.18401879, -0.21423234)
|
||||
bones/9/scale = Vector3(1, 0.99999994, 1.0000001)
|
||||
bones/10/position = Vector3(7.2902e-10, 0.011755081, -3.0995417e-10)
|
||||
bones/10/rotation = Quaternion(-0.35146433, 0.018116632, 0.0068026204, 0.9360013)
|
||||
bones/10/scale = Vector3(0.9999999, 1, 1.0000001)
|
||||
bones/12/rotation = Quaternion(0.707105, 0.70710486, 0.0016303749, -0.0016306548)
|
||||
bones/12/scale = Vector3(1, 1, 1)
|
||||
bones/13/position = Vector3(-1.5265567e-16, 0.0060255853, 6.6757205e-10)
|
||||
bones/13/rotation = Quaternion(-0.057434652, -0.13032891, 0.70625645, 0.69348216)
|
||||
bones/13/scale = Vector3(0.99999994, 1, 0.9999999)
|
||||
bones/14/position = Vector3(-4.5945833e-10, 0.009248151, -5.7053273e-09)
|
||||
bones/14/rotation = Quaternion(0.18302466, 0.051401887, -0.0095829815, 0.9817169)
|
||||
bones/14/scale = Vector3(1, 1.0000001, 0.99999994)
|
||||
bones/16/rotation = Quaternion(0.7071062, 0.7071063, 0.0008663558, -0.0008670737)
|
||||
bones/16/scale = Vector3(1, 1, 1)
|
||||
bones/17/position = Vector3(1.7347235e-17, 0.0046958304, -1.9073432e-10)
|
||||
bones/17/rotation = Quaternion(0.1907959, 0.2076444, 0.67355627, 0.6832297)
|
||||
bones/17/scale = Vector3(1, 1, 1.0000001)
|
||||
bones/18/position = Vector3(1.834215e-10, 0.011755081, -1.7500804e-09)
|
||||
bones/18/rotation = Quaternion(-0.35151497, -0.0088962475, -0.003340601, 0.93613404)
|
||||
bones/18/scale = Vector3(1, 1.0000001, 0.99999994)
|
||||
bones/20/rotation = Quaternion(0.60080343, -0.03016121, 0.03526711, 0.7980488)
|
||||
bones/21/position = Vector3(0.00011168665, 0.0039693406, -0.013754063)
|
||||
bones/21/rotation = Quaternion(0.98885596, 3.1474094e-08, 2.23642e-07, -0.14887528)
|
||||
bones/21/scale = Vector3(1, 1.0000001, 1.0000001)
|
||||
bones/22/position = Vector3(-2.5714557e-11, 0.00836347, -9.433328e-09)
|
||||
bones/22/rotation = Quaternion(-0.6231534, 9.0575064e-08, -7.589477e-08, 0.78209966)
|
||||
bones/22/scale = Vector3(1, 0.9999999, 0.99999994)
|
||||
bones/23/position = Vector3(-2.1545942e-12, 0.0072733457, -2.594807e-09)
|
||||
bones/23/rotation = Quaternion(-1.8223004e-08, 0.98608583, -0.16623694, 2.7314604e-07)
|
||||
bones/23/scale = Vector3(1, 0.9999997, 0.9999997)
|
||||
bones/24/position = Vector3(3.3663968e-13, 0.006993335, -2.8376712e-09)
|
||||
bones/24/rotation = Quaternion(-0.048028953, 2.6759114e-08, 4.5447155e-08, 0.998846)
|
||||
bones/24/scale = Vector3(1, 0.99999994, 1.0000001)
|
||||
bones/26/rotation = Quaternion(0.0054439656, 0.86556005, 0.50029516, -0.021930087)
|
||||
bones/26/scale = Vector3(1, 1.0000002, 1)
|
||||
bones/27/position = Vector3(1.8971762e-10, 0.013189232, -5.7312505e-10)
|
||||
bones/27/rotation = Quaternion(0.15129425, -0.018451845, -0.013046658, 0.9882304)
|
||||
bones/27/scale = Vector3(0.99999994, 0.99999994, 1.0000001)
|
||||
bones/28/position = Vector3(-2.1601461e-10, 0.013573305, 4.8459786e-10)
|
||||
bones/28/rotation = Quaternion(-0.6245376, -0.19781438, 0.16660775, 0.7369289)
|
||||
bones/28/scale = Vector3(1, 0.9999999, 1.0000001)
|
||||
bones/30/rotation = Quaternion(3.5765906e-06, 0.67050743, 0.7419029, 3.2289404e-06)
|
||||
bones/31/position = Vector3(-1.2499713e-14, 0.01925819, -1.2902629e-09)
|
||||
bones/31/rotation = Quaternion(0.086390205, 0.0012038474, -0.013495129, 0.99616927)
|
||||
bones/31/scale = Vector3(0.9999999, 0.99999994, 1)
|
||||
bones/33/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.7071067)
|
||||
bones/33/scale = Vector3(1, 1, 1)
|
||||
bones/35/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
bones/35/scale = Vector3(1, 1, 1)
|
||||
bones/37/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
bones/37/scale = Vector3(1, 1, 1)
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1" unique_id=1401028430]
|
||||
libraries/custom = SubResource("AnimationLibrary_lowte")
|
||||
Binary file not shown.
Binary file not shown.
BIN
core/ai/agents/crow/Crow_rig.fbx
Normal file
BIN
core/ai/agents/crow/Crow_rig.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b7d57tyxi41r1"
|
||||
path="res://.godot/imported/cow.fbx-4e6408597feff1912f096de01cca2997.scn"
|
||||
uid="uid://dfdeepw5p5nb8"
|
||||
path="res://.godot/imported/Crow_rig.fbx-dd8e2cd67741ca2e2732118f056d6127.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/cow/cow.fbx"
|
||||
dest_files=["res://.godot/imported/cow.fbx-4e6408597feff1912f096de01cca2997.scn"]
|
||||
source_file="res://core/ai/agents/crow/Crow_rig.fbx"
|
||||
dest_files=["res://.godot/imported/Crow_rig.fbx-dd8e2cd67741ca2e2732118f056d6127.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -39,12 +39,12 @@ materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"animations": {
|
||||
"Armature|Idle": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/cow/idle.res",
|
||||
"Fly_Crow": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://b2elfct5e6p3m",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
@@ -2095,12 +2095,12 @@ _subresources={
|
||||
"slice_99/start_frame": 0,
|
||||
"slices/amount": 0
|
||||
},
|
||||
"Armature|Walk": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/cow/walking.res",
|
||||
"Idle_Crow": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://c7x1g6c4eh1od",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
29
core/ai/agents/crow/ai_crow.tscn
Normal file
29
core/ai/agents/crow/ai_crow.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene format=3 uid="uid://cxi6phs4fieli"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_tx3nx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfdeepw5p5nb8" path="res://core/ai/agents/crow/Crow_rig.fbx" id="2_1pxwy"]
|
||||
[ext_resource type="Script" uid="uid://da5vhmxbxkdbc" path="res://core/ai/framework/wait_train_state.gd" id="3_wait"]
|
||||
[ext_resource type="Script" uid="uid://tys4fmqvneom" path="res://core/ai/framework/fly_away_state.gd" id="4_fly"]
|
||||
|
||||
[node name="AiCrow" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_tx3nx")]
|
||||
anim_player = NodePath("Crow_rig/AnimationPlayer")
|
||||
entity_type = 4
|
||||
entity_name = "Crow"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("WaitTrainState")
|
||||
|
||||
[node name="WaitTrainState" type="Node" parent="StateMachine" index="0" unique_id=1000000000]
|
||||
script = ExtResource("3_wait")
|
||||
fly_distance_threshold = 10.0
|
||||
state_id = &"wait"
|
||||
next_state_id = &"fly"
|
||||
animation_name = "Idle_Crow"
|
||||
|
||||
[node name="FlyAwayState" type="Node" parent="StateMachine" index="1" unique_id=1000000001]
|
||||
script = ExtResource("4_fly")
|
||||
destroy_after_seconds = 20.0
|
||||
state_id = &"fly"
|
||||
animation_name = "Fly_Crow"
|
||||
|
||||
[node name="Crow_rig" parent="." index="3" unique_id=2141026440 instance=ExtResource("2_1pxwy")]
|
||||
BIN
core/ai/agents/fox/Fox_rig.fbx
Normal file
BIN
core/ai/agents/fox/Fox_rig.fbx
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
89
core/ai/agents/fox/ai_fox.tscn
Normal file
89
core/ai/agents/fox/ai_fox.tscn
Normal file
@@ -0,0 +1,89 @@
|
||||
[gd_scene format=3 uid="uid://bk45etvtdd6m5"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_m3efo"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_58gnd"]
|
||||
[ext_resource type="PackedScene" uid="uid://4y4tffc723lg" path="res://core/ai/agents/fox/Fox_rig.fbx" id="2_xaafp"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_d1sp2"]
|
||||
[ext_resource type="Script" uid="uid://b5y4u0itec8g1" path="res://core/ai/framework/run_state.gd" id="4_d1sp2"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="6_oqxvo"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4pdxi"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("6_oqxvo")
|
||||
shader_parameter/albedo_color = Color(0.5408599, 0.27705142, 0.12841594, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiFox" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_m3efo")]
|
||||
navigation_layers = 4
|
||||
anim_player = NodePath("Fox_rig/AnimationPlayer")
|
||||
entity_type = 5
|
||||
entity_name = "Fox"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=933090954]
|
||||
script = ExtResource("2_58gnd")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
random_next_state_ids = Array[StringName]([&"patrol", &"run"])
|
||||
animation_name = "Idle_Fox"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=48187684]
|
||||
script = ExtResource("3_d1sp2")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "Walk_Fox"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="RunState" type="Node" parent="StateMachine" index="2" unique_id=30664919]
|
||||
script = ExtResource("4_d1sp2")
|
||||
state_id = &"run"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "Run_Fox"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="Fox_rig" parent="." index="3" unique_id=2044859181 instance=ExtResource("2_xaafp")]
|
||||
|
||||
[node name="Skeleton3D" parent="Fox_rig/Rig_Fox" parent_id_path=PackedInt32Array(2044859181, 975246732) index="0" unique_id=1559174379]
|
||||
bones/1/position = Vector3(1.2443564e-08, 0.24551632, 0.408434)
|
||||
bones/1/rotation = Quaternion(0.12769088, -0.6954821, -0.12769023, 0.69548184)
|
||||
bones/2/rotation = Quaternion(-1.492881e-07, -1.7862074e-07, -0.5904159, 0.8070992)
|
||||
bones/3/rotation = Quaternion(4.4853135e-08, 2.4038487e-09, 0.042394996, 0.999101)
|
||||
bones/4/rotation = Quaternion(-3.9116873e-08, 1.0805254e-08, 0.30337915, 0.95286995)
|
||||
bones/7/rotation = Quaternion(6.614782e-08, -2.2280902e-08, -0.4002855, 0.9163905)
|
||||
bones/9/rotation = Quaternion(0.00050595123, -0.00040185585, -0.7732871, 0.63405573)
|
||||
bones/10/rotation = Quaternion(4.4809266e-08, -6.81585e-09, 0.23513126, 0.97196364)
|
||||
bones/11/rotation = Quaternion(-0.013216025, -0.0063106352, 0.33804604, 0.94101566)
|
||||
bones/13/rotation = Quaternion(-0.00018805025, 2.7857828e-05, -0.77314246, 0.6342325)
|
||||
bones/14/rotation = Quaternion(4.4874945e-08, -6.797017e-09, 0.23506236, 0.9719803)
|
||||
bones/15/rotation = Quaternion(0.014745249, 0.00766435, 0.33750823, 0.9411759)
|
||||
bones/17/rotation = Quaternion(0.06574762, -0.012684453, 0.9796892, 0.18901181)
|
||||
bones/18/rotation = Quaternion(-0.0045532905, -0.06678549, -0.06784821, 0.99544746)
|
||||
bones/19/rotation = Quaternion(-0.00312141, -0.06676418, -0.049661905, 0.99652725)
|
||||
bones/21/rotation = Quaternion(-5.0142333e-08, 4.1612444e-07, 0.9618458, -0.27359205)
|
||||
bones/22/rotation = Quaternion(-1.9314905e-08, 4.503425e-08, -0.47071874, 0.88228333)
|
||||
bones/23/rotation = Quaternion(1.5250623e-07, -2.2114624e-07, 0.5290283, 0.84860426)
|
||||
bones/26/rotation = Quaternion(-3.3980676e-05, -0.00016874354, 0.9618461, -0.27359122)
|
||||
bones/27/rotation = Quaternion(-1.9324155e-08, 4.5031282e-08, -0.47071794, 0.8822838)
|
||||
bones/28/rotation = Quaternion(4.549153e-05, -8.8271285e-05, 0.5290293, 0.84860367)
|
||||
|
||||
[node name="fox" parent="Fox_rig/Rig_Fox/Skeleton3D" index="0" unique_id=2042924802]
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_4pdxi")
|
||||
|
||||
[editable path="Fox_rig"]
|
||||
BIN
core/ai/agents/goat/Goat_rig.fbx
Normal file
BIN
core/ai/agents/goat/Goat_rig.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://buqmw5lbfom07"
|
||||
path="res://.godot/imported/pug.fbx-af6b781ab7e595bee6c68e7b6c8c2740.scn"
|
||||
uid="uid://cumnmnbdjbgas"
|
||||
path="res://.godot/imported/Goat_rig.fbx-c2bee76b10caf5e31da9699c3ace28b3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/pug/pug.fbx"
|
||||
dest_files=["res://.godot/imported/pug.fbx-af6b781ab7e595bee6c68e7b6c8c2740.scn"]
|
||||
source_file="res://core/ai/agents/goat/Goat_rig.fbx"
|
||||
dest_files=["res://.godot/imported/Goat_rig.fbx-c2bee76b10caf5e31da9699c3ace28b3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -39,12 +39,12 @@ materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"animations": {
|
||||
"Armature|Idle": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/pug/idle.res",
|
||||
"Goat_Idle": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://c8hy2tftqb7su",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
@@ -2095,12 +2095,12 @@ _subresources={
|
||||
"slice_99/start_frame": 0,
|
||||
"slices/amount": 0
|
||||
},
|
||||
"Armature|Jump": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/pug/walking.res",
|
||||
"Goat_Walk": {
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/fallback_path": "",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://bqrhidcnublea",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
104
core/ai/agents/goat/ai_goat.tscn
Normal file
104
core/ai/agents/goat/ai_goat.tscn
Normal file
@@ -0,0 +1,104 @@
|
||||
[gd_scene format=3 uid="uid://c8e8vy2yx0vuj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_f7hhh"]
|
||||
[ext_resource type="PackedScene" uid="uid://cumnmnbdjbgas" path="res://core/ai/agents/goat/Goat_rig.fbx" id="2_oxwbf"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_ucoix"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_lqqd8"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="5_lqqd8"]
|
||||
[ext_resource type="Material" uid="uid://cn20mp8ep3yxu" path="res://tgcc/chunk/material/wires.tres" id="6_xcxu7"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xcxu7"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_lqqd8")
|
||||
shader_parameter/albedo_color = Color(0.46774077, 0.51844496, 0.510305, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lqqd8"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_lqqd8")
|
||||
shader_parameter/albedo_color = Color(0.49370736, 0.43829006, 0.29924837, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiGoat" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_f7hhh")]
|
||||
anim_player = NodePath("Goat_rig/AnimationPlayer")
|
||||
entity_type = 6
|
||||
entity_name = "Goat"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=874855696]
|
||||
script = ExtResource("2_ucoix")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "Goat_Idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=450542027]
|
||||
script = ExtResource("3_lqqd8")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "Goat_Walk"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="Goat_rig" parent="." index="3" unique_id=1336829719 instance=ExtResource("2_oxwbf")]
|
||||
|
||||
[node name="Skeleton3D" parent="Goat_rig/Rig_Goat" parent_id_path=PackedInt32Array(1336829719, 1679574624) index="0" unique_id=1406072579]
|
||||
bones/1/position = Vector3(-8.352713e-09, 0.36986786, 0.8951362)
|
||||
bones/1/rotation = Quaternion(0.1276911, -0.695482, -0.12769035, 0.69548184)
|
||||
bones/2/rotation = Quaternion(-8.7811394e-08, -9.458198e-08, -0.5904155, 0.80709946)
|
||||
bones/3/rotation = Quaternion(4.747651e-08, -1.1784627e-07, 0.017411958, 0.9998484)
|
||||
bones/4/rotation = Quaternion(6.0150165e-09, 1.2466938e-07, 0.30337915, 0.95287)
|
||||
bones/7/rotation = Quaternion(5.4816347e-08, -2.1401915e-08, -0.40028566, 0.9163904)
|
||||
bones/9/rotation = Quaternion(0.00046716904, -0.0004462793, -0.7121794, 0.7019972)
|
||||
bones/10/rotation = Quaternion(1.4472131e-07, 8.2933745e-08, 0.037125967, 0.9993106)
|
||||
bones/11/rotation = Quaternion(-0.012037385, -0.007822092, 0.4605625, 0.8875113)
|
||||
bones/13/rotation = Quaternion(0.0004971335, -0.00088232313, -0.7120875, 0.70209)
|
||||
bones/14/rotation = Quaternion(1.2098344e-07, 6.220867e-08, 0.03712596, 0.9993106)
|
||||
bones/15/rotation = Quaternion(0.016517974, 0.014013905, 0.46007547, 0.8876156)
|
||||
bones/17/rotation = Quaternion(5.284289e-08, 2.4923622e-07, 0.98189294, 0.1894366)
|
||||
bones/18/rotation = Quaternion(-1.4809112e-07, -6.559211e-08, -0.4198785, 0.9075803)
|
||||
bones/19/rotation = Quaternion(-2.2811262e-09, 1.0970184e-07, 0.011576452, 0.999933)
|
||||
bones/21/rotation = Quaternion(3.0247494e-07, 7.4317376e-07, 0.9653871, -0.26082122)
|
||||
bones/22/rotation = Quaternion(-3.8364158e-07, 5.6172302e-09, -0.3680436, 0.92980856)
|
||||
bones/23/rotation = Quaternion(0.0002487348, 5.1511866e-05, 0.45848387, 0.8887027)
|
||||
bones/26/rotation = Quaternion(2.713829e-07, 8.5825764e-07, 0.9653876, -0.26081985)
|
||||
bones/27/rotation = Quaternion(-3.8362674e-07, 5.6200027e-09, -0.3680436, 0.92980856)
|
||||
bones/28/rotation = Quaternion(-0.00015313082, -7.842175e-05, 0.45790914, 0.888999)
|
||||
|
||||
[node name="Goat" parent="Goat_rig/Rig_Goat/Skeleton3D" index="0" unique_id=1545212389]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_xcxu7")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_lqqd8")
|
||||
surface_material_override/2 = ExtResource("6_xcxu7")
|
||||
surface_material_override/3 = ExtResource("6_xcxu7")
|
||||
|
||||
[editable path="Goat_rig"]
|
||||
@@ -1,71 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://cayakdk7gmlyg"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_e5v3h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dqhueybnlrrqx" path="res://core/ai/agents/horse/horse_mannequin.tscn" id="2_4t6jw"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_or6xs"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_n63jb"]
|
||||
[ext_resource type="Animation" uid="uid://doyi6etqvy4n2" path="res://core/ai/agents/horse/idle.res" id="3_qe4rt"]
|
||||
[ext_resource type="Animation" uid="uid://hotr7r3fd1sq" path="res://core/ai/agents/horse/walking.res" id="4_q8m0v"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_or6xs"]
|
||||
_data = {
|
||||
&"idle": ExtResource("3_qe4rt"),
|
||||
&"walking": ExtResource("4_q8m0v")
|
||||
}
|
||||
|
||||
[node name="AiHorse" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_e5v3h")]
|
||||
anim_player = NodePath("HorseMannequin/AnimationPlayer")
|
||||
entity_type = 1
|
||||
entity_name = "Horse"
|
||||
|
||||
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=734754793]
|
||||
script = ExtResource("2_or6xs")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "custom/idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=1748382252]
|
||||
script = ExtResource("3_n63jb")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "custom/walking"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="HorseMannequin" parent="." index="3" unique_id=1289880358 instance=ExtResource("2_4t6jw")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.9, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="HorseMannequin/Armature" parent_id_path=PackedInt32Array(1289880358, 1841497289) index="0" unique_id=1502661928]
|
||||
bones/1/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.7071067)
|
||||
bones/4/rotation = Quaternion(0.0012952884, -0.0012955684, 0.7071056, 0.7071057)
|
||||
bones/5/rotation = Quaternion(0.70685357, -0.70227593, -0.04508998, 0.07164877)
|
||||
bones/6/rotation = Quaternion(0.13314606, -0.018813655, 0.0025279524, 0.9909147)
|
||||
bones/8/rotation = Quaternion(0.00078355736, -0.00078427553, 0.70710635, 0.70710635)
|
||||
bones/9/rotation = Quaternion(0.6711558, -0.6744515, 0.20213859, -0.23195927)
|
||||
bones/10/rotation = Quaternion(-0.3574636, 0.018072592, 0.006918765, 0.9337266)
|
||||
bones/12/rotation = Quaternion(0.7071054, 0.7071055, 0.0013743625, -0.0013746425)
|
||||
bones/13/rotation = Quaternion(-0.02159133, -0.09508795, 0.70796114, 0.69948786)
|
||||
bones/14/rotation = Quaternion(0.13298893, 0.051821847, -0.0069631753, 0.9897374)
|
||||
bones/16/rotation = Quaternion(0.7071064, 0.70710653, 0.00066260004, -0.00066331815)
|
||||
bones/17/rotation = Quaternion(0.20885532, 0.22542001, 0.6690968, 0.6766645)
|
||||
bones/18/rotation = Quaternion(-0.3575147, -0.008874607, -0.003397635, 0.9338592)
|
||||
bones/20/rotation = Quaternion(0.6010642, -0.021428203, 0.02848876, 0.79840535)
|
||||
bones/21/rotation = Quaternion(0.99267024, 2.482745e-08, 2.2239277e-07, -0.12085533)
|
||||
bones/22/rotation = Quaternion(-0.6165577, 9.507701e-08, -7.2693986e-08, 0.7873097)
|
||||
bones/23/rotation = Quaternion(-1.5614631e-08, 0.9891947, -0.14660779, 2.7153942e-07)
|
||||
bones/24/rotation = Quaternion(0.03904001, 3.5621138e-08, 1.47960275e-08, 0.99923766)
|
||||
bones/26/rotation = Quaternion(0.008421451, 0.95973384, 0.27944198, -0.027427308)
|
||||
bones/27/rotation = Quaternion(-0.08868468, -0.022488868, -0.01781765, 0.9956465)
|
||||
bones/28/rotation = Quaternion(-0.62453747, -0.1978144, 0.1666077, 0.736929)
|
||||
bones/30/rotation = Quaternion(3.4527793e-06, 0.6944211, 0.71956885, 3.3297817e-06)
|
||||
bones/31/rotation = Quaternion(0.053752482, 0.0007617086, -0.013526975, 0.9984624)
|
||||
bones/33/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.7071067)
|
||||
bones/35/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
bones/37/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
|
||||
[node name="AnimationPlayer" parent="HorseMannequin" index="1" unique_id=1876493257]
|
||||
libraries/custom = SubResource("AnimationLibrary_or6xs")
|
||||
|
||||
[editable path="HorseMannequin"]
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://dqhueybnlrrqx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://be1ql8okme4n7" path="res://core/ai/agents/horse/horse.fbx" id="1_fbqil"]
|
||||
|
||||
[node name="HorseMannequin" unique_id=1289880358 instance=ExtResource("1_fbqil")]
|
||||
Binary file not shown.
Binary file not shown.
BIN
core/ai/agents/human/Farmer1.fbx
Normal file
BIN
core/ai/agents/human/Farmer1.fbx
Normal file
Binary file not shown.
44
core/ai/agents/human/Farmer1.fbx.import
Normal file
44
core/ai/agents/human/Farmer1.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b3j2dbcqwodx1"
|
||||
path="res://.godot/imported/Farmer1.fbx-c6b3fa9e901f9ab5b38c67c1343eab85.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/human/Farmer1.fbx"
|
||||
dest_files=["res://.godot/imported/Farmer1.fbx-c6b3fa9e901f9ab5b38c67c1343eab85.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
BIN
core/ai/agents/human/Farmer2.fbx
Normal file
BIN
core/ai/agents/human/Farmer2.fbx
Normal file
Binary file not shown.
44
core/ai/agents/human/Farmer2.fbx.import
Normal file
44
core/ai/agents/human/Farmer2.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://c5x3ycaxixpxy"
|
||||
path="res://.godot/imported/Farmer2.fbx-da830fcedaed7d46b77458a4c0e1f611.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/human/Farmer2.fbx"
|
||||
dest_files=["res://.godot/imported/Farmer2.fbx-da830fcedaed7d46b77458a4c0e1f611.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
BIN
core/ai/agents/human/Gathering.fbx
Normal file
BIN
core/ai/agents/human/Gathering.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://vwsssgbouxoj"
|
||||
path="res://.godot/imported/gather.fbx-5334c041ee7a918a2a427113d589eb94.scn"
|
||||
uid="uid://bvrn4woiabto5"
|
||||
path="res://.godot/imported/Gathering.fbx-010ce6eb774e1ef5173d7b91f43194c4.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/human/gather.fbx"
|
||||
dest_files=["res://.godot/imported/gather.fbx-5334c041ee7a918a2a427113d589eb94.scn"]
|
||||
source_file="res://core/ai/agents/human/Gathering.fbx"
|
||||
dest_files=["res://.godot/imported/Gathering.fbx-010ce6eb774e1ef5173d7b91f43194c4.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -41,10 +41,10 @@ _subresources={
|
||||
"animations": {
|
||||
"mixamo_com": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/human/gather.res",
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/human/gathering.res",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://bod5wup7tap24",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "uid://qhkny5iyd4mi",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
BIN
core/ai/agents/human/Idle.fbx
Normal file
BIN
core/ai/agents/human/Idle.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://db4u5p5n4n0tp"
|
||||
path="res://.godot/imported/human_idle.fbx-f66264755b2a1ad9f69292d436751726.scn"
|
||||
uid="uid://cfe0ylyx1lfaa"
|
||||
path="res://.godot/imported/Idle.fbx-55b141029a6b8b2285a4fdfb57ee0c93.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/human/human_idle.fbx"
|
||||
dest_files=["res://.godot/imported/human_idle.fbx-f66264755b2a1ad9f69292d436751726.scn"]
|
||||
source_file="res://core/ai/agents/human/Idle.fbx"
|
||||
dest_files=["res://.godot/imported/Idle.fbx-55b141029a6b8b2285a4fdfb57ee0c93.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -43,8 +43,8 @@ _subresources={
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/human/idle.res",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://cp4pl635iv3g7",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "uid://oq22ilhxjejj",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
BIN
core/ai/agents/human/Sitting.fbx
Normal file
BIN
core/ai/agents/human/Sitting.fbx
Normal file
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bir26dquaaccm"
|
||||
path="res://.godot/imported/sit.fbx-5e88ae73f4161cf279b0988a8f6b5358.scn"
|
||||
uid="uid://cuphreeff7ihw"
|
||||
path="res://.godot/imported/Sitting.fbx-83aa57848ecefeeaff20ef595a19a7b3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/ai/agents/human/sit.fbx"
|
||||
dest_files=["res://.godot/imported/sit.fbx-5e88ae73f4161cf279b0988a8f6b5358.scn"]
|
||||
source_file="res://core/ai/agents/human/Sitting.fbx"
|
||||
dest_files=["res://.godot/imported/Sitting.fbx-83aa57848ecefeeaff20ef595a19a7b3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -41,10 +41,10 @@ _subresources={
|
||||
"animations": {
|
||||
"mixamo_com": {
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/human/sit.res",
|
||||
"save_to_file/fallback_path": "res://core/ai/agents/human/sitting.res",
|
||||
"save_to_file/keep_custom_tracks": "",
|
||||
"save_to_file/path": "uid://byksuipm2bly7",
|
||||
"settings/loop_mode": 0,
|
||||
"save_to_file/path": "uid://ptj85lvvtjpg",
|
||||
"settings/loop_mode": 1,
|
||||
"slice_1/end_frame": 0,
|
||||
"slice_1/loop_mode": 0,
|
||||
"slice_1/name": "",
|
||||
BIN
core/ai/agents/human/Walking.fbx
Normal file
BIN
core/ai/agents/human/Walking.fbx
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user