123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402 |
- [gd_scene load_steps=25 format=3 uid="uid://xdjwv7eeck6l"]
- [ext_resource type="Texture2D" uid="uid://ulsh8ubvub37" path="res://background.png" id="1"]
- [ext_resource type="Script" path="res://light_shadows.gd" id="1_7xjm7"]
- [ext_resource type="Texture2D" uid="uid://kkvm5nl3vgun" path="res://caster.png" id="2"]
- [ext_resource type="Texture2D" uid="uid://dk6osr088g4l3" path="res://light.png" id="3"]
- [ext_resource type="Texture2D" uid="uid://cnyul1oe7d4b" path="res://spot.png" id="4"]
- [ext_resource type="Texture2D" uid="uid://bl3uv26bv8e38" path="res://godot.png" id="5"]
- [ext_resource type="Texture2D" uid="uid://qqnrpl3qn64k" path="res://godot_normal.png" id="6"]
- [sub_resource type="CanvasTexture" id="CanvasTexture_hlulo"]
- diffuse_texture = ExtResource("5")
- normal_texture = ExtResource("6")
- specular_shininess = 0.5
- [sub_resource type="CanvasTexture" id="CanvasTexture_hea5a"]
- diffuse_texture = ExtResource("5")
- normal_texture = ExtResource("6")
- specular_shininess = 0.5
- [sub_resource type="CanvasTexture" id="CanvasTexture_hc1ic"]
- diffuse_texture = ExtResource("5")
- normal_texture = ExtResource("6")
- specular_shininess = 0.5
- [sub_resource type="CanvasTexture" id="CanvasTexture_l1r6i"]
- diffuse_texture = ExtResource("5")
- normal_texture = ExtResource("6")
- specular_shininess = 0.5
- [sub_resource type="OccluderPolygon2D" id="1"]
- polygon = PackedVector2Array(-15.913, -15.9738, 15.9079, -16.0785, 15.6986, 15.847, -16.1223, 15.9517)
- [sub_resource type="CanvasItemMaterial" id="2"]
- blend_mode = 1
- [sub_resource type="Animation" id="3"]
- length = 16.0
- loop_mode = 1
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath(".:position")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0, 4, 8, 12),
- "transitions": PackedFloat32Array(-2, -2, -2, -2),
- "update": 0,
- "values": [Vector2(159.289, 452.441), Vector2(132.279, 80.4366), Vector2(700.722, 241.27), Vector2(429.392, 571.532)]
- }
- [sub_resource type="Animation" id="4"]
- length = 16.0
- loop_mode = 1
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath(".:position")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0, 4.1, 8.1, 11.8),
- "transitions": PackedFloat32Array(-2, -2, -2, -2),
- "update": 0,
- "values": [Vector2(753.756, 314.336), Vector2(69.7562, 234.336), Vector2(256.756, 575.336), Vector2(516.756, 530.336)]
- }
- [sub_resource type="AnimationLibrary" id="AnimationLibrary_wawvy"]
- _data = {
- "motion": SubResource("3"),
- "motion2": SubResource("4")
- }
- [sub_resource type="CanvasItemMaterial" id="5"]
- blend_mode = 1
- [sub_resource type="AnimationLibrary" id="AnimationLibrary_fig6v"]
- _data = {
- "m2": SubResource("4"),
- "motion": SubResource("3")
- }
- [sub_resource type="CanvasItemMaterial" id="6"]
- blend_mode = 1
- [sub_resource type="Animation" id="7"]
- length = 16.0
- loop_mode = 1
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath(".:position")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0, 4.1, 7.9, 12.1),
- "transitions": PackedFloat32Array(-2, -2, -2, -2),
- "update": 0,
- "values": [Vector2(692.078, 29.8849), Vector2(309.606, 31.5551), Vector2(40.7064, 238.658), Vector2(685.397, 282.082)]
- }
- [sub_resource type="AnimationLibrary" id="AnimationLibrary_kfxj1"]
- _data = {
- "motion": SubResource("3"),
- "motion2": SubResource("4"),
- "motion3": SubResource("7")
- }
- [sub_resource type="Animation" id="Animation_rgbru"]
- resource_name = "rotate_directional_light"
- length = 20.0
- loop_mode = 1
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath("DirectionalLight2D:rotation")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0, 20),
- "transitions": PackedFloat32Array(1, 1),
- "update": 0,
- "values": [0.0, 6.28319]
- }
- [sub_resource type="Animation" id="Animation_emv7u"]
- length = 0.001
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath("DirectionalLight2D:rotation")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0),
- "transitions": PackedFloat32Array(1),
- "update": 0,
- "values": [0.0]
- }
- [sub_resource type="AnimationLibrary" id="AnimationLibrary_6bket"]
- _data = {
- "RESET": SubResource("Animation_emv7u"),
- "rotate_directional_light": SubResource("Animation_rgbru")
- }
- [node name="LightShadows" type="Node2D"]
- script = ExtResource("1_7xjm7")
- [node name="Ambient" type="CanvasModulate" parent="."]
- color = Color(0.27451, 0.27451, 0.27451, 1)
- [node name="Background" type="Sprite2D" parent="."]
- position = Vector2(401.251, 302.906)
- scale = Vector2(128, 128)
- texture = ExtResource("1")
- [node name="Sprite2D" type="Sprite2D" parent="."]
- position = Vector2(295.886, 216.938)
- texture = SubResource("CanvasTexture_hlulo")
- [node name="Label" type="Label" parent="Sprite2D"]
- offset_left = -22.5563
- offset_top = 64.6982
- offset_right = 24.4437
- offset_bottom = 78.6982
- text = "Normal"
- [node name="SpriteFlipX" type="Sprite2D" parent="."]
- position = Vector2(543.341, 220.255)
- scale = Vector2(-1, 1)
- texture = SubResource("CanvasTexture_hea5a")
- [node name="Label" type="Label" parent="SpriteFlipX"]
- offset_left = 22.5564
- offset_top = 66.0347
- offset_right = 69.5564
- offset_bottom = 80.0347
- scale = Vector2(-1, 1)
- text = "Flip X"
- [node name="SpriteFlipY" type="Sprite2D" parent="."]
- position = Vector2(291.308, 423.369)
- scale = Vector2(1, -1)
- texture = SubResource("CanvasTexture_hc1ic")
- [node name="Label" type="Label" parent="SpriteFlipY"]
- offset_left = -23.3056
- offset_top = -67.2446
- offset_right = 23.6944
- offset_bottom = -53.2446
- scale = Vector2(1, -1)
- text = "Flip Y"
- [node name="SpriteFlipXY" type="Sprite2D" parent="."]
- position = Vector2(542.081, 424.696)
- scale = Vector2(-1, -1)
- texture = SubResource("CanvasTexture_l1r6i")
- [node name="Label" type="Label" parent="SpriteFlipXY"]
- offset_left = 23.9495
- offset_top = -67.5714
- offset_right = 81.9495
- offset_bottom = -53.5714
- scale = Vector2(-1, -1)
- text = "Flip X + Y"
- [node name="Casters" type="Node2D" parent="."]
- [node name="ShadowCaster" type="Sprite2D" parent="Casters"]
- position = Vector2(95.2909, 85.3186)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster"]
- occluder = SubResource("1")
- [node name="ShadowCaster1" type="Sprite2D" parent="Casters"]
- position = Vector2(200.291, 313.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster1"]
- occluder = SubResource("1")
- [node name="ShadowCaster2" type="Sprite2D" parent="Casters"]
- position = Vector2(76.2909, 405.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster2"]
- occluder = SubResource("1")
- [node name="ShadowCaster3" type="Sprite2D" parent="Casters"]
- position = Vector2(408.291, 226.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster3"]
- occluder = SubResource("1")
- [node name="ShadowCaster4" type="Sprite2D" parent="Casters"]
- position = Vector2(239.291, 48.3186)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster4"]
- occluder = SubResource("1")
- [node name="ShadowCaster5" type="Sprite2D" parent="Casters"]
- position = Vector2(140.291, 561.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster5"]
- occluder = SubResource("1")
- [node name="ShadowCaster6" type="Sprite2D" parent="Casters"]
- position = Vector2(392.291, 499.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster6"]
- occluder = SubResource("1")
- [node name="ShadowCaster7" type="Sprite2D" parent="Casters"]
- position = Vector2(735.291, 552.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster7"]
- occluder = SubResource("1")
- [node name="ShadowCaster8" type="Sprite2D" parent="Casters"]
- position = Vector2(661.291, 371.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster8"]
- occluder = SubResource("1")
- [node name="ShadowCaster9" type="Sprite2D" parent="Casters"]
- position = Vector2(567.291, 574.319)
- texture = ExtResource("2")
- [node name="occluder" type="LightOccluder2D" parent="Casters/ShadowCaster9"]
- occluder = SubResource("1")
- [node name="ShadowCaster10" type="Sprite2D" parent="Casters"]
- position = Vector2(420.291, 350.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster10"]
- occluder = SubResource("1")
- [node name="ShadowCaster11" type="Sprite2D" parent="Casters"]
- position = Vector2(463.291, 106.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster11"]
- occluder = SubResource("1")
- [node name="ShadowCaster12" type="Sprite2D" parent="Casters"]
- position = Vector2(621.291, 78.3186)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster12"]
- occluder = SubResource("1")
- [node name="ShadowCaster13" type="Sprite2D" parent="Casters"]
- position = Vector2(761.291, 240.319)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster13"]
- occluder = SubResource("1")
- [node name="ShadowCaster14" type="Sprite2D" parent="Casters"]
- position = Vector2(771.291, 29.3186)
- texture = ExtResource("2")
- [node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster14"]
- occluder = SubResource("1")
- [node name="RedLight" type="PointLight2D" parent="." groups=["point_light"]]
- position = Vector2(159.289, 452.441)
- color = Color(1, 0.446392, 0.0576646, 1)
- shadow_enabled = true
- shadow_filter = 1
- shadow_filter_smooth = 1.2
- texture = ExtResource("3")
- [node name="Blob" type="Sprite2D" parent="RedLight"]
- material = SubResource("2")
- texture = ExtResource("4")
- [node name="AnimationPlayer" type="AnimationPlayer" parent="RedLight"]
- autoplay = "motion"
- libraries = {
- "": SubResource("AnimationLibrary_wawvy")
- }
- [node name="GreenLight" type="PointLight2D" parent="." groups=["point_light"]]
- position = Vector2(753.756, 314.336)
- color = Color(0.49247, 0.878537, 0.409146, 1)
- shadow_enabled = true
- shadow_filter = 1
- shadow_filter_smooth = 1.2
- texture = ExtResource("3")
- [node name="blob" type="Sprite2D" parent="GreenLight"]
- material = SubResource("5")
- texture = ExtResource("4")
- [node name="AnimationPlayer" type="AnimationPlayer" parent="GreenLight"]
- autoplay = "m2"
- libraries = {
- "": SubResource("AnimationLibrary_fig6v")
- }
- [node name="BlueLight" type="PointLight2D" parent="." groups=["point_light"]]
- position = Vector2(692.078, 29.8849)
- color = Color(0.396752, 0.446392, 0.929792, 1)
- shadow_enabled = true
- shadow_filter = 1
- shadow_filter_smooth = 1.2
- texture = ExtResource("3")
- [node name="blob" type="Sprite2D" parent="BlueLight"]
- material = SubResource("6")
- texture = ExtResource("4")
- [node name="AnimationPlayer" type="AnimationPlayer" parent="BlueLight"]
- autoplay = "motion3"
- libraries = {
- "": SubResource("AnimationLibrary_kfxj1")
- }
- [node name="Camera2D" type="Camera2D" parent="."]
- offset = Vector2(400, 300)
- current = true
- [node name="CanvasLayer" type="CanvasLayer" parent="."]
- [node name="Label" type="Label" parent="CanvasLayer"]
- anchors_preset = 2
- anchor_top = 1.0
- anchor_bottom = 1.0
- offset_left = 16.0
- offset_top = -120.0
- offset_right = 321.0
- offset_bottom = -1.0
- grow_vertical = 0
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "D: Toggle directional light
- P: Toggle point lights
- S: Cycle directional light shadow quality
- H: Cycle point light shadow quality"
- [node name="DirectionalLight2D" type="DirectionalLight2D" parent="."]
- visible = false
- shadow_enabled = true
- shadow_filter = 1
- shadow_filter_smooth = 1.2
- [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
- autoplay = "rotate_directional_light"
- libraries = {
- "": SubResource("AnimationLibrary_6bket")
- }
|