Skip to content

Commit

Permalink
Remove blur to fix WebKit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
squarepear committed Oct 15, 2024
1 parent 81e197d commit 343bec1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
6 changes: 4 additions & 2 deletions project/ui/cast_preview.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ extends Control
## The child index that is currently shown
var _index := 0

@onready var _cast_previews : Array[Node] = %Cast.get_children()
@onready var _cast: Control = %Cast
@onready var _cast_previews : Array[Node] = _cast.get_children()


func _ready() -> void:
Expand All @@ -21,4 +22,5 @@ func _on_visible_duration_timeout() -> void:
create_tween().tween_property(current, "modulate:a", 0, crossfade_speed)
_index = (_index + 1) % _cast_previews.size()
var next := _cast_previews[_index]
create_tween().tween_property(next, "modulate:a", 1, crossfade_speed)
next.modulate.a = 1
_cast.move_child(next, 0)
6 changes: 4 additions & 2 deletions project/ui/cast_preview.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[gd_scene load_steps=11 format=3 uid="uid://d3kw3amfgirv1"]
[gd_scene load_steps=12 format=3 uid="uid://d3kw3amfgirv1"]

[ext_resource type="Script" path="res://ui/cast_preview.gd" id="1_tjoh5"]
[ext_resource type="PackedScene" uid="uid://dmbe6mlt6wbgr" path="res://ui/start_scene/character_preview.tscn" id="2_ch53q"]
[ext_resource type="StyleBox" uid="uid://dlbigrenfpyvm" path="res://ui/white_rounded_style_box.tres" id="2_fg3fa"]
[ext_resource type="Texture2D" uid="uid://nnsvltgmeigg" path="res://cast/ethan.png" id="3_r85gh"]
[ext_resource type="Texture2D" uid="uid://cbcvn5aqnt5ps" path="res://locations/courtyard.png" id="4_54onl"]
[ext_resource type="Texture2D" uid="uid://bfeif5iosw0gv" path="res://cast/hilda.png" id="5_fgp5f"]
Expand All @@ -23,14 +24,15 @@ offset_bottom = 720.0
grow_horizontal = 2
script = ExtResource("1_tjoh5")

[node name="Cast" type="Control" parent="."]
[node name="Cast" type="Panel" parent="."]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = ExtResource("2_fg3fa")

[node name="CharacterPreview" parent="Cast" instance=ExtResource("2_ch53q")]
layout_mode = 1
Expand Down
9 changes: 1 addition & 8 deletions project/ui/location_view.tscn
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://ctpger8oqxh5u"]
[gd_scene load_steps=2 format=3 uid="uid://ctpger8oqxh5u"]

[ext_resource type="Shader" path="res://ui/gaussian_blur.gdshader" id="1_g6ft6"]
[ext_resource type="Texture2D" uid="uid://dn3sdi40yoltw" path="res://locations/hallway.png" id="2_6s82d"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_o5qot"]
shader = ExtResource("1_g6ft6")
shader_parameter/step = Vector2(0.5, 0.8)
shader_parameter/radius = 8.0

[node name="Location" type="TextureRect"]
material = SubResource("ShaderMaterial_o5qot")
texture = ExtResource("2_6s82d")
expand_mode = 1
stretch_mode = 6
12 changes: 8 additions & 4 deletions project/ui/start_scene/character_preview.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ script = ExtResource("2_dexm5")

[node name="Location" parent="." instance=ExtResource("2_gdob0")]
unique_name_in_owner = true
clip_children = 2
layout_mode = 2
texture = null
expand_mode = 0
stretch_mode = 0

[node name="Npc" type="TextureRect" parent="Location"]
unique_name_in_owner = true
layout_mode = 0
offset_right = 720.0
offset_bottom = 720.0
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
expand_mode = 3
stretch_mode = 5

[node name="RoundedWhiteFrame" parent="." instance=ExtResource("5_bl4kh")]
layout_mode = 2

0 comments on commit 343bec1

Please sign in to comment.