diff --git a/3d/labels_and_texts/3d_labels_and_texts.gd b/3d/labels_and_texts/3d_labels_and_texts.gd new file mode 100644 index 00000000..a2ba610f --- /dev/null +++ b/3d/labels_and_texts/3d_labels_and_texts.gd @@ -0,0 +1,78 @@ +extends Node + +const ROT_SPEED = 0.003 +const ZOOM_SPEED = 0.125 +const MAIN_BUTTONS = MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT | MOUSE_BUTTON_MASK_MIDDLE + +var tester_index = 0 +var rot_x = -TAU / 16 # This must be kept in sync with RotationX. +var rot_y = TAU / 8 # This must be kept in sync with CameraHolder. +var camera_distance = 2.0 +var base_height = ProjectSettings.get_setting("display/window/size/viewport_height") + +@onready var testers = $Testers +@onready var camera_holder = $CameraHolder # Has a position and rotates on Y. +@onready var rotation_x = $CameraHolder/RotationX +@onready var camera = $CameraHolder/RotationX/Camera3D + + +func _ready(): + camera_holder.transform.basis = Basis.from_euler(Vector3(0, rot_y, 0)) + rotation_x.transform.basis = Basis.from_euler(Vector3(rot_x, 0, 0)) + update_gui() + + +func _unhandled_input(event): + if event.is_action_pressed("ui_left"): + _on_previous_pressed() + if event.is_action_pressed("ui_right"): + _on_next_pressed() + + if event is InputEventMouseButton: + if event.button_index == MOUSE_BUTTON_WHEEL_UP: + camera_distance -= ZOOM_SPEED + if event.button_index == MOUSE_BUTTON_WHEEL_DOWN: + camera_distance += ZOOM_SPEED + camera_distance = clamp(camera_distance, 1.5, 6) + + if event is InputEventMouseMotion and event.button_mask & MAIN_BUTTONS: + # Compensate motion speed to be resolution-independent (based on the window height). + var relative_motion = event.relative * DisplayServer.window_get_size().y / base_height + rot_y -= relative_motion.x * ROT_SPEED + rot_x -= relative_motion.y * ROT_SPEED + rot_x = clamp(rot_x, -1.57, 0) + camera_holder.transform.basis = Basis.from_euler(Vector3(0, rot_y, 0)) + rotation_x.transform.basis = Basis.from_euler(Vector3(rot_x, 0, 0)) + + +func _process(delta): + var current_tester = testers.get_child(tester_index) + # This code assumes CameraHolder's X and Y coordinates are already correct. + var current_position = camera_holder.global_transform.origin.z + var target_position = current_tester.global_transform.origin.z + camera_holder.global_transform.origin.z = lerpf(current_position, target_position, 3 * delta) + camera.position.z = lerpf(camera.position.z, camera_distance, 10 * delta) + + +func _on_previous_pressed(): + tester_index = max(0, tester_index - 1) + update_gui() + + +func _on_next_pressed(): + tester_index = min(tester_index + 1, testers.get_child_count() - 1) + update_gui() + + +func update_gui(): + $TestName.text = str(testers.get_child(tester_index).name).capitalize() + $Previous.disabled = tester_index == 0 + $Next.disabled = tester_index == testers.get_child_count() - 1 + + # Only display player name field if relevant. + $Testers/Label3DHealthBar/Name2.visible = str(testers.get_child(tester_index).name) == "Label3DHealthBar" + $Testers/Label3DHealthBar/LineEdit.visible = str(testers.get_child(tester_index).name) == "Label3DHealthBar" + + +func _on_line_edit_text_submitted(new_text): + $Testers/Label3DHealthBar/LineEdit.release_focus() diff --git a/3d/labels_and_texts/3d_labels_and_texts.tscn b/3d/labels_and_texts/3d_labels_and_texts.tscn new file mode 100644 index 00000000..6f9fc7b8 --- /dev/null +++ b/3d/labels_and_texts/3d_labels_and_texts.tscn @@ -0,0 +1,692 @@ +[gd_scene load_steps=37 format=3 uid="uid://crd3is1f8w55h"] + +[ext_resource type="FontFile" uid="uid://cw4codbiaecjh" path="res://fonts/Xolonium-Regular.ttf" id="3_ds7iv"] +[ext_resource type="FontFile" uid="uid://rv6to2i5stmy" path="res://fonts/Xolonium-Regular-MSDF.ttf" id="4_omdth"] +[ext_resource type="FontFile" uid="uid://ueofyxhwry0c" path="res://fonts/Xolonium-Regular-MSDF-Mipmaps.ttf" id="5_syv27"] +[ext_resource type="FontFile" uid="uid://ceawygbjffpls" path="res://fonts/Xolonium-Regular-Mipmaps.ttf" id="6_ewmy5"] +[ext_resource type="Texture2D" uid="uid://bpgdsvb3lfg6l" path="res://textures/textmesh_texture.png" id="7_w00di"] +[ext_resource type="FontFile" uid="uid://cb35jtyk02goi" path="res://fonts/fontello-godot.woff2" id="7_wvpht"] +[ext_resource type="Shader" path="res://curvature.gdshader" id="8_2gwag"] +[ext_resource type="Script" path="res://label_3d_layout.gd" id="8_rvw0p"] +[ext_resource type="Texture2D" uid="uid://chjqieyps5n5r" path="res://textures/checker.png" id="14"] +[ext_resource type="Script" path="res://3d_labels_and_texts.gd" id="18"] + +[sub_resource type="ProceduralSkyMaterial" id="9"] + +[sub_resource type="Sky" id="10"] +sky_material = SubResource("9") + +[sub_resource type="Environment" id="11"] +background_mode = 2 +sky = SubResource("10") + +[sub_resource type="Animation" id="Animation_qdnt6"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Testers/Label3DFontTypes/AnimationOrigin:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 0, 0)] +} + +[sub_resource type="Animation" id="12"] +resource_name = "move" +length = 10.0 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Testers/Label3DFontTypes/AnimationOrigin:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 5), +"transitions": PackedFloat32Array(-2, -2), +"update": 0, +"values": [Vector3(2, 0, 0), Vector3(-13, 0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_ecfcr"] +_data = { +"RESET": SubResource("Animation_qdnt6"), +"move": SubResource("12") +} + +[sub_resource type="StandardMaterial3D" id="13"] +diffuse_mode = 1 +albedo_texture = ExtResource("14") +uv1_scale = Vector3(32, 32, 1) +texture_filter = 5 + +[sub_resource type="PlaneMesh" id="14"] +material = SubResource("13") +size = Vector2(128, 128) + +[sub_resource type="BoxMesh" id="BoxMesh_770hc"] +size = Vector3(0.125, 1.5, 2.5) + +[sub_resource type="BoxMesh" id="BoxMesh_juuw1"] + +[sub_resource type="SphereMesh" id="SphereMesh_wsjfy"] + +[sub_resource type="FontVariation" id="FontVariation_hue2h"] +spacing_glyph = -8 + +[sub_resource type="TextMesh" id="TextMesh_xlu0q"] +text = "" +font = ExtResource("7_wvpht") +font_size = 64 + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ri5nw"] +albedo_color = Color(0.356863, 0.301961, 1, 1) + +[sub_resource type="TextMesh" id="TextMesh_u3elb"] +text = "" +font = ExtResource("7_wvpht") +font_size = 64 + +[sub_resource type="TextMesh" id="TextMesh_u00sq"] +text = "TextMesh (depth = 0.0)" +font_size = 32 +depth = 0.0 + +[sub_resource type="TextMesh" id="TextMesh_cf5wd"] +text = "TextMesh" +font_size = 32 + +[sub_resource type="TextMesh" id="TextMesh_0mhsg"] +text = "TextMesh (low detail)" +font_size = 32 +curve_step = 10.0 + +[sub_resource type="TextMesh" id="TextMesh_ddkjo"] +text = "Additive Blending" +font_size = 32 + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_iyglb"] +blend_mode = 1 +albedo_color = Color(0.776471, 1, 0.45098, 1) + +[sub_resource type="TextMesh" id="TextMesh_idsby"] +text = "Metallic" +font_size = 32 + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mdg0l"] +albedo_color = Color(1, 0.345098, 0.760784, 1) +metallic = 1.0 +roughness = 0.0 + +[sub_resource type="TextMesh" id="TextMesh_0sjgn"] +text = "Curvature Shader" +font_size = 32 +depth = 0.1 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_iuh2c"] +render_priority = 0 +shader = ExtResource("8_2gwag") + +[sub_resource type="TextMesh" id="TextMesh_fqc7s"] +text = "Textured TextMesh" +font_size = 32 +depth = 0.1 + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_i3bnm"] +shading_mode = 0 +albedo_texture = ExtResource("7_w00di") +texture_filter = 0 + +[node name="AntiAliasingTestScene" type="WorldEnvironment"] +environment = SubResource("11") +script = ExtResource("18") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "move" +libraries = { +"": SubResource("AnimationLibrary_ecfcr") +} + +[node name="Plane" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -22) +layers = 2 +mesh = SubResource("14") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(0.909487, -0.23874, 0.340349, 0, 0.818672, 0.574262, -0.415733, -0.522284, 0.744571, 3.9506, 3.39961, 3.54442) +shadow_enabled = true +shadow_bias = 0.04 +shadow_blur = 1.5 +directional_shadow_mode = 0 +directional_shadow_fade_start = 1.0 +directional_shadow_max_distance = 24.0 + +[node name="CameraHolder" type="Node3D" parent="."] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.125, 0) + +[node name="RotationX" type="Node3D" parent="CameraHolder"] + +[node name="Camera3D" type="Camera3D" parent="CameraHolder/RotationX"] +fov = 70.0 + +[node name="Testers" type="Node3D" parent="."] + +[node name="BasicLabel3D" type="Node3D" parent="Testers"] + +[node name="Label3D" type="Label3D" parent="Testers/BasicLabel3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.6, 0) +texture_filter = 5 +outline_modulate = Color(0.270588, 0.270588, 0.270588, 1) +text = "Hello from Label3D! + +Line breaks and/or autowrap can be used to write multiline text." +outline_size = 3 +autowrap_mode = 2 +width = 460.0 + +[node name="Wall" type="MeshInstance3D" parent="Testers/BasicLabel3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0654575, 0.5, 0) +mesh = SubResource("BoxMesh_770hc") + +[node name="TwoSidedLabel3D" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4) + +[node name="Front" type="Label3D" parent="Testers/TwoSidedLabel3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.7, 0) +double_sided = false +texture_filter = 5 +modulate = Color(0.686275, 0.92549, 1, 1) +text = "Rotate to the other side…" +font_size = 48 +outline_size = 3 +vertical_alignment = 0 + +[node name="Back" type="Label3D" parent="Testers/TwoSidedLabel3D"] +transform = Transform3D(1.31134e-07, 0, -1, 0, 1, 0, 1, 0, 1.31134e-07, 0, 0.7, 0) +double_sided = false +texture_filter = 5 +modulate = Color(1, 0.929412, 0.607843, 1) +text = "Rotate to the other side… +(second Label3D node)" +font_size = 48 +outline_size = 3 +vertical_alignment = 0 + +[node name="ShadedLabel3D" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -8) + +[node name="AlphaCutDisabled" type="Label3D" parent="Testers/ShadedLabel3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.3, 0) +shaded = true +texture_filter = 5 +modulate = Color(0.607843, 1, 1, 1) +outline_modulate = Color(0, 0, 0, 0.501961) +text = "Alpha Cut = Disabled +I receive shadows" +font_size = 48 +outline_size = 3 +line_spacing = -6.0 + +[node name="AlphaCutDiscard" type="Label3D" parent="Testers/ShadedLabel3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.1, 0) +cast_shadow = 1 +shaded = true +alpha_cut = 1 +texture_filter = 5 +modulate = Color(0.843137, 0.623529, 1, 1) +outline_modulate = Color(0, 0, 0, 0.501961) +text = "Alpha Cut = Discard +I cast and receive shadows +(but can't have partial transparency)" +font_size = 44 +outline_size = 3 +line_spacing = -6.0 + +[node name="AlphaCutOpaquePrepass" type="Label3D" parent="Testers/ShadedLabel3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.9, 0) +cast_shadow = 1 +shaded = true +alpha_cut = 2 +texture_filter = 5 +modulate = Color(0.678431, 1, 0.713726, 1) +outline_modulate = Color(0, 0, 0, 0.501961) +text = "Alpha Cut = Opaque Prepass +I cast and receive shadows" +font_size = 48 +outline_size = 3 +line_spacing = -6.0 + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Testers/ShadedLabel3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2.71175, 1.61301) +transparency = 0.33 +mesh = SubResource("BoxMesh_juuw1") + +[node name="Label3DFontTypes" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -12) + +[node name="AnimationOrigin" type="Node3D" parent="Testers/Label3DFontTypes"] + +[node name="Raster" type="Label3D" parent="Testers/Label3DFontTypes/AnimationOrigin"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.4, 1) +texture_filter = 5 +text = "Label3D +(raster)" +font = ExtResource("3_ds7iv") +font_size = 40 +outline_size = 9 + +[node name="MSDF" type="Label3D" parent="Testers/Label3DFontTypes/AnimationOrigin"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.4, -1) +texture_filter = 5 +text = "Label3D +(MSDF)" +font = ExtResource("4_omdth") +font_size = 40 +outline_size = 9 + +[node name="RasterMipmaps" type="Label3D" parent="Testers/Label3DFontTypes/AnimationOrigin"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.8, 1) +texture_filter = 5 +text = "Label3D +(raster + +mipmaps)" +font = ExtResource("6_ewmy5") +font_size = 40 +outline_size = 9 + +[node name="MSDFMipmaps" type="Label3D" parent="Testers/Label3DFontTypes/AnimationOrigin"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.8, -1) +texture_filter = 5 +text = "Label3D +(MSDF + +mipmaps)" +font = ExtResource("5_syv27") +font_size = 40 +outline_size = 9 + +[node name="Label3DBillboardModes" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16) + +[node name="Disabled" type="Label3D" parent="Testers/Label3DBillboardModes"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.2, 1) +texture_filter = 5 +modulate = Color(0.996078, 1, 0.333333, 1) +text = "Disabled" +font_size = 48 +outline_size = 3 + +[node name="Enabled" type="Label3D" parent="Testers/Label3DBillboardModes"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.2, -1) +billboard = 1 +texture_filter = 5 +modulate = Color(0.0784314, 0, 0.588235, 1) +outline_modulate = Color(1, 1, 1, 0.301961) +text = "Enabled" +font_size = 48 +outline_size = 3 + +[node name="YBillboard" type="Label3D" parent="Testers/Label3DBillboardModes"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.7, 0) +billboard = 2 +texture_filter = 5 +modulate = Color(1, 0.313726, 0.454902, 1) +outline_modulate = Color(0.384314, 0.188235, 0.188235, 1) +text = "Y-Billboard" +font_size = 48 +outline_size = 3 + +[node name="Label3DDistanceFade" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -20) + +[node name="NoDistanceFade" type="Label3D" parent="Testers/Label3DDistanceFade"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.3, 1) +texture_filter = 5 +modulate = Color(1, 0.741176, 0.831373, 1) +text = "No +Distance Fade" +font_size = 40 +outline_size = 4 + +[node name="DistanceFade" type="Label3D" parent="Testers/Label3DDistanceFade"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.3, -1) +visibility_range_end = 5.0 +visibility_range_end_margin = 2.5 +visibility_range_fade_mode = 1 +texture_filter = 5 +modulate = Color(0.32549, 1, 0.858824, 1) +text = "With +Distance Fade" +font_size = 40 +outline_size = 4 + +[node name="NoDistanceFadeBillboard" type="Label3D" parent="Testers/Label3DDistanceFade"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.1, 1) +billboard = 1 +texture_filter = 5 +modulate = Color(1, 0.741176, 0.831373, 1) +text = "No +Distance Fade +(Billboard)" +font_size = 40 +outline_size = 4 + +[node name="DistanceFadeBillboard" type="Label3D" parent="Testers/Label3DDistanceFade"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.1, -1) +visibility_range_end = 5.0 +visibility_range_end_margin = 2.5 +visibility_range_fade_mode = 1 +billboard = 1 +texture_filter = 5 +modulate = Color(0.32549, 1, 0.858824, 1) +text = "With +Distance Fade +(Billboard)" +font_size = 40 +outline_size = 4 + +[node name="DistanceFadeFixedSize" type="Label3D" parent="Testers/Label3DDistanceFade"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.000778437, 0.50287, -1.90735e-05) +visibility_range_end = 5.0 +visibility_range_end_margin = 2.5 +visibility_range_fade_mode = 1 +pixel_size = 0.001 +billboard = 1 +fixed_size = true +texture_filter = 5 +modulate = Color(0.760784, 0.690196, 1, 1) +text = "With +Distance Fade +(Billboard + Fixed Size)" +font_size = 40 +outline_size = 4 + +[node name="Label3DDepthTest" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -24) + +[node name="WithDepthTest" type="Label3D" parent="Testers/Label3DDepthTest"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.5, 1) +texture_filter = 5 +modulate = Color(0.623529, 0.784314, 1, 1) +text = "With Depth Test" +font_size = 40 +outline_size = 4 + +[node name="NoDepthTest" type="Label3D" parent="Testers/Label3DDepthTest"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.5, -1) +no_depth_test = true +texture_filter = 5 +modulate = Color(1, 0.607843, 0.290196, 1) +text = "No Depth Test" +font_size = 40 +outline_size = 4 + +[node name="NoDepthTestXray" type="Label3D" parent="Testers/Label3DDepthTest"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1, -1) +no_depth_test = true +texture_filter = 5 +modulate = Color(1, 0.607843, 0.290196, 0.25098) +outline_modulate = Color(0, 0, 0, 0.25098) +text = "No Depth Test +(X-Ray with second Label3D)" +outline_size = 4 + +[node name="DepthTestXray" type="Label3D" parent="Testers/Label3DDepthTest"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1, -1) +texture_filter = 5 +modulate = Color(1, 0.607843, 0.290196, 1) +text = "No Depth Test +(X-Ray with second Label3D)" +outline_size = 4 + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Testers/Label3DDepthTest"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.9, 0.5, 0) +mesh = SubResource("SphereMesh_wsjfy") + +[node name="Label3DIcons" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -28) + +[node name="Monochrome" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0.4, 1) +cast_shadow = 1 +billboard = 1 +alpha_cut = 1 +texture_filter = 5 +outline_render_priority = 1 +text = "" +font = ExtResource("7_wvpht") +font_size = 128 +outline_size = 6 + +[node name="Monochrome2" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0.4, 0) +cast_shadow = 1 +billboard = 1 +alpha_cut = 1 +texture_filter = 5 +outline_render_priority = 1 +text = "" +font = ExtResource("7_wvpht") +font_size = 128 +outline_size = 6 + +[node name="Monochrome3" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0.4, -1) +cast_shadow = 1 +billboard = 1 +alpha_cut = 1 +texture_filter = 5 +outline_render_priority = 1 +text = "" +font = ExtResource("7_wvpht") +font_size = 128 +outline_size = 6 + +[node name="ColorBlue" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1.3, 0) +cast_shadow = 1 +double_sided = false +alpha_cut = 1 +texture_filter = 5 +modulate = Color(0.278431, 0.54902, 0.74902, 1) +text = "" +font = ExtResource("7_wvpht") +font_size = 96 + +[node name="ColorWhite" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0.001, 1.3, 0) +cast_shadow = 1 +double_sided = false +alpha_cut = 1 +texture_filter = 5 +text = "" +font = ExtResource("7_wvpht") +font_size = 96 + +[node name="ColorGray" type="Label3D" parent="Testers/Label3DIcons"] +transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0.002, 1.3, 0) +cast_shadow = 1 +double_sided = false +alpha_cut = 1 +texture_filter = 5 +modulate = Color(0.027451, 0.027451, 0.027451, 1) +text = "" +font = ExtResource("7_wvpht") +font_size = 96 + +[node name="Label3DHealthBar" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -32) +script = ExtResource("8_rvw0p") + +[node name="Name" type="Label3D" parent="Testers/Label3DHealthBar"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.4, 0) +extra_cull_margin = 1.0 +offset = Vector2(-160, 0) +billboard = 1 +texture_filter = 5 +text = "Example" +font = ExtResource("5_syv27") +outline_size = 4 +horizontal_alignment = 0 +width = 230.0 + +[node name="Health" type="Label3D" parent="Testers/Label3DHealthBar"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.4, 0) +extra_cull_margin = 1.0 +offset = Vector2(120, 0) +billboard = 1 +texture_filter = 5 +modulate = Color(0.8, 1, 0.4, 1) +outline_modulate = Color(0.15, 0.2, 0.15, 1) +text = "89%" +font = ExtResource("5_syv27") +outline_size = 4 + +[node name="HealthBarForeground" type="Label3D" parent="Testers/Label3DHealthBar"] +transform = Transform3D(-1.74846e-07, 0, 1, 0, 1, 0, -4, 0, -4.37114e-08, 0, 0.4, 0) +extra_cull_margin = 1.0 +offset = Vector2(-45, -35) +billboard = 1 +texture_filter = 5 +modulate = Color(0.8, 1, 0.4, 1) +outline_modulate = Color(0.15, 0.2, 0.15, 1) +text = "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" +font = SubResource("FontVariation_hue2h") +font_size = 16 +outline_size = 0 +horizontal_alignment = 0 + +[node name="HealthBarBackground" type="Label3D" parent="Testers/Label3DHealthBar"] +transform = Transform3D(-1.69382e-07, 0, 1, 0, 1, 0, -3.875, 0, -4.37114e-08, 0, 0.4, 0) +extra_cull_margin = 1.0 +offset = Vector2(0, -35) +billboard = 1 +texture_filter = 5 +render_priority = -1 +outline_render_priority = -2 +modulate = Color(0.15, 0.2, 0.15, 1) +outline_modulate = Color(0.15, 0.2, 0.15, 1) +text = "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" +font = SubResource("FontVariation_hue2h") +font_size = 16 +outline_size = 6 + +[node name="Name2" type="Label" parent="Testers/Label3DHealthBar"] +offset_left = 16.0 +offset_top = 16.0 +offset_right = 193.0 +offset_bottom = 47.0 +text = "Name" +vertical_alignment = 1 + +[node name="LineEdit" type="LineEdit" parent="Testers/Label3DHealthBar"] +offset_left = 88.0 +offset_top = 16.0 +offset_right = 236.0 +offset_bottom = 47.0 +text = "Example" +caret_blink = true + +[node name="TextMesh" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, -36) + +[node name="IconAudio" type="MeshInstance3D" parent="Testers/TextMesh"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.4, 0.5) +mesh = SubResource("TextMesh_xlu0q") +surface_material_override/0 = SubResource("StandardMaterial3D_ri5nw") + +[node name="IconSuccess" type="MeshInstance3D" parent="Testers/TextMesh"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 1.4, -0.5) +mesh = SubResource("TextMesh_u3elb") +surface_material_override/0 = SubResource("StandardMaterial3D_ri5nw") + +[node name="NoDepth" type="MeshInstance3D" parent="Testers/TextMesh"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.9, 0) +mesh = SubResource("TextMesh_u00sq") +surface_material_override/0 = SubResource("StandardMaterial3D_ri5nw") + +[node name="Text" type="MeshInstance3D" parent="Testers/TextMesh"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.5, 0) +mesh = SubResource("TextMesh_cf5wd") +surface_material_override/0 = SubResource("StandardMaterial3D_ri5nw") + +[node name="LowDetail" type="MeshInstance3D" parent="Testers/TextMesh"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.1, 0) +mesh = SubResource("TextMesh_0mhsg") +surface_material_override/0 = SubResource("StandardMaterial3D_ri5nw") + +[node name="TextMeshEffects" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, -40) + +[node name="AdditiveBlending" type="MeshInstance3D" parent="Testers/TextMeshEffects"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.1, 0) +mesh = SubResource("TextMesh_ddkjo") +surface_material_override/0 = SubResource("StandardMaterial3D_iyglb") + +[node name="Metallic" type="MeshInstance3D" parent="Testers/TextMeshEffects"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.5, 0) +mesh = SubResource("TextMesh_idsby") +surface_material_override/0 = SubResource("StandardMaterial3D_mdg0l") + +[node name="CurvatureShader" type="MeshInstance3D" parent="Testers/TextMeshEffects"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.9, 0) +mesh = SubResource("TextMesh_0sjgn") +surface_material_override/0 = SubResource("ShaderMaterial_iuh2c") + +[node name="TextMeshTexture" type="Node3D" parent="Testers"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, -44) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Testers/TextMeshTexture"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.1, 0) +mesh = SubResource("TextMesh_fqc7s") +surface_material_override/0 = SubResource("StandardMaterial3D_i3bnm") + +[node name="TestName" type="Label" parent="."] +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -192.0 +offset_top = -58.0 +offset_right = 192.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 0 +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) +theme_override_constants/outline_size = 7 +theme_override_font_sizes/font_size = 24 +horizontal_alignment = 1 + +[node name="Previous" type="Button" parent="."] +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_left = 24.0 +offset_top = -55.0 +offset_right = 135.0 +offset_bottom = -24.0 +grow_vertical = 0 +text = "« Previous" + +[node name="Next" type="Button" parent="."] +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -107.0 +offset_top = -55.0 +offset_right = -24.0 +offset_bottom = -24.0 +grow_horizontal = 0 +grow_vertical = 0 +text = "Next »" + +[connection signal="text_changed" from="Testers/Label3DHealthBar/LineEdit" to="Testers/Label3DHealthBar" method="_on_line_edit_text_changed"] +[connection signal="text_submitted" from="Testers/Label3DHealthBar/LineEdit" to="." method="_on_line_edit_text_submitted"] +[connection signal="pressed" from="Previous" to="." method="_on_previous_pressed"] +[connection signal="pressed" from="Next" to="." method="_on_next_pressed"] diff --git a/3d/labels_and_texts/README.md b/3d/labels_and_texts/README.md new file mode 100644 index 00000000..ac6a0015 --- /dev/null +++ b/3d/labels_and_texts/README.md @@ -0,0 +1,39 @@ +# 3D Labels and Texts + +This project showcases the two main 3D text techniques supported by Godot: +Label3D and TextMesh. + +Both Label3D and TextMesh exist in 3D space and can optionally be occluded by +other objects, but they serve different use cases. + +**Label3D:** The Label3D node is a 3D node like any other. It draws text using +one quad per character, which can optionally be set to work as a billboard. + +**TextMesh:** Unlike Label3D, TextMesh can optionally have actual depth since it +generates geometry to represent the text. TextMesh is not a node, but a +PrimitiveMesh resource you use within a MeshsInstance3D node. Therefore, you +won't see TextMesh in the Create New Node dialog. + +Icons can also be displayed in Label3D and TextMesh using icon fonts, which can +be generated from SVG files using serivces like +[Fontello](https://fontello.com/). Note that while Label3D supports colored +rasterized fonts (such as emoji), only monochrome fonts can be generated from +Fontello. TextMesh and Label3D with MSDF fonts are limited to monochrome fonts +too. + +Both standard rasterized and MSDF fonts can be used in Label3D, while TextMesh +will only support fonts that can be drawn as MSDF well. This excludes fonts that +have self-intersecting outlines, which Godot currently doesn't handle well when +converting them to MSDF. + +In most scenarios, Label3D is easier to use and can look better (thanks to +outlines and MSDF rendering). TextMesh is more powerful and is intended for more +specialized use cases. + +Language: GDScript + +Renderer: Vulkan Clustered + +## Screenshots + +![Screenshot](screenshots/3d_labels_and_texts.png) diff --git a/3d/labels_and_texts/curvature.gdshader b/3d/labels_and_texts/curvature.gdshader new file mode 100644 index 00000000..eee0dbf9 --- /dev/null +++ b/3d/labels_and_texts/curvature.gdshader @@ -0,0 +1,10 @@ +shader_type spatial; + +void vertex() { + VERTEX.z -= 0.6 - cos(VERTEX.x) * 0.6; + VERTEX.x *= 0.8 + cos(VERTEX.x) * 0.2; +} + +void fragment() { + ALBEDO = vec3(1.0, 0.6, 0.1); +} diff --git a/3d/labels_and_texts/default_env.tres b/3d/labels_and_texts/default_env.tres new file mode 100644 index 00000000..ddf6bb74 --- /dev/null +++ b/3d/labels_and_texts/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="Sky" id=1] + +[resource] +background_mode = 2 +sky = SubResource( 1 ) diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf new file mode 100644 index 00000000..031d6277 Binary files /dev/null and b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf differ diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf.import b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf.import new file mode 100644 index 00000000..6d7c3efb --- /dev/null +++ b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF-Mipmaps.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://ueofyxhwry0c" +path="res://.godot/imported/Xolonium-Regular-MSDF-Mipmaps.ttf-f9a30ae6846e38c4b1784d4a99043eef.fontdata" + +[deps] + +source_file="res://fonts/Xolonium-Regular-MSDF-Mipmaps.ttf" +dest_files=["res://.godot/imported/Xolonium-Regular-MSDF-Mipmaps.ttf-f9a30ae6846e38c4b1784d4a99043eef.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=true +multichannel_signed_distance_field=true +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf new file mode 100644 index 00000000..031d6277 Binary files /dev/null and b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf differ diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf.import b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf.import new file mode 100644 index 00000000..293c81a8 --- /dev/null +++ b/3d/labels_and_texts/fonts/Xolonium-Regular-MSDF.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://rv6to2i5stmy" +path="res://.godot/imported/Xolonium-Regular-MSDF.ttf-07982cfb47cf7a997ebff6be3d79b5d9.fontdata" + +[deps] + +source_file="res://fonts/Xolonium-Regular-MSDF.ttf" +dest_files=["res://.godot/imported/Xolonium-Regular-MSDF.ttf-07982cfb47cf7a997ebff6be3d79b5d9.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=true +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf b/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf new file mode 100644 index 00000000..031d6277 Binary files /dev/null and b/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf differ diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf.import b/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf.import new file mode 100644 index 00000000..db1c6d8b --- /dev/null +++ b/3d/labels_and_texts/fonts/Xolonium-Regular-Mipmaps.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://ceawygbjffpls" +path="res://.godot/imported/Xolonium-Regular-Mipmaps.ttf-ad14e01c6ec957f8c9fcd447a39103b1.fontdata" + +[deps] + +source_file="res://fonts/Xolonium-Regular-Mipmaps.ttf" +dest_files=["res://.godot/imported/Xolonium-Regular-Mipmaps.ttf-ad14e01c6ec957f8c9fcd447a39103b1.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular.ttf b/3d/labels_and_texts/fonts/Xolonium-Regular.ttf new file mode 100644 index 00000000..031d6277 Binary files /dev/null and b/3d/labels_and_texts/fonts/Xolonium-Regular.ttf differ diff --git a/3d/labels_and_texts/fonts/Xolonium-Regular.ttf.import b/3d/labels_and_texts/fonts/Xolonium-Regular.ttf.import new file mode 100644 index 00000000..397a38d0 --- /dev/null +++ b/3d/labels_and_texts/fonts/Xolonium-Regular.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cw4codbiaecjh" +path="res://.godot/imported/Xolonium-Regular.ttf-bc2981e3069cff4c34dd7c8e2bb73fba.fontdata" + +[deps] + +source_file="res://fonts/Xolonium-Regular.ttf" +dest_files=["res://.godot/imported/Xolonium-Regular.ttf-bc2981e3069cff4c34dd7c8e2bb73fba.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/3d/labels_and_texts/fonts/config.json b/3d/labels_and_texts/fonts/config.json new file mode 100644 index 00000000..0c05f6dd --- /dev/null +++ b/3d/labels_and_texts/fonts/config.json @@ -0,0 +1,122 @@ +{ + "name": "", + "css_prefix_text": "icon-", + "css_use_suffix": false, + "hinting": true, + "units_per_em": 1000, + "ascent": 850, + "glyphs": [ + { + "uid": "959d8ebe4e528fa3870e40b3bd6aab74", + "css": "icon_monochrome_light", + "code": 59392, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M407.8 75.1C366.4 84.3 325.5 97.1 287.1 116.4 288 150.3 290.2 182.8 294.6 215.8 279.7 225.4 264 233.5 250.1 244.7 235.9 255.6 221.5 266 208.7 278.8 183.1 261.8 156 245.9 128.1 231.9 98 264.3 69.9 299.2 46.9 338.3 64.9 366.7 84.3 395.1 102.2 417.4V610.5 635 657.4C102.7 657.4 103.1 657.4 103.6 657.4L250.7 671.6C258.4 672.4 264.4 678.6 265 686.3L269.5 751.2 397.9 760.4 406.7 700.5C407.9 692.7 414.5 686.9 422.4 686.9H577.6C585.5 686.9 592.1 692.7 593.3 700.5L602.1 760.4 730.5 751.2 735 686.3C735.6 678.6 741.6 672.4 749.3 671.6L896.4 657.4C896.8 657.4 897.3 657.4 897.7 657.4V638.2L897.8 638.2V417.4C918.5 391.3 938.1 362.5 953.1 338.3 930.2 299.2 902 264.3 871.9 231.9 844 245.9 816.9 261.8 791.3 278.8 778.5 266 764.1 255.6 749.9 244.7 736 233.5 720.3 225.4 705.4 215.8 709.8 182.8 712 150.3 712.9 116.4 674.5 97.1 633.6 84.3 592.2 75.1 575.6 102.9 560.5 133 547.3 162.4 531.7 159.8 516 158.8 500.3 158.6V158.6C500.2 158.6 500.1 158.6 500 158.6 499.9 158.6 499.8 158.6 499.7 158.6V158.6C484 158.8 468.3 159.8 452.7 162.4 439.5 133 424.4 102.9 407.8 75.1ZM291.4 426.2C340.4 426.2 380.1 465.8 380.1 514.8 380.1 563.8 340.4 603.5 291.4 603.5 242.5 603.5 202.8 563.8 202.8 514.8 202.8 465.8 242.5 426.2 291.4 426.2ZM708.6 426.2C757.5 426.2 797.2 465.8 797.2 514.8 797.2 563.8 757.5 603.5 708.6 603.5 659.6 603.5 619.9 563.8 619.9 514.8 619.9 465.8 659.6 426.2 708.6 426.2ZM500 478C515.8 478 528.6 489.7 528.6 504V585.6C528.6 599.9 515.8 611.5 500 611.5 484.2 611.5 471.5 599.9 471.5 585.6V504C471.5 489.7 484.2 478 500 478ZM765.7 701.9L761.1 767.2C760.6 775 754.3 781.3 746.5 781.9L589.7 793.1C589.3 793.1 589 793.1 588.6 793.1 580.8 793.1 574.1 787.4 572.9 779.6L563.9 718.6H436.1L427.1 779.6C425.9 787.8 418.5 793.7 410.3 793.1L253.5 781.9C245.7 781.3 239.4 775 238.9 767.2L234.3 701.9 102 689.1C102.1 703.3 102.2 718.9 102.2 722 102.2 861.8 279.5 928.9 499.7 929.7H500 500.3C720.5 928.9 897.7 861.8 897.7 722 897.7 718.9 897.9 703.3 898 689.1ZM358.8 520.1C358.8 552.6 332.4 578.9 299.9 578.9 267.4 578.9 241 552.6 241 520.1S267.4 461.2 299.9 461.2C332.4 461.2 358.8 487.6 358.8 520.1M641.3 520.1C641.3 552.6 667.6 578.9 700.1 578.9 732.6 578.9 758.9 552.6 758.9 520.1S732.6 461.2 700.1 461.2C667.6 461.2 641.3 487.6 641.3 520.1", + "width": 1000 + }, + "search": [ + "icon_monochrome_light" + ] + }, + { + "uid": "ecf70bd6187356af84cbe8540bab4f2b", + "css": "logo_large_monochrome_dark", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1377 370.4C1364.6 370.4 1354.3 376.1 1345.9 387.4 1337.6 398.7 1333.4 414.6 1333.4 435 1333.4 455.4 1337.4 471.1 1345.4 482 1353.3 493 1363.8 498.4 1376.8 498.4 1389.8 498.4 1400.3 492.9 1408.4 481.8 1416.5 470.8 1420.5 455 1420.5 434.4 1420.5 413.9 1416.4 398 1408 387 1399.7 375.9 1389.3 370.4 1377 370.4M1376.8 573.6C1340.7 573.6 1311.2 561.8 1288.5 538.1 1265.7 514.5 1254.4 480 1254.4 434.6 1254.4 389.2 1265.9 354.9 1288.9 331.5 1311.9 308.1 1341.6 296.4 1377.9 296.4 1414.3 296.4 1443.7 307.9 1466 330.9 1488.4 353.9 1499.6 388.8 1499.6 435.4 1499.6 482 1488.1 516.7 1465.3 539.5 1442.4 562.2 1412.9 573.6 1376.8 573.6M1607.6 373.1V488.4C1607.6 493.8 1608 497.2 1608.8 498.6 1609.6 500 1611.9 500.7 1615.7 500.7 1629.9 500.7 1640.6 495.5 1647.9 484.9 1655.3 474.4 1658.9 456.9 1658.9 432.3 1658.9 407.7 1655.1 391.7 1647.6 384.3 1640 376.9 1627.9 373.1 1611.5 373.1ZM1533.6 552V320.7C1533.6 314.3 1535.2 309.2 1538.4 305.4 1541.7 301.7 1545.8 299.8 1551 299.8H1615.4C1656.2 299.8 1687.3 310.1 1708.5 330.7 1729.7 351.3 1740.3 383.6 1740.3 427.9 1740.3 522.5 1699.9 569.7 1619.2 569.7H1553.3C1540.2 569.7 1533.6 563.8 1533.6 552M1888.3 370.4C1876 370.4 1865.6 376.1 1857.3 387.4 1848.9 398.7 1844.8 414.6 1844.8 435 1844.8 455.4 1848.7 471.1 1856.7 482 1864.7 493 1875.1 498.4 1888.1 498.4 1901.1 498.4 1911.6 492.9 1919.7 481.8 1927.8 470.8 1931.9 455 1931.9 434.4 1931.9 413.9 1927.7 398 1919.4 387 1911 375.9 1900.7 370.4 1888.3 370.4M1888.1 573.6C1852 573.6 1822.6 561.8 1799.8 538.1 1777.1 514.5 1765.7 480 1765.7 434.6 1765.7 389.2 1777.2 354.9 1800.2 331.5 1823.2 308.1 1852.9 296.4 1889.3 296.4 1925.7 296.4 1955 307.9 1977.4 330.9 1999.8 353.9 2010.9 388.8 2010.9 435.4 2010.9 482 1999.5 516.7 1976.6 539.5 1953.7 562.2 1924.2 573.6 1888.1 573.6M2154.6 563.6C2154.6 568.7 2141.9 571.3 2116.5 571.3 2091 571.3 2078.3 568.7 2078.3 563.6V370H2032C2027.6 370 2024.6 364.1 2022.8 352.3 2022 346.6 2021.6 340.9 2021.6 334.9 2021.6 329.1 2022 323.3 2022.8 317.6 2024.6 305.8 2027.6 299.8 2032 299.8H2199.7C2204.1 299.8 2207.2 305.8 2209 317.6 2209.8 323.3 2210.1 329.1 2210.1 334.9 2210.1 340.9 2209.8 346.6 2209 352.3 2207.2 364.1 2204.1 370 2199.7 370H2154.6ZM1186.2 426.6C1165.4 426.3 1141.7 430.6 1141.7 430.6V471.1H1165.6L1165.3 489.2C1165.3 495.9 1158.7 499.2 1145.4 499.2 1132.2 499.2 1120.5 493.6 1110.4 482.4 1100.2 471.2 1095.1 454.9 1095.1 433.3 1095.1 411.7 1100.1 395.7 1110 385.5 1119.8 375.2 1132.8 370 1148.7 370 1155.4 370 1162.3 371.1 1169.5 373.3 1176.7 375.5 1181.5 377.5 1184 379.5 1186.4 381.4 1188.8 382.4 1190.9 382.4 1193.1 382.4 1196.6 379.8 1201.5 374.7 1206.4 369.5 1210.8 361.7 1214.7 351.3 1218.5 340.9 1220.4 332.9 1220.4 327.2 1220.4 321.6 1220.3 317.7 1220.1 315.7 1214.7 309.8 1204.7 305.1 1190.2 301.6 1175.6 298.1 1159.4 296.4 1141.4 296.4 1101.8 296.4 1070.8 308.9 1048.5 333.8 1026.1 358.7 1014.9 391.1 1014.9 430.9 1014.9 477.7 1026.4 513.2 1049.2 537.4 1072.1 561.5 1102.2 573.6 1139.5 573.6 1159.5 573.6 1177.3 571.9 1192.9 568.4 1208.4 564.9 1218.8 561.4 1223.9 557.8L1225.4 437.1C1225.4 430.1 1206.9 426.9 1186.2 426.6M1104.9 731.4C1102.8 735.8 1098.9 739.8 1093.1 743.4 1087.4 747.1 1080.1 748.9 1071.3 748.9 1059.7 748.9 1050.3 745.2 1043.2 737.8 1036.1 730.4 1032.5 719.8 1032.5 706V671.4C1032.5 657.9 1035.9 647.5 1042.6 640.2 1049.3 633 1058.3 629.4 1069.5 629.4 1080.4 629.4 1088.9 632.2 1094.9 637.9 1100.9 643.7 1104.1 651.7 1104.3 661.9L1104.2 662.3H1095.3C1094.9 654.5 1092.7 648.5 1088.4 644.2 1084.1 640 1077.8 637.8 1069.5 637.8 1061 637.8 1054.3 640.7 1049.4 646.4 1044.6 652.1 1042.1 660.4 1042.1 671.3V706.1C1042.1 717.4 1044.8 726 1050 731.9 1055.3 737.8 1062.4 740.8 1071.3 740.8 1077.8 740.8 1083.1 739.6 1087 737.2 1091 734.9 1093.7 732 1095.3 728.7V698.4H1071.1V690H1104.9ZM1149.2 740.3C1154.5 740.3 1159.2 738.8 1163.4 735.7 1167.5 732.6 1170.4 728.7 1172.1 724V705.3H1156.8C1150.2 705.3 1145 707.2 1141.1 710.9 1137.2 714.6 1135.2 719.1 1135.2 724.6 1135.2 729.2 1136.5 733 1138.9 735.9 1141.4 738.8 1144.8 740.3 1149.2 740.3M1173.5 747.2C1173.1 744.2 1172.7 741.8 1172.4 739.9 1172.2 738 1172.1 736 1172.1 734.1 1169.5 738.4 1166.1 741.9 1161.9 744.7 1157.8 747.5 1153.1 748.9 1148 748.9 1140.9 748.9 1135.4 746.7 1131.5 742.3 1127.6 737.8 1125.7 731.8 1125.7 724.2 1125.7 716.2 1128.5 709.8 1134.1 705 1139.7 700.3 1147.4 697.9 1157 697.9H1172.1V687.3C1172.1 681.2 1170.5 676.4 1167.5 672.9 1164.4 669.5 1160.1 667.8 1154.5 667.8 1149.4 667.8 1145.1 669.4 1141.8 672.7 1138.5 676 1136.8 680 1136.8 684.8L1127.9 684.7 1127.7 684.3C1127.5 677.8 1129.9 672 1135.1 666.9 1140.3 661.8 1146.9 659.3 1155 659.3 1163 659.3 1169.4 661.7 1174.3 666.6 1179.2 671.5 1181.7 678.4 1181.7 687.5V729.8C1181.7 732.9 1181.8 735.9 1182.1 738.8 1182.4 741.7 1182.8 744.4 1183.5 747.2ZM1211.7 660.9L1212.6 674.3C1214.8 669.5 1217.9 665.8 1221.6 663.2 1225.4 660.6 1229.9 659.3 1235 659.3 1240.2 659.3 1244.6 660.8 1248.1 663.9 1251.7 667 1254.3 671.6 1256 677.8 1258.1 672.1 1261.1 667.5 1265 664.2 1268.9 660.9 1273.7 659.3 1279.2 659.3 1286.7 659.3 1292.6 662.4 1296.8 668.5 1300.9 674.6 1303 684.1 1303 696.8V747.2H1293.4V696.6C1293.4 686 1291.9 678.6 1289.1 674.3 1286.2 670 1282.1 667.9 1276.8 667.9 1271.2 667.9 1266.8 670.2 1263.7 675 1260.6 679.8 1258.6 685.8 1257.9 693V695.3 747.2H1248.4V696.7C1248.4 686.4 1246.9 679 1243.9 674.5 1241 670.1 1236.9 667.9 1231.6 667.9 1226.6 667.9 1222.5 669.5 1219.5 672.5 1216.4 675.6 1214.2 679.8 1212.9 685.1V747.2H1203.3V660.9ZM1350.9 667.8C1344.9 667.8 1340 670.5 1336.1 676 1332.2 681.4 1330.2 688.2 1330.1 696.3H1369.9V692.6C1369.9 685.4 1368.2 679.5 1364.9 674.8 1361.5 670.1 1356.9 667.8 1350.9 667.8M1352.3 748.9C1343 748.9 1335.4 745.4 1329.4 738.4 1323.5 731.4 1320.6 722.5 1320.6 711.6V697.3C1320.6 686.4 1323.6 677.3 1329.5 670.1 1335.4 662.9 1342.6 659.3 1350.9 659.3 1360 659.3 1367 662.5 1372 668.9 1377 675.4 1379.5 684 1379.5 694.9V704.4H1330.1V711.6C1330.1 719.9 1332.1 726.9 1336.1 732.4 1340.1 738 1345.5 740.8 1352.3 740.8 1357 740.8 1361.1 739.9 1364.5 738.3 1367.9 736.6 1370.9 734.3 1373.3 731.2L1377.3 738C1374.6 741.3 1371.3 743.9 1367.1 745.9 1363 747.9 1358.1 748.9 1352.3 748.9M1457.4 667.8C1451.3 667.8 1446.4 670.5 1442.5 676 1438.7 681.4 1436.7 688.2 1436.5 696.3H1476.4V692.6C1476.4 685.4 1474.7 679.5 1471.3 674.8 1468 670.1 1463.3 667.8 1457.4 667.8M1458.7 748.9C1449.4 748.9 1441.8 745.4 1435.9 738.4 1430 731.4 1427 722.5 1427 711.6V697.3C1427 686.4 1430 677.3 1435.9 670.1 1441.9 662.9 1449 659.3 1457.4 659.3 1466.4 659.3 1473.4 662.5 1478.4 668.9 1483.4 675.4 1485.9 684 1485.9 694.9V704.4H1436.5V711.6C1436.5 719.9 1438.5 726.9 1442.5 732.4 1446.5 738 1451.9 740.8 1458.7 740.8 1463.5 740.8 1467.5 739.9 1471 738.3 1474.4 736.6 1477.3 734.3 1479.8 731.2L1483.7 738C1481.1 741.3 1477.7 743.9 1473.6 745.9 1469.5 747.9 1464.5 748.9 1458.7 748.9M1511.2 660.9L1512 675.2C1514.3 670.1 1517.3 666.2 1521.2 663.4 1525 660.7 1529.4 659.3 1534.5 659.3 1542.2 659.3 1548.2 662.2 1552.3 667.9 1556.4 673.6 1558.5 682.5 1558.5 694.6V747.2H1548.8V694.7C1548.8 684.8 1547.4 677.9 1544.5 673.9 1541.6 669.9 1537.4 667.9 1532 667.9 1527.1 667.9 1523 669.5 1519.7 672.8 1516.4 676 1513.9 680.2 1512.3 685.6V747.2H1502.7V660.9ZM1586.6 711.6C1586.6 720.4 1588.2 727.4 1591.6 732.5 1594.9 737.8 1600 740.3 1606.7 740.3 1611.4 740.3 1615.3 739.1 1618.5 736.6 1621.7 734.1 1624.2 730.5 1626 726.1V683.3C1624.2 678.7 1621.8 675 1618.7 672.2 1615.6 669.3 1611.6 667.9 1606.9 667.9 1600.2 667.9 1595.1 670.9 1591.7 676.8 1588.3 682.7 1586.6 690.4 1586.6 699.8ZM1576.9 699.8C1576.9 687.6 1579.4 677.8 1584.3 670.4 1589.2 663 1596.1 659.3 1604.8 659.3 1609.7 659.3 1613.9 660.5 1617.6 662.9 1621.2 665.2 1624.2 668.6 1626.6 672.9L1627.6 660.9H1635.7V747.3C1635.7 758.4 1633.1 766.9 1628 773 1622.8 779 1615.5 782.1 1606 782.1 1602.6 782.1 1599 781.6 1595 780.5 1591.1 779.5 1587.7 778.1 1584.6 776.4L1587.3 768C1589.9 769.7 1592.8 771 1596 771.9 1599.2 772.9 1602.4 773.3 1605.9 773.3 1612.7 773.3 1617.8 771.1 1621.1 766.7 1624.4 762.3 1626 755.8 1626 747.3V736.9C1623.6 740.8 1620.6 743.7 1617 745.8 1613.5 747.9 1609.3 748.9 1604.7 748.9 1596 748.9 1589.2 745.5 1584.3 738.7 1579.4 731.9 1576.9 722.9 1576.9 711.6ZM1667.9 747.2H1658.3V660.9H1667.9ZM1667.9 636.3H1658.3V622.7H1667.9ZM1699.1 660.9L1699.9 675.2C1702.2 670.1 1705.3 666.2 1709.1 663.4 1712.9 660.7 1717.3 659.3 1722.4 659.3 1730.2 659.3 1736.1 662.2 1740.2 667.9 1744.3 673.6 1746.4 682.5 1746.4 694.6V747.2H1736.7V694.7C1736.7 684.8 1735.3 677.9 1732.4 673.9 1729.5 669.9 1725.4 667.9 1719.9 667.9 1715 667.9 1710.9 669.5 1707.6 672.8 1704.3 676 1701.8 680.2 1700.2 685.6V747.2H1690.6V660.9ZM1794.4 667.8C1788.4 667.8 1783.5 670.5 1779.6 676 1775.8 681.4 1773.7 688.2 1773.6 696.3H1813.4V692.6C1813.4 685.4 1811.7 679.5 1808.4 674.8 1805 670.1 1800.4 667.8 1794.4 667.8M1795.8 748.9C1786.4 748.9 1778.8 745.4 1773 738.4 1767.1 731.4 1764.1 722.5 1764.1 711.6V697.3C1764.1 686.4 1767.1 677.3 1773 670.1 1778.9 662.9 1786.1 659.3 1794.4 659.3 1803.4 659.3 1810.5 662.5 1815.5 668.9 1820.5 675.4 1823 684 1823 694.9V704.4H1773.6V711.6C1773.6 719.9 1775.6 726.9 1779.6 732.4 1783.6 738 1789 740.8 1795.8 740.8 1800.5 740.8 1804.6 739.9 1808 738.3 1811.5 736.6 1814.4 734.3 1816.8 731.2L1820.8 738C1818.1 741.3 1814.8 743.9 1810.6 745.9 1806.5 747.9 1801.6 748.9 1795.8 748.9M411.9 110.8C377.2 118.6 342.7 129.3 310.5 145.6 311.2 174.1 313.1 201.4 316.8 229.1 304.3 237.1 291.1 244 279.4 253.4 267.5 262.5 255.4 271.3 244.6 282 223.1 267.7 200.4 254.4 176.9 242.6 151.6 269.8 128 299.1 108.7 332 123.9 355.8 140.1 379.7 155.2 398.4V560.7 581.3 600C155.6 600 156 600.1 156.3 600.1L279.9 612C286.4 612.6 291.5 617.8 291.9 624.3L295.7 678.9 403.6 686.6 411 636.2C412 629.7 417.6 624.9 424.2 624.9H554.6C561.2 624.9 566.8 629.7 567.7 636.2L575.2 686.6 683 678.9 686.8 624.3C687.3 617.8 692.3 612.6 698.8 612L822.4 600.1C822.7 600.1 823.1 600 823.5 600V583.9L823.5 583.9V398.4C840.9 376.5 857.4 352.3 870 332 850.7 299.1 827.1 269.8 801.8 242.6 778.4 254.4 755.6 267.7 734.1 282 723.3 271.3 711.2 262.5 699.3 253.4 687.6 244 674.4 237.1 661.9 229.1 665.7 201.4 667.5 174.1 668.2 145.6 636 129.3 601.6 118.6 566.8 110.8 552.9 134.2 540.2 159.5 529.1 184.2 516 182 502.8 181.2 489.6 181V181C489.5 181 489.4 181 489.4 181 489.3 181 489.2 181 489.1 181V181C475.9 181.2 462.7 182 449.6 184.2 438.5 159.5 425.8 134.2 411.9 110.8ZM314.1 405.8C355.3 405.8 388.6 439.1 388.6 480.3 388.6 521.4 355.3 554.8 314.1 554.8 273 554.8 239.7 521.4 239.7 480.3 239.7 439.1 273 405.8 314.1 405.8ZM664.6 405.8C705.7 405.8 739.1 439.1 739.1 480.3 739.1 521.4 705.7 554.8 664.6 554.8 623.4 554.8 590.1 521.4 590.1 480.3 590.1 439.1 623.4 405.8 664.6 405.8ZM489.4 449.4C502.6 449.4 513.4 459.1 513.4 471.2V539.7C513.4 551.8 502.6 561.5 489.4 561.5S465.4 551.8 465.4 539.7V471.2C465.4 459.1 476.1 449.4 489.4 449.4ZM712.6 637.4L708.7 692.3C708.3 698.9 703 704.2 696.4 704.6L564.7 714C564.4 714 564.1 714.1 563.8 714.1 557.2 714.1 551.6 709.3 550.6 702.7L543.1 651.5H435.6L428.1 702.7C427.1 709.6 420.9 714.5 414 714L282.3 704.6C275.7 704.2 270.4 698.9 270 692.3L266.2 637.4 155 626.7C155.1 638.7 155.2 651.7 155.2 654.3 155.2 771.7 304.1 828.2 489.1 828.8H489.4 489.6C674.6 828.2 823.5 771.7 823.5 654.3 823.5 651.7 823.6 638.7 823.7 626.7ZM370.7 484.7C370.7 512 348.6 534.1 321.3 534.1 294 534.1 271.8 512 271.8 484.7S294 435.2 321.3 435.2C348.6 435.2 370.7 457.4 370.7 484.7M608 484.7C608 512 630.1 534.1 657.4 534.1 684.8 534.1 706.9 512 706.9 484.7S684.8 435.2 657.4 435.2C630.1 435.2 608 457.4 608 484.7", + "width": 2473 + }, + "search": [ + "logo_large_monochrome_dark" + ] + }, + { + "uid": "3a164e5ba7def42e5af0946d1079304e", + "css": "snapgrid", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M125 0V125H0V187.5H125V437.5H0V500H125V750H0V812.5H125V937.5H187.5V812.5H375V750H187.5V500H437.5L500 437.5V187.5H750V375H812.5V187.5H937.5V125H812.5V0H750V125H500V0H437.5V125H187.5V0ZM187.5 187.5H437.5V437.5H187.5ZM437.5 812.5V937.5H562.5V812.5ZM812.5 812.5V937.5H937.5V812.5ZM687.5 437.5A250 250 0 0 0 437.5 687.5V812.5H562.5V687.5A125 125 0 0 1 687.5 562.5 125 125 0 0 1 812.5 687.5V812.5H937.5V687.5A250 250 0 0 0 687.5 437.5Z", + "width": 1000 + }, + "search": [ + "snapgrid" + ] + }, + { + "uid": "816ca3af916e032fd1eb82bdea2fa06f", + "css": "statussuccess", + "code": 59396, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 62.5C258.4 62.5 62.5 258.4 62.5 500S258.4 937.5 500 937.5 937.5 741.6 937.5 500 741.6 62.5 500 62.5ZM705.8 304.8L794.2 393.2 437.5 750 205.8 518.2 294.2 429.8 437.5 573.1Z", + "width": 1000 + }, + "search": [ + "statussuccess" + ] + }, + { + "uid": "f8db52fb129b7132b91d3ed9275ed2cb", + "css": "audiostreamwav", + "code": 59400, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M748.2 62.6C743 62.8 737.8 63.5 732.8 64.9L295.3 189.9C268.5 197.6 250 222.1 250 250V596.9C239.7 594.8 229.3 593.8 218.8 593.8 132.5 593.8 62.5 663.7 62.5 750 62.5 836.3 132.5 906.3 218.8 906.3 302.9 906.2 371.8 839.5 374.8 755.5 374.9 753.7 375 751.8 375 750V297.2L687.5 208V406.3L812.5 343.8V125C812.5 89.8 783.4 61.6 748.2 62.6ZM656.3 500C639 500 625 513.9 625 531.3V843.8C625 861.1 639 875 656.3 875S687.5 861.1 687.5 843.8V531.3C687.5 513.9 673.6 500 656.3 500ZM781.3 562.5C764 562.5 750 576.4 750 593.8V781.3C750 798.6 764 812.5 781.3 812.5S812.5 798.6 812.5 781.3V593.8C812.5 576.4 798.6 562.5 781.3 562.5ZM531.3 625C514 625 500 638.9 500 656.3V718.8C500 736.1 514 750 531.3 750S562.5 736.1 562.5 718.8V656.3C562.5 638.9 548.6 625 531.3 625ZM906.3 625C889 625 875 638.9 875 656.3V718.8C875 736.1 889 750 906.3 750S937.5 736.1 937.5 718.8V656.3C937.5 638.9 923.6 625 906.3 625Z", + "width": 1000 + }, + "search": [ + "audiostreamwav" + ] + }, + { + "uid": "5185d1b48390de5633d96cff34f51a33", + "css": "icon_gray", + "code": 59401, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M344.1 511.3C344.1 547.1 315.1 576.2 279.2 576.2 243.3 576.2 214.2 547.1 214.2 511.3 214.2 475.4 243.3 446.3 279.2 446.3 315.1 446.3 344.1 475.4 344.1 511.3M655.8 511.3C655.8 547.1 684.9 576.2 720.8 576.2 756.6 576.2 785.7 547.1 785.7 511.3 785.7 475.4 756.6 446.3 720.8 446.3 684.9 446.3 655.8 475.4 655.8 511.3", + "width": 1000 + }, + "search": [ + "icon_gray" + ] + }, + { + "uid": "17cf6a56adb9fe41facff411151e0343", + "css": "icon_white", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M938.8 662.8C938.8 662.8 937.4 653.8 936.5 653.9L774.2 669.6C761.3 670.8 751.3 681.1 750.4 694.1L745.9 758 620.3 766.9 611.8 709C609.9 696.1 598.7 686.4 585.6 686.4H414.3C401.3 686.4 390.1 696.1 388.2 709L379.6 766.9 254.1 758 249.6 694.1C248.7 681.1 238.7 670.8 225.8 669.6L63.4 653.9C62.6 653.8 61.9 662.8 61.1 662.8L60.9 697.9 198.4 720.1 202.9 784.6C203.8 797.6 214.3 808.2 227.4 809.1L400.3 821.4C401 821.5 401.6 821.5 402.3 821.5 415.3 821.5 426.5 811.8 428.4 798.9L437.2 739.3H562.8L571.6 798.9C573.5 811.8 584.7 821.5 597.7 821.5 598.4 821.5 599 821.5 599.6 821.4L772.6 809.1C785.6 808.2 796.2 797.6 797.1 784.5L801.6 720.1 939 697.8ZM367.7 505.4C367.7 559.5 323.9 603.3 269.8 603.3 215.8 603.3 172 559.5 172 505.4 172 451.4 215.8 407.7 269.8 407.7 323.9 407.7 367.7 451.4 367.7 505.4M500 612.2C482.6 612.2 468.5 599.4 468.5 583.6V493.5C468.5 477.7 482.6 464.9 500 464.9 517.4 464.9 531.5 477.7 531.5 493.5V583.6C531.5 599.4 517.4 612.2 500 612.2M632.3 505.4C632.3 559.5 676.1 603.3 730.2 603.3 784.2 603.3 828 559.5 828 505.4 828 451.4 784.2 407.7 730.2 407.7 676.1 407.7 632.3 451.4 632.3 505.4", + "width": 1000 + }, + "search": [ + "icon_white" + ] + }, + { + "uid": "0d68b4247cac7d777fef2901e66380ba", + "css": "icon_blue", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M61.1 398V662.8C61.6 662.8 62.1 662.8 62.5 662.8L224.9 678.5C233.4 679.3 240.1 686.2 240.7 694.7L245.7 766.4 387.3 776.5 397 710.3C398.3 701.7 405.7 695.4 414.3 695.4H585.6C594.3 695.4 601.7 701.7 602.9 710.3L612.7 776.5 754.3 766.4 759.3 694.7C759.9 686.2 766.6 679.3 775.1 678.5L937.4 662.8C937.8 662.8 938.3 662.8 938.8 662.8V641.6L938.9 641.6V398H939.5C961 370.5 980.9 341.6 1000 310.7 974.6 267.6 943.6 229 910.4 193.3 879.6 208.8 849.7 226.3 821.4 245 807.3 231 791.4 219.5 775.7 207.5 760.4 195.1 743.1 186.1 726.6 175.5 731.5 139.1 734 103.3 734.9 65.9 692.6 44.5 647.4 30.4 601.7 20.3 583.4 50.9 566.7 84.1 552.2 116.6 535 113.7 517.7 112.6 500.3 112.4V112.4C500.2 112.4 500.1 112.4 500 112.4 499.9 112.4 499.8 112.4 499.7 112.4V112.4C482.3 112.6 465 113.7 447.8 116.6 433.2 84.1 416.6 50.9 398.3 20.3 352.6 30.4 307.4 44.5 265.1 65.9 266 103.3 268.4 139.1 273.3 175.5 256.9 186.1 239.6 195.1 224.2 207.5 208.6 219.5 192.7 231 178.5 245 150.3 226.3 120.4 208.8 89.6 193.3 56.4 229 25.4 267.6 0 310.7 19.1 341.6 39 370.5 60.5 398ZM793.2 711.9L788.1 783.9C787.5 792.6 780.6 799.5 771.9 800.1L599 812.5C598.6 812.5 598.2 812.5 597.7 812.5 589.1 812.5 581.7 806.2 580.5 797.6L570.5 730.3H429.4L419.5 797.6C418.2 806.6 410.1 813.2 401 812.5L228 800.1C219.4 799.5 212.4 792.6 211.8 783.9L206.8 711.9 60.8 697.8C60.9 713.5 61.1 730.7 61.1 734.1 61.1 888.3 256.7 962.4 499.7 963.2H500.3C743.3 962.4 938.8 888.3 938.8 734.1 938.8 730.6 939 713.5 939.1 697.8Z", + "width": 1000 + }, + "search": [ + "icon_blue" + ] + } + ] +} diff --git a/3d/labels_and_texts/fonts/fontello-godot.woff2 b/3d/labels_and_texts/fonts/fontello-godot.woff2 new file mode 100644 index 00000000..536bd664 Binary files /dev/null and b/3d/labels_and_texts/fonts/fontello-godot.woff2 differ diff --git a/3d/labels_and_texts/fonts/fontello-godot.woff2.import b/3d/labels_and_texts/fonts/fontello-godot.woff2.import new file mode 100644 index 00000000..41e4410d --- /dev/null +++ b/3d/labels_and_texts/fonts/fontello-godot.woff2.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cb35jtyk02goi" +path="res://.godot/imported/fontello-godot.woff2-b335626e1a658a7c7c74969daeb4c6c1.fontdata" + +[deps] + +source_file="res://fonts/fontello-godot.woff2" +dest_files=["res://.godot/imported/fontello-godot.woff2-b335626e1a658a7c7c74969daeb4c6c1.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/3d/labels_and_texts/icon.png b/3d/labels_and_texts/icon.png new file mode 100644 index 00000000..3a0a31b3 Binary files /dev/null and b/3d/labels_and_texts/icon.png differ diff --git a/3d/labels_and_texts/icon.png.import b/3d/labels_and_texts/icon.png.import new file mode 100644 index 00000000..732437de --- /dev/null +++ b/3d/labels_and_texts/icon.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8c1xtc7yj6s5" +path.s3tc="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex" +path.etc2="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex" +metadata={ +"imported_formats": ["s3tc", "etc2"], +"vram_texture": true +} + +[deps] + +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex", "res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex"] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/3d/labels_and_texts/label_3d_layout.gd b/3d/labels_and_texts/label_3d_layout.gd new file mode 100644 index 00000000..f0fa0bd3 --- /dev/null +++ b/3d/labels_and_texts/label_3d_layout.gd @@ -0,0 +1,68 @@ +# Layout is simulated by adjusting Label3Ds' `offset` properties. +# This can be done in the inspector, or via code with the help of `Font.get_string_size()`. +# For proper billboard behavior, Label3D's `offset` property +# must be adjusted instead of adjusting the `position` property. +extends Node3D + +var health = 0 +var counter = 0.0 + +# The margin to apply between the name and health percentage (in pixels). +const HEALTH_MARGIN = 25 + +# The health bar width (in number of characters). +# Higher can be more precise, at the cost of lower performance +# (since more characters may need to be rendered at once). +const BAR_WIDTH = 100 + + +func _ready(): + $LineEdit.text = $Name.text + + +func _process(delta): + # Animate the health percentage. + counter += delta + set_health(50 + sin(counter * 0.5) * 50) + + +func set_health(p_health): + health = p_health + + $Health.text = "%d%%" % round(health) + if health <= 30: + # Low health alert. + $Health.modulate = Color(1, 0.2, 0.1) + $Health.outline_modulate = Color(0.2, 0.1, 0.0) + $HealthBarForeground.modulate = Color(1, 0.2, 0.1) + $HealthBarForeground.outline_modulate = Color(0.2, 0.1, 0.0) + $HealthBarBackground.outline_modulate = Color(0.2, 0.1, 0.0) + $HealthBarBackground.modulate = Color(0.2, 0.1, 0.0) + else: + $Health.modulate = Color(0.8, 1, 0.4) + $Health.outline_modulate = Color(0.15, 0.2, 0.15) + $HealthBarForeground.modulate = Color(0.8, 1, 0.4) + $HealthBarForeground.outline_modulate = Color(0.15, 0.2, 0.15) + $HealthBarBackground.outline_modulate = Color(0.15, 0.2, 0.15) + $HealthBarBackground.modulate = Color(0.15, 0.2, 0.15) + + # Construct an health bar with `|` symbols brought very close to each other using + # a custom FontVariation on the HealthBarForeground and HealthBarBackground nodes. + var bar_text = "" + var bar_text_bg = "" + for i in round((health / 100.0) * BAR_WIDTH): + bar_text += "|" + for i in BAR_WIDTH: + bar_text_bg += "|" + + $HealthBarForeground.text = str(bar_text) + $HealthBarBackground.text = str(bar_text_bg) + + +func _on_line_edit_text_changed(new_text): + $Name.text = new_text + + # Adjust name's font size to fit within the allowed width. + $Name.font_size = 32 + while $Name.font.get_string_size($Name.text, $Name.horizontal_alignment, -1, $Name.font_size).x > $Name.width: + $Name.font_size -= 1 diff --git a/3d/labels_and_texts/project.godot b/3d/labels_and_texts/project.godot new file mode 100644 index 00000000..7cb46463 --- /dev/null +++ b/3d/labels_and_texts/project.godot @@ -0,0 +1,36 @@ +; 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=5 + +_global_script_classes=[] +_global_script_class_icons={} + +[application] + +config/name="3D Labels and Texts" +config/description="This project showcases 2 ways to draw text in 3D space: the Label3D node, and MeshInstance3D with a TextMesh primitive." +run/main_scene="res://3d_labels_and_texts.tscn" +config/features=PackedStringArray("4.0") +config/icon="res://icon.png" + +[display] + +window/stretch/mode="canvas_items" +window/stretch/aspect="expand" + +[gui] + +theme/default_font_multichannel_signed_distance_field=true +theme/default_font_generate_mipmaps=true + +[rendering] + +textures/default_filters/anisotropic_filtering_level=4 +quality/screen_filters/msaa=3 +environment/default_environment="res://default_env.tres" diff --git a/3d/labels_and_texts/screenshots/.gdignore b/3d/labels_and_texts/screenshots/.gdignore new file mode 100644 index 00000000..e69de29b diff --git a/3d/labels_and_texts/screenshots/3d_labels_and_texts.png b/3d/labels_and_texts/screenshots/3d_labels_and_texts.png new file mode 100644 index 00000000..cc168446 Binary files /dev/null and b/3d/labels_and_texts/screenshots/3d_labels_and_texts.png differ diff --git a/3d/labels_and_texts/textures/checker.LICENSE.md b/3d/labels_and_texts/textures/checker.LICENSE.md new file mode 100644 index 00000000..a7a1e0be --- /dev/null +++ b/3d/labels_and_texts/textures/checker.LICENSE.md @@ -0,0 +1,7 @@ +# License for `checker.png` + +Copyright (c) 2020 Kenney + +Licensed under CC0 1.0 Universal. + +Downloaded from https://kenney.nl/assets/prototype-textures diff --git a/3d/labels_and_texts/textures/checker.png b/3d/labels_and_texts/textures/checker.png new file mode 100644 index 00000000..46b3bf28 Binary files /dev/null and b/3d/labels_and_texts/textures/checker.png differ diff --git a/3d/labels_and_texts/textures/checker.png.import b/3d/labels_and_texts/textures/checker.png.import new file mode 100644 index 00000000..298de04e --- /dev/null +++ b/3d/labels_and_texts/textures/checker.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://chjqieyps5n5r" +path.s3tc="res://.godot/imported/checker.png-d334a8ae07de292fd4162f184b9dd7bc.s3tc.ctex" +path.etc2="res://.godot/imported/checker.png-d334a8ae07de292fd4162f184b9dd7bc.etc2.ctex" +metadata={ +"imported_formats": ["s3tc", "etc2"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/checker.png" +dest_files=["res://.godot/imported/checker.png-d334a8ae07de292fd4162f184b9dd7bc.s3tc.ctex", "res://.godot/imported/checker.png-d334a8ae07de292fd4162f184b9dd7bc.etc2.ctex"] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/3d/labels_and_texts/textures/textmesh_texture.LICENSE.md b/3d/labels_and_texts/textures/textmesh_texture.LICENSE.md new file mode 100644 index 00000000..939caf1e --- /dev/null +++ b/3d/labels_and_texts/textures/textmesh_texture.LICENSE.md @@ -0,0 +1,7 @@ +# License for `textmesh_texture.png` + +Copyright (c) 2022 bruvzg + +Licensed under CC0 1.0 Universal. + +Downloaded from the test project linked in https://github.com/godotengine/godot/pull/60507 diff --git a/3d/labels_and_texts/textures/textmesh_texture.png b/3d/labels_and_texts/textures/textmesh_texture.png new file mode 100644 index 00000000..a46d1d88 Binary files /dev/null and b/3d/labels_and_texts/textures/textmesh_texture.png differ diff --git a/3d/labels_and_texts/textures/textmesh_texture.png.import b/3d/labels_and_texts/textures/textmesh_texture.png.import new file mode 100644 index 00000000..2e9adfae --- /dev/null +++ b/3d/labels_and_texts/textures/textmesh_texture.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpgdsvb3lfg6l" +path="res://.godot/imported/textmesh_texture.png-8e64edd3f229f551dcbd8de816e37b7d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/textmesh_texture.png" +dest_files=["res://.godot/imported/textmesh_texture.png-8e64edd3f229f551dcbd8de816e37b7d.ctex"] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0