mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
Update most demos for Godot 4.0.beta10 (#782)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ulsh8ubvub37"
|
||||
path="res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://background.png"
|
||||
dest_files=["res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.stex"]
|
||||
dest_files=["res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/caster.png-67727cb056b9e0209664a84f1653a25a.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://kkvm5nl3vgun"
|
||||
path="res://.godot/imported/caster.png-67727cb056b9e0209664a84f1653a25a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://caster.png"
|
||||
dest_files=["res://.godot/imported/caster.png-67727cb056b9e0209664a84f1653a25a.stex"]
|
||||
dest_files=["res://.godot/imported/caster.png-67727cb056b9e0209664a84f1653a25a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bl3uv26bv8e38"
|
||||
path="res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://godot.png"
|
||||
dest_files=["res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.stex"]
|
||||
dest_files=["res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://qqnrpl3qn64k"
|
||||
path="res://.godot/imported/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://godot_normal.png"
|
||||
dest_files=["res://.godot/imported/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.stex"]
|
||||
dest_files=["res://.godot/imported/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://byckt0v7uvncx"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/light.png-06e94102f0cce323cff7daad56cf3030.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dk6osr088g4l3"
|
||||
path="res://.godot/imported/light.png-06e94102f0cce323cff7daad56cf3030.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://light.png"
|
||||
dest_files=["res://.godot/imported/light.png-06e94102f0cce323cff7daad56cf3030.stex"]
|
||||
dest_files=["res://.godot/imported/light.png-06e94102f0cce323cff7daad56cf3030.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
17
2d/lights_and_shadows/light_shadows.gd
Normal file
17
2d/lights_and_shadows/light_shadows.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("toggle_directional_light"):
|
||||
$DirectionalLight2D.visible = not $DirectionalLight2D.visible
|
||||
|
||||
if event.is_action_pressed("toggle_point_lights"):
|
||||
for point_light in get_tree().get_nodes_in_group("point_light"):
|
||||
point_light.visible = not point_light.visible
|
||||
|
||||
if event.is_action_pressed("cycle_directional_light_shadows_quality"):
|
||||
$DirectionalLight2D.shadow_filter = wrapi($DirectionalLight2D.shadow_filter + 1, 0, 3)
|
||||
|
||||
if event.is_action_pressed("cycle_point_light_shadows_quality"):
|
||||
for point_light in get_tree().get_nodes_in_group("point_light"):
|
||||
point_light.shadow_filter = wrapi(point_light.shadow_filter + 1, 0, 3)
|
||||
@@ -1,27 +1,48 @@
|
||||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=25 format=3 uid="uid://xdjwv7eeck6l"]
|
||||
|
||||
[ext_resource path="res://background.png" type="Texture2D" id=1]
|
||||
[ext_resource path="res://caster.png" type="Texture2D" id=2]
|
||||
[ext_resource path="res://light.png" type="Texture2D" id=3]
|
||||
[ext_resource path="res://spot.png" type="Texture2D" id=4]
|
||||
[ext_resource path="res://godot.png" type="Texture2D" id=5]
|
||||
[ext_resource path="res://godot_normal.png" type="Texture2D" id=6]
|
||||
[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="OccluderPolygon2D" id=1]
|
||||
[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]
|
||||
[sub_resource type="CanvasItemMaterial" id="2"]
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
[sub_resource type="Animation" id="3"]
|
||||
length = 16.0
|
||||
loop = true
|
||||
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/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 4, 8, 12),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2),
|
||||
@@ -29,15 +50,15 @@ tracks/0/keys = {
|
||||
"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]
|
||||
[sub_resource type="Animation" id="4"]
|
||||
length = 16.0
|
||||
loop = true
|
||||
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/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 4.1, 8.1, 11.8),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2),
|
||||
@@ -45,21 +66,33 @@ tracks/0/keys = {
|
||||
"values": [Vector2(753.756, 314.336), Vector2(69.7562, 234.336), Vector2(256.756, 575.336), Vector2(516.756, 530.336)]
|
||||
}
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=5]
|
||||
[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="CanvasItemMaterial" id=6]
|
||||
[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]
|
||||
[sub_resource type="Animation" id="7"]
|
||||
length = 16.0
|
||||
loop = true
|
||||
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/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 4.1, 7.9, 12.1),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2),
|
||||
@@ -67,7 +100,53 @@ tracks/0/keys = {
|
||||
"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)
|
||||
@@ -75,12 +154,11 @@ 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 )
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(295.886, 216.938)
|
||||
texture = ExtResource( 5 )
|
||||
normal_map = ExtResource( 6 )
|
||||
texture = SubResource("CanvasTexture_hlulo")
|
||||
|
||||
[node name="Label" type="Label" parent="Sprite2D"]
|
||||
offset_left = -22.5563
|
||||
@@ -88,236 +166,237 @@ offset_top = 64.6982
|
||||
offset_right = 24.4437
|
||||
offset_bottom = 78.6982
|
||||
text = "Normal"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SpriteFlipX" type="Sprite2D" parent="."]
|
||||
position = Vector2(543.341, 220.255)
|
||||
scale = Vector2(-1, 1)
|
||||
texture = ExtResource( 5 )
|
||||
normal_map = ExtResource( 6 )
|
||||
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
|
||||
rect_scale = Vector2(-1, 1)
|
||||
scale = Vector2(-1, 1)
|
||||
text = "Flip X"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SpriteFlipY" type="Sprite2D" parent="."]
|
||||
position = Vector2(291.308, 423.369)
|
||||
scale = Vector2(1, -1)
|
||||
texture = ExtResource( 5 )
|
||||
normal_map = ExtResource( 6 )
|
||||
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
|
||||
rect_scale = Vector2(1, -1)
|
||||
scale = Vector2(1, -1)
|
||||
text = "Flip Y"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SpriteFlipXY" type="Sprite2D" parent="."]
|
||||
position = Vector2(542.081, 424.696)
|
||||
scale = Vector2(-1, -1)
|
||||
texture = ExtResource( 5 )
|
||||
normal_map = ExtResource( 6 )
|
||||
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
|
||||
rect_scale = Vector2(-1, -1)
|
||||
scale = Vector2(-1, -1)
|
||||
text = "Flip X + Y"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Casters" type="Node2D" parent="."]
|
||||
|
||||
[node name="ShadowCaster" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(95.2909, 85.3186)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster1" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(200.291, 313.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster1"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster2" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(76.2909, 405.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster2"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster3" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(408.291, 226.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster3"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster4" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(239.291, 48.3186)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster4"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster5" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(140.291, 561.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster5"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster6" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(392.291, 499.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster6"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster7" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(735.291, 552.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster7"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster8" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(661.291, 371.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster8"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster9" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(567.291, 574.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="Casters/ShadowCaster9"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster10" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(420.291, 350.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster10"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster11" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(463.291, 106.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster11"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster12" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(621.291, 78.3186)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster12"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster13" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(761.291, 240.319)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster13"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="ShadowCaster14" type="Sprite2D" parent="Casters"]
|
||||
position = Vector2(771.291, 29.3186)
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster14"]
|
||||
occluder = SubResource( 1 )
|
||||
occluder = SubResource("1")
|
||||
|
||||
[node name="RedLight" type="PointLight2D" parent="."]
|
||||
[node name="RedLight" type="PointLight2D" parent="." groups=["point_light"]]
|
||||
position = Vector2(159.289, 452.441)
|
||||
texture = ExtResource( 3 )
|
||||
color = Color(1, 0.446392, 0.0576646, 1)
|
||||
shadow_enabled = true
|
||||
shadow_gradient_length = 1.3
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 11.1
|
||||
__meta__ = {
|
||||
"_edit_lock_": 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 )
|
||||
material = SubResource("2")
|
||||
texture = ExtResource("4")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="RedLight"]
|
||||
autoplay = "motion"
|
||||
anims/motion = SubResource( 3 )
|
||||
anims/motion2 = SubResource( 4 )
|
||||
|
||||
[node name="GreenLight" type="PointLight2D" parent="."]
|
||||
position = Vector2(753.756, 314.336)
|
||||
texture = ExtResource( 3 )
|
||||
color = Color(0.49247, 0.878537, 0.409146, 1)
|
||||
shadow_enabled = true
|
||||
shadow_gradient_length = 1.2
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 7.1
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
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 )
|
||||
material = SubResource("5")
|
||||
texture = ExtResource("4")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="GreenLight"]
|
||||
autoplay = "m2"
|
||||
anims/m2 = SubResource( 4 )
|
||||
anims/motion = SubResource( 3 )
|
||||
|
||||
[node name="BlueLight" type="PointLight2D" parent="."]
|
||||
position = Vector2(692.078, 31.1773)
|
||||
texture = ExtResource( 3 )
|
||||
color = Color(0.396752, 0.446392, 0.929792, 1)
|
||||
shadow_enabled = true
|
||||
shadow_gradient_length = 1.4
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 5.3
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
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 )
|
||||
material = SubResource("6")
|
||||
texture = ExtResource("4")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="BlueLight"]
|
||||
autoplay = "motion3"
|
||||
anims/motion = SubResource( 3 )
|
||||
anims/motion2 = SubResource( 4 )
|
||||
anims/motion3 = SubResource( 7 )
|
||||
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")
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
@@ -14,27 +14,34 @@ config/name="2D Lights and Shadows"
|
||||
config/description="Simple demo of 2D lights and shadows,
|
||||
using PointLight2D and LightOccluder2D."
|
||||
run/main_scene="res://light_shadows.tscn"
|
||||
config/features=PackedStringArray("4.0")
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=800
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/size/viewport_width=800
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
stretch/aspect="keep"
|
||||
stretch/mode="2d"
|
||||
|
||||
[gdnative]
|
||||
[input]
|
||||
|
||||
singletons=[]
|
||||
|
||||
[rasterizer]
|
||||
|
||||
shadow_filter=2
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
toggle_directional_light={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
toggle_point_lights={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":80,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
cycle_directional_light_shadows_quality={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
cycle_point_light_shadows_quality={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":72,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
path="res://.godot/imported/spot.png-36b4dfbff4efeea17ec3137d266ffc4a.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cnyul1oe7d4b"
|
||||
path="res://.godot/imported/spot.png-36b4dfbff4efeea17ec3137d266ffc4a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
@@ -10,26 +11,24 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://spot.png"
|
||||
dest_files=["res://.godot/imported/spot.png-36b4dfbff4efeea17ec3137d266ffc4a.stex"]
|
||||
dest_files=["res://.godot/imported/spot.png-36b4dfbff4efeea17ec3137d266ffc4a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
||||
Reference in New Issue
Block a user