Diverse bidouilles/test.

This commit is contained in:
osquallo 2018-08-26 09:04:02 +02:00
parent 3d00c52d73
commit 2ad93ba6c0
12 changed files with 2134 additions and 47 deletions

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
[ext_resource path="res://background_loader_scene/new_loading_bg_0.tga" type="Texture" id=1]
[ext_resource path="res://background_loader_scene/new_loading_bg_1.tga" type="Texture" id=2]
[node name="background_loader" type="Panel" index="0"]
[node name="background_loader" type="Panel"]
self_modulate = Color( 0, 0, 0, 1 )
anchor_left = 0.0

View file

@ -53,7 +53,9 @@ func update( start_position = null ):
self.translation = start_position.translation
self.rotation = start_position.rotation
self.player_mesh.scale = Vector3( self.size, self.size, self.size )
self.scale = Vector3( self.size, self.size, self.size )
# $infos_spatial.scale = Vector3( self.size, self.size, self.size )
# self.player_mesh.scale = Vector3( self.size, self.size, self.size )
self.player_mesh.get_surface_material(0).set_shader_param( "albedo", self.color )
@ -94,6 +96,10 @@ func process_input(delta):
else:
vel.y = 0
if Input.is_action_pressed( "ui_face_cam" ):
$Camera_rotation_helper/face_camera.make_current()
elif Input.is_action_just_released( "ui_face_cam" ):
$Camera_rotation_helper/Camera.make_current()
func process_movement(delta):

View file

@ -3,10 +3,9 @@
[ext_resource path="res://game_scene/Game/Character/Character.gd" type="Script" id=1]
[ext_resource path="res://game_scene/Game/Character/infos_spatial.gd" type="Script" id=2]
[ext_resource path="res://game_scene/character_infos_billboard.tscn" type="PackedScene" id=3]
[ext_resource path="res://game_scene/suzanne/suzanne.obj" type="ArrayMesh" id=4]
[ext_resource path="res://assets/test/suzanne/suzanne.obj" type="ArrayMesh" id=4]
[sub_resource type="Shader" id=4]
[sub_resource type="Shader" id=2]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
@ -45,14 +44,14 @@ void fragment() {
}
"
[sub_resource type="ShaderMaterial" id=5]
[sub_resource type="ShaderMaterial" id=3]
render_priority = 0
shader = SubResource( 4 )
shader = SubResource( 2 )
shader_param/albedo = Color( 1, 1, 1, 1 )
shader_param/specular = 0.0
shader_param/specular = 0.5
shader_param/metallic = 0.0
shader_param/roughness = 1.0
shader_param/roughness = 0.0
shader_param/point_size = 1.0
shader_param/metallic_texture_channel = Plane( 1, 0, 0, 0 )
shader_param/roughness_texture_channel = Plane( 1, 0, 0, 0 )
@ -60,16 +59,14 @@ shader_param/uv1_scale = Vector3( 1, 1, 1 )
shader_param/uv1_offset = Vector3( 0, 0, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )
_sections_unfolded = [ "shader_param" ]
[sub_resource type="SphereShape" id=3]
[sub_resource type="SphereShape" id=1]
radius = 0.520354
[node name="Character" type="KinematicBody"]
[node name="Character" type="KinematicBody" index="0"]
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, -0.00167466, -0.475751, 6.02408 )
visible = false
input_ray_pickable = false
input_capture_on_drag = false
collision_layer = 1
@ -86,7 +83,7 @@ _sections_unfolded = [ "Axis Lock", "Transform", "collision" ]
[node name="infos_spatial" type="Spatial" parent="." index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.20802, 0 )
transform = Transform( 1, 0, 0, 0, 1, 0, -9.56715e-015, 0, 1, -4.65661e-010, 5.47657, 0 )
script = ExtResource( 2 )
[node name="character_infos_billboard" parent="infos_spatial" index="0" instance=ExtResource( 3 )]
@ -94,7 +91,7 @@ script = ExtResource( 2 )
visible = false
mouse_filter = 2
mouse_default_cursor_shape = 2
_sections_unfolded = [ "Mouse", "Size Flags", "Visibility" ]
_sections_unfolded = [ "Mouse", "Rect", "Size Flags", "Visibility" ]
[node name="Camera_rotation_helper" type="Spatial" parent="." index="1"]
@ -115,9 +112,9 @@ near = 0.05
far = 10000.0
_sections_unfolded = [ "Transform" ]
[node name="face_camera_bak" type="Camera" parent="Camera_rotation_helper" index="1"]
[node name="face_camera" type="Camera" parent="Camera_rotation_helper" index="1"]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 4.27532, -2.96733 )
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 5.06689, -2.96733 )
visible = false
keep_aspect = 1
cull_mask = 1048575
@ -125,12 +122,12 @@ environment = null
h_offset = 0.0
v_offset = 0.0
doppler_tracking = 0
projection = 1
projection = 0
current = false
fov = 70.0
size = 2.0
near = 0.05
far = 100.0
far = 10000.0
_sections_unfolded = [ "Transform" ]
[node name="MeshInstance" type="MeshInstance" parent="." index="2"]
@ -147,7 +144,7 @@ lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = ExtResource( 4 )
skeleton = NodePath("..")
material/0 = SubResource( 5 )
material/0 = SubResource( 3 )
_sections_unfolded = [ "Transform", "material" ]
[node name="Flashlight" type="SpotLight" parent="MeshInstance" index="0"]
@ -176,7 +173,7 @@ _sections_unfolded = [ "Light", "Shadow" ]
[node name="collision_shape" type="CollisionShape" parent="." index="3"]
transform = Transform( 0.754381, 0, 0, 0, 0.927224, 0, 0, 0, 0.540596, 0.0063323, 4.35001, -0.0641537 )
shape = SubResource( 3 )
shape = SubResource( 1 )
disabled = false

