Skip to content

Commit cb80b00

Browse files
authored
Updated SDF demo to 3.0
1 parent f2e2d60 commit cb80b00

File tree

4 files changed

+118
-0
lines changed

4 files changed

+118
-0
lines changed

2d/font.font

190 KB
Binary file not shown.

2d/icon.png

3.42 KB
Loading

2d/project.godot

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
; Engine configuration file.
2+
; It's best edited using the editor UI and not directly,
3+
; since the parameters that go here are not all obvious.
4+
;
5+
; Format:
6+
; [section] ; section goes between []
7+
; param=value ; assign values to parameters
8+
9+
config_version=3
10+
11+
[application]
12+
13+
config/name="Signed Distance Field Font Demo"
14+
run/main_scene="res://sdf.tscn"
15+
config/icon="res://icon.png"
16+
17+
[gdnative]
18+
19+
singletons=[ ]
20+
21+
[rendering]
22+
23+
environment/default_environment="res://default_env.tres"

2d/sdf.tscn

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[gd_scene load_steps=4 format=2]
2+
3+
[ext_resource path="res://font.font" type="BitmapFont" id=1]
4+
5+
[sub_resource type="Animation" id=1]
6+
7+
length = 15.0
8+
loop = true
9+
step = 0.1
10+
tracks/0/type = "value"
11+
tracks/0/path = NodePath(".:rotation_deg")
12+
tracks/0/interp = 1
13+
tracks/0/loop_wrap = true
14+
tracks/0/imported = false
15+
tracks/0/keys = {
16+
"times": PoolRealArray( 0, 15 ),
17+
"transitions": PoolRealArray( 1, 1 ),
18+
"update": 0,
19+
"values": [ 0.0, -360.0 ]
20+
}
21+
22+
[sub_resource type="Animation" id=2]
23+
24+
length = 10.0
25+
loop = true
26+
step = 0.1
27+
tracks/0/type = "value"
28+
tracks/0/path = NodePath(".:scale")
29+
tracks/0/interp = 1
30+
tracks/0/loop_wrap = true
31+
tracks/0/imported = false
32+
tracks/0/keys = {
33+
"times": PoolRealArray( 0, 5 ),
34+
"transitions": PoolRealArray( 1, 1 ),
35+
"update": 0,
36+
"values": [ Vector2( 1, 1 ), Vector2( 7, 7 ) ]
37+
}
38+
39+
[node name="Root Node" type="Node2D"]
40+
41+
[node name="base" type="Position2D" parent="."]
42+
43+
position = Vector2( 450, 300 )
44+
_sections_unfolded = [ "Transform" ]
45+
46+
[node name="rotate" type="AnimationPlayer" parent="base"]
47+
48+
playback_process_mode = 1
49+
playback_default_blend_time = 0.0
50+
root_node = NodePath("..")
51+
anims/rotate = SubResource( 1 )
52+
anims/zoomin_zoomout = SubResource( 2 )
53+
playback/active = true
54+
playback/speed = 1.0
55+
blend_times = [ ]
56+
autoplay = "rotate"
57+
58+
[node name="zoom" type="AnimationPlayer" parent="base"]
59+
60+
playback_process_mode = 1
61+
playback_default_blend_time = 0.0
62+
root_node = NodePath("..")
63+
anims/zoomin_zoomout = SubResource( 2 )
64+
playback/active = true
65+
playback/speed = 1.0
66+
blend_times = [ ]
67+
autoplay = "zoomin_zoomout"
68+
69+
[node name="Label" type="Label" parent="base"]
70+
71+
anchor_left = 0.0
72+
anchor_top = 0.0
73+
anchor_right = 0.0
74+
anchor_bottom = 0.0
75+
margin_left = -169.0
76+
margin_top = -49.0
77+
margin_right = 172.0
78+
margin_bottom = 56.0
79+
rect_pivot_offset = Vector2( 0, 0 )
80+
rect_clip_content = false
81+
mouse_filter = 2
82+
size_flags_horizontal = 1
83+
size_flags_vertical = 4
84+
custom_fonts/font = ExtResource( 1 )
85+
custom_colors/font_color = Color( 0.853858, 0.771714, 0.753746, 1 )
86+
custom_colors/font_color_shadow = Color( 0.56592, 0.454525, 0.518426, 1 )
87+
text = "Signed Distance
88+
Field Font!!"
89+
align = 1
90+
percent_visible = 1.0
91+
lines_skipped = 0
92+
max_lines_visible = -1
93+
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
94+
95+

0 commit comments

Comments
 (0)