This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
odyssey-old/Scenes/Loader.tscn

142 lines
3.4 KiB
Text

[gd_scene load_steps=12 format=2]
[ext_resource path="res://Graphics/UI/logo-temp-pixel.png" type="Texture" id=1]
[ext_resource path="res://Graphics/UI/iosevka-aile-regular.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://Scenes/Loader.gd" type="Script" id=3]
[sub_resource type="Shader" id=2]
code = "shader_type canvas_item;
uniform vec2 tex_size;
uniform vec4 uv_rect;
void fragment() {
vec2 uv_adjusted = (UV - (uv_rect.xy / tex_size)) * (tex_size / uv_rect.zw);
float dist = distance(uv_adjusted, vec2(0.5));
if (dist < 0.26) {
COLOR = vec4(1);
} else {
COLOR = texture(TEXTURE, UV);
}
}"
custom_defines = ""
[sub_resource type="ShaderMaterial" id=3]
shader = SubResource( 2 )
shader_param/tex_size = Vector2( 240, 180 )
shader_param/uv_rect = Plane( 126, 16, 82, 84 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 126, 16, 82, 84 )
[sub_resource type="Shader" id=5]
code = "shader_type canvas_item;
uniform vec2 tex_size;
uniform vec4 uv_rect;
void fragment() {
vec4 tex = texture(TEXTURE, UV);
vec2 uv_adjusted = (UV - (uv_rect.xy / tex_size)) * (tex_size / uv_rect.zw);
float dist = distance(uv_adjusted, vec2(0.5));
if (dist > 0.56) {
discard;
} else {
COLOR = vec4(tex.aaa, 1.-tex.a);
}
}"
custom_defines = ""
[sub_resource type="ShaderMaterial" id=6]
shader = SubResource( 5 )
shader_param/tex_size = Vector2( 240, 180 )
shader_param/uv_rect = Plane( 146, 39, 39, 38 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 146, 39, 39, 38 )
[sub_resource type="DynamicFont" id=8]
size = 32
font_data = ExtResource( 2 )
[sub_resource type="Animation" id=7]
resource_name = "spinner"
length = 7.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("BottomRight/logo-temp-pixel2:rect_rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 7 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 360.0 ]
}
[node name="Loading" type="Control"]
anchor_right = 0.5
anchor_bottom = 0.5
rect_scale = Vector2( 2, 2 )
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BottomRight" type="Control" parent="."]
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -114.5
margin_top = -109.5
margin_right = -2.5
margin_bottom = -1.5
__meta__ = {
"_edit_use_anchors_": false
}
[node name="logo-temp-pixel2" type="TextureRect" parent="BottomRight"]
material = SubResource( 3 )
margin_left = -7.11853
margin_top = -6.38116
margin_right = 92.8815
margin_bottom = 93.6188
rect_pivot_offset = Vector2( 50, 50 )
texture = SubResource( 1 )
stretch_mode = 4
__meta__ = {
"_edit_use_anchors_": false
}
[node name="logo-temp-pixel" type="TextureRect" parent="BottomRight"]
material = SubResource( 6 )
margin_left = -1.5
margin_top = -1.0
margin_right = 88.5
margin_bottom = 89.0
rect_pivot_offset = Vector2( 79, 59 )
texture = SubResource( 4 )
stretch_mode = 4
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="BottomRight"]
margin_left = -220.0
margin_top = 63.0
margin_right = 174.0
margin_bottom = 104.0
rect_scale = Vector2( 0.5, 0.5 )
custom_fonts/font = SubResource( 8 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
align = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "spinner"
anims/spinner = SubResource( 7 )