View file

@ -1018,6 +1018,7 @@ _sections_unfolded = [ "Transform" ]
[node name="World" type="Spatial" parent="." index="0"]
editor/display_folded = true
_sections_unfolded = [ "Transform", "Visibility" ]
[node name="WorldEnvironment" type="WorldEnvironment" parent="World" index="0"]

View file

@ -3,8 +3,6 @@
[ext_resource path="res://game_scene/Game/jukebox/JukeboxPannel.gd" type="Script" id=1]
[ext_resource path="res://gui_scene/GUI/MusicControls/MusicControls.tscn" type="PackedScene" id=2]
[sub_resource type="PlaneMesh" id=1]
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
@ -90,14 +88,14 @@ transparent_bg = true
msaa = 2
hdr = true
disable_3d = false
usage = 0
usage = 2
debug_draw = 0
render_target_v_flip = true
render_target_clear_mode = 0
render_target_update_mode = 2
audio_listener_enable_2d = false
audio_listener_enable_3d = false
physics_object_picking = false
physics_object_picking = true
gui_disable_input = false
gui_snap_controls_to_pixels = true
shadow_atlas_size = 0
@ -105,7 +103,7 @@ shadow_atlas_quad_0 = 2
shadow_atlas_quad_1 = 2
shadow_atlas_quad_2 = 3
shadow_atlas_quad_3 = 4
_sections_unfolded = [ "Render Target", "Rendering" ]
_sections_unfolded = [ "GUI", "Physics", "Render Target", "Rendering" ]
[node name="Music" parent="Viewport" index="0" instance=ExtResource( 2 )]
@ -140,7 +138,7 @@ reverb_bus_uniformity = 0.0
transform = Transform( -1, 8.74228e-008, 3.82137e-015, 0, -4.37114e-008, 1, 8.74228e-008, 1, 4.37114e-008, 0, 0, 0 )
layers = 1
material_override = null
cast_shadow = 1
cast_shadow = 0
extra_cull_margin = 0.0
use_in_baked_light = false
lod_min_distance = 0.0
@ -150,7 +148,7 @@ lod_max_hysteresis = 0.0
mesh = SubResource( 1 )
skeleton = NodePath("..")
material/0 = SubResource( 3 )
_sections_unfolded = [ "material" ]
_sections_unfolded = [ "Geometry", "material" ]
[node name="CollisionShape" type="CollisionShape" parent="Area" index="1"]

View file

