Merge pull request #93 from RoyBerube/master

Updated SDF demo to 3.0
This commit is contained in:
Rémi Verschelde 2017-11-13 08:17:36 +01:00 committed by GitHub
commit 38dc7b0d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 0 deletions

BIN
2d/font.font Normal file

Binary file not shown.

BIN
2d/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

23
2d/project.godot Normal file
View File

@ -0,0 +1,23 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=3
[application]
config/name="Signed Distance Field Font Demo"
run/main_scene="res://sdf.tscn"
config/icon="res://icon.png"
[gdnative]
singletons=[ ]
[rendering]
environment/default_environment="res://default_env.tres"

95
2d/sdf.tscn Normal file
View File

@ -0,0 +1,95 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://font.font" type="BitmapFont" id=1]
[sub_resource type="Animation" id=1]
length = 15.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_deg")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 15 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, -360.0 ]
}
[sub_resource type="Animation" id=2]
length = 10.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 7, 7 ) ]
}
[node name="Root Node" type="Node2D"]
[node name="base" type="Position2D" parent="."]
position = Vector2( 450, 300 )
_sections_unfolded = [ "Transform" ]
[node name="rotate" type="AnimationPlayer" parent="base"]
playback_process_mode = 1
playback_default_blend_time = 0.0
root_node = NodePath("..")
anims/rotate = SubResource( 1 )
anims/zoomin_zoomout = SubResource( 2 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = "rotate"
[node name="zoom" type="AnimationPlayer" parent="base"]
playback_process_mode = 1
playback_default_blend_time = 0.0
root_node = NodePath("..")
anims/zoomin_zoomout = SubResource( 2 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = "zoomin_zoomout"
[node name="Label" type="Label" parent="base"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = -169.0
margin_top = -49.0
margin_right = 172.0
margin_bottom = 56.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = ExtResource( 1 )
custom_colors/font_color = Color( 0.853858, 0.771714, 0.753746, 1 )
custom_colors/font_color_shadow = Color( 0.56592, 0.454525, 0.518426, 1 )
text = "Signed Distance
Field Font!!"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_colors", "custom_fonts" ]