@ -2,7 +2,6 @@
[ext_resource path="res://game_scene/Game/jukebox/JukeboxPannel.tscn" type="PackedScene" id=1]
[sub_resource type="SpatialMaterial" id=1]
render_priority = 0
@ -297,7 +296,6 @@ disabled = false
[node name="body" type="MeshInstance" parent="." index="1"]
editor/display_folded = true
layers = 2
material_override = null
cast_shadow = 1

View file

@ -21,9 +21,10 @@ func on_window_size_changed():
change_title()
func change_title():
var title_node = get_node( WINDOW_TITLE_INPUT )
var title = "Khanat"
if title_node and not title_node.text.strip_edges() == "":
title = title_node.text.strip_edges()
title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
OS.set_window_title( title )
if has_node( WINDOW_TITLE_INPUT ):
var title_node = get_node( WINDOW_TITLE_INPUT )
var title = "Khanat"
if title_node and not title_node.text.strip_edges() == "":
title = title_node.text.strip_edges()
title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
OS.set_window_title( title )

View file

@ -19,7 +19,7 @@ _sections_unfolded = [ "Font", "Settings" ]
default_font = SubResource( 1 )
[node name="GUI" type="MarginContainer"]
[node name="GUI" type="MarginContainer" index="0"]
pause_mode = 2
anchor_left = 0.0

View file

@ -76,10 +76,14 @@ func update_character_slots():
func _ready():
$viewport/character/face_camera.make_current()
# $viewport/character/face_camera.make_current()
self.character_preview = $viewport/character
# self.character_preview.get_node( "Camera_rotation_helper/face_camera" ).make_current()
self.character_preview.get_node( "face_camera" ).make_current()
self.character_mesh = $viewport/character.get_node("MeshInstance")
# self.character_face_camera = $viewport/character/Camera_rotation_helper/face_camera
self.character_box = $margin_container/character_box

View file

@ -64,18 +64,15 @@ _sections_unfolded = [ "Render Target", "Rendering" ]
[node name="character" parent="viewport" index="0" instance=ExtResource( 2 )]
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, 0.000610344, -0.475751, 6.02408 )
visible = true
[node name="face_lights" type="Spatial" parent="viewport/character" index="4"]
editor/display_folded = true
[node name="face_light_right" type="OmniLight" parent="viewport/character/face_lights" index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.37718, 6.37492, -2.74363 )
layers = 1
light_color = Color( 1, 1, 1, 1 )
light_energy = 1.0
light_color = Color( 0.742188, 0.945618, 1, 1 )
light_energy = 0.5
light_indirect_energy = 1.0
light_negative = false
light_specular = 0.5
@ -91,13 +88,14 @@ omni_range = 5.0
omni_attenuation = 1.0
omni_shadow_mode = 1
omni_shadow_detail = 1
_sections_unfolded = [ "Light" ]
[node name="face_light_left" type="OmniLight" parent="viewport/character/face_lights" index="1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.69919, 6.37492, -2.74363 )
layers = 1
light_color = Color( 1, 1, 1, 1 )
light_energy = 1.0
light_color = Color( 0.741176, 0.945098, 1, 1 )
light_energy = 0.5
light_indirect_energy = 1.0
light_negative = false
light_specular = 0.5
@ -113,10 +111,11 @@ omni_range = 5.0
omni_attenuation = 1.0
omni_shadow_mode = 1
omni_shadow_detail = 1
_sections_unfolded = [ "Light" ]
[node name="face_camera" type="Camera" parent="viewport/character" index="5"]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 4.35, -2.44418 )
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 5.0457, -2.44418 )
keep_aspect = 1
cull_mask = 1048575
environment = null
@ -222,7 +221,6 @@ _sections_unfolded = [ "Mouse", "Size Flags" ]
[node name="h_box_container" type="HBoxContainer" parent="margin_container/character_box/v_box_container" index="0"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0

View file

@ -91,6 +91,9 @@ test_change_map_3=[ Object(InputEventKey,"resource_local_to_scene":false,"resour
chat_accept=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null)
]
ui_face_cam=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777350,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":47,"unicode":0,"echo":false,"script":null)
]
[locale]