diff --git a/app/content/main.tscn b/app/content/main.tscn index 18fcdf6..0d24577 100644 --- a/app/content/main.tscn +++ b/app/content/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=3 uid="uid://eecv28y6jxk4"] +[gd_scene load_steps=18 format=3 uid="uid://eecv28y6jxk4"] [ext_resource type="PackedScene" uid="uid://clc5dre31iskm" path="res://addons/godot-xr-tools/xr/start_xr.tscn" id="1_i4c04"] [ext_resource type="Script" path="res://content/main.gd" id="1_uvrd4"] @@ -12,6 +12,7 @@ [ext_resource type="PackedScene" uid="uid://lrehk38exd5n" path="res://content/system/keyboard/keyboard.tscn" id="9_e5n3p"] [ext_resource type="PackedScene" uid="uid://cbemihbxkd4ll" path="res://content/system/house/house.tscn" id="9_np6mw"] [ext_resource type="PackedScene" uid="uid://bhyddd1f0ry1x" path="res://content/ui/onboarding/onboarding.tscn" id="12_uq2nj"] +[ext_resource type="PackedScene" uid="uid://cwvykoymlrrel" path="res://content/ui/components/line_chart/line_chart.tscn" id="13_iw50x"] [sub_resource type="Sky" id="Sky_vhymk"] sky_material = ExtResource("5_wgwf8") @@ -36,7 +37,7 @@ material = SubResource("StandardMaterial3D_m58yb") size = Vector3(0.01, 0.01, 0.01) [node name="Main" type="Node3D"] -transform = Transform3D(1, -0.000296142, 0.000270963, 0.000296143, 1, -4.61078e-06, -0.000270962, 4.67014e-06, 1, 0, 0, 0) +transform = Transform3D(1, -0.000296142, 0.000270963, 0.000296143, 1, -4.5899e-06, -0.000270962, 4.67014e-06, 1, 0, 0, 0) script = ExtResource("1_uvrd4") [node name="WorldEnvironment" type="WorldEnvironment" parent="."] @@ -87,4 +88,7 @@ transform = Transform3D(0.499999, -0.000139169, -6.50204e-05, 5.24307e-05, 0.353 [node name="Onboarding" parent="." instance=ExtResource("12_uq2nj")] transform = Transform3D(0.999999, -1.39632e-11, 0, 9.48097e-12, 0.999999, 0, 0, 0, 0.999999, -0.529594, 0.820154, -0.600147) +[node name="LineChart" parent="." instance=ExtResource("13_iw50x")] +transform = Transform3D(1, -7.21733e-11, 5.82077e-11, 4.42421e-11, 1, 0, 0, 9.09495e-13, 1, 0.000296143, 1, -4.5899e-06) + [editable path="XROrigin3D/XRControllerLeft"] diff --git a/app/content/ui/components/line_chart/line_chart.gd b/app/content/ui/components/line_chart/line_chart.gd new file mode 100644 index 0000000..438b235 --- /dev/null +++ b/app/content/ui/components/line_chart/line_chart.gd @@ -0,0 +1,89 @@ +@tool + +extends Node3D + +@onready var mesh: MeshInstance3D = $Line +@onready var plane: MeshInstance3D = $Plane +@onready var x_axis: Sprite3D = $XAxis + +const RADIUS = 0.005 +const STEPS = 5 + +@export var size: Vector2 = Vector2(0.5, 0.3) + +var points = R.state([]) + +var minmax = R.computed(func(_arg): + if points.value.size() == 0: + return [Vector2(0, 0), Vector2(0, 0)] + + var min=points.value[0] + var max=points.value[0] + + for point in points.value: + min.x=min(min.x, point.x) + min.y=min(min.y, point.y) + max.x=max(max.x, point.x) + max.y=max(max.y, point.y) + + return [min, max] +) + +var relative_points = R.computed(func(_arg): + var min=minmax.value[0] + var max=minmax.value[1] + + return points.value.map(func(point): + return Vector2(inverse_lerp(min.x, max.x, point.x), inverse_lerp(min.y, max.y, point.y)) + ) +) + +func _ready(): + for i in range(100): + points.value.append(Vector2(i, sin(i / 10.0))) + + R.effect(func(_arg): + mesh.mesh=generate_mesh(relative_points.value) + ) + + plane.position = Vector3(size.x / 2, size.y / 2, -0.001) + plane.mesh.size = size + +func generate_mesh(points: Array): + if points.size() < 2: + return null + + var sf = SurfaceTool.new() + + sf.begin(Mesh.PRIMITIVE_TRIANGLE_STRIP) + + for i in range(points.size() - 1): + var point = points[i] + var next_point = points[i + 1] + + var angle = (next_point - point).angle_to(Vector2(1, 0)) + + var up = Vector2(0, 1).rotated( - angle) + + var p0 = point + up * RADIUS * 2 + var p1 = point + up * - RADIUS * 2 + + sf.add_vertex(Vector3(p0.x * size.x, p0.y * size.y, 0)) + sf.add_vertex(Vector3(p1.x * size.x, p1.y * size.y, 0)) + + sf.index() + sf.generate_normals() + + var _mesh = sf.commit() + + sf.clear() + sf.begin(Mesh.PRIMITIVE_TRIANGLE_STRIP) + + for i in range(points.size() - 1): + var point = points[i] + + sf.add_vertex(Vector3(point.x * size.x, point.y * size.y, RADIUS)) + sf.add_vertex(Vector3(point.x * size.x, point.y * size.y, -RADIUS)) + + return sf.commit(_mesh) + \ No newline at end of file diff --git a/app/content/ui/components/line_chart/line_chart.tscn b/app/content/ui/components/line_chart/line_chart.tscn new file mode 100644 index 0000000..7fb7d52 --- /dev/null +++ b/app/content/ui/components/line_chart/line_chart.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=8 format=3 uid="uid://cwvykoymlrrel"] + +[ext_resource type="Script" path="res://content/ui/components/line_chart/line_chart.gd" id="1_n7fu8"] +[ext_resource type="PackedScene" uid="uid://bs5wjs1sf67il" path="res://content/ui/components/line_chart/x_axis.tscn" id="2_2ow77"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_20gpn"] +cull_mode = 2 +shading_mode = 0 + +[sub_resource type="ArrayMesh" id="ArrayMesh_2ookd"] +_surfaces = [{ +"aabb": AABB(-0.00490072, -0.00294936, 0, 0.504732, 0.305794, 1e-05), +"format": 34359742465, +"index_count": 198, +"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, 0, 56, 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, 0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 79, 0, 80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, 127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 134, 0, 135, 0, 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, 143, 0, 144, 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, 0, 150, 0, 151, 0, 152, 0, 153, 0, 154, 0, 155, 0, 156, 0, 157, 0, 158, 0, 159, 0, 160, 0, 161, 0, 162, 0, 163, 0, 164, 0, 165, 0, 166, 0, 167, 0, 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, 0, 174, 0, 175, 0, 176, 0, 177, 0, 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, 183, 0, 184, 0, 185, 0, 186, 0, 187, 0, 188, 0, 189, 0, 190, 0, 191, 0, 192, 0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0), +"primitive": 4, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 198, +"vertex_data": PackedByteArray(51, 150, 160, 187, 107, 60, 26, 62, 0, 0, 0, 0, 51, 150, 160, 59, 137, 4, 25, 62, 0, 0, 0, 0, 160, 28, 31, 57, 135, 148, 41, 62, 0, 0, 0, 0, 66, 2, 35, 60, 159, 89, 40, 62, 0, 0, 0, 0, 170, 153, 170, 59, 252, 198, 56, 62, 0, 0, 0, 0, 149, 176, 117, 60, 228, 133, 55, 62, 0, 0, 0, 0, 118, 39, 40, 60, 27, 173, 71, 62, 0, 0, 0, 0, 85, 42, 164, 60, 91, 98, 70, 62, 0, 0, 0, 0, 188, 14, 123, 60, 18, 33, 86, 62, 0, 0, 0, 0, 12, 118, 205, 60, 179, 200, 84, 62, 0, 0, 0, 0, 70, 3, 167, 60, 94, 254, 99, 62, 0, 0, 0, 0, 126, 185, 246, 60, 163, 147, 98, 62, 0, 0, 0, 0, 142, 138, 208, 60, 45, 34, 113, 62, 0, 0, 0, 0, 201, 248, 15, 61, 62, 159, 111, 62, 0, 0, 0, 0, 71, 34, 250, 60, 219, 107, 125, 62, 0, 0, 0, 0, 152, 140, 36, 61, 48, 201, 123, 62, 0, 0, 0, 0, 129, 233, 17, 61, 177, 94, 132, 62, 0, 0, 0, 0, 233, 19, 57, 61, 121, 120, 131, 62, 0, 0, 0, 0, 243, 213, 38, 61, 250, 125, 137, 62, 0, 0, 0, 0, 37, 135, 77, 61, 236, 123, 136, 62, 0, 0, 0, 0, 190, 228, 59, 61, 87, 8, 142, 62, 0, 0, 0, 0, 6, 216, 97, 61, 115, 224, 140, 62, 0, 0, 0, 0, 208, 50, 81, 61, 214, 244, 145, 62, 0, 0, 0, 0, 162, 233, 117, 61, 41, 152, 144, 62, 0, 0, 0, 0, 181, 255, 102, 61, 162, 61, 149, 62, 0, 0, 0, 0, 54, 190, 132, 61, 86, 149, 147, 62, 0, 0, 0, 0, 122, 224, 125, 61, 247, 223, 151, 62, 0, 0, 0, 0, 169, 253, 141, 61, 179, 202, 149, 62, 0, 0, 0, 0, 34, 144, 139, 61, 144, 213, 153, 62, 0, 0, 0, 0, 154, 13, 150, 61, 33, 50, 151, 62, 0, 0, 0, 0, 106, 26, 154, 61, 224, 247, 154, 62, 0, 0, 0, 0, 42, 51, 156, 61, 147, 233, 151, 62, 0, 0, 0, 0, 139, 58, 169, 61, 191, 7, 155, 62, 0, 0, 0, 0, 223, 194, 161, 61, 117, 43, 152, 62, 0, 0, 0, 0, 211, 156, 182, 61, 242, 36, 154, 62, 0, 0, 0, 0, 109, 16, 169, 61, 50, 215, 151, 62, 0, 0, 0, 0, 169, 112, 194, 61, 47, 136, 152, 62, 0, 0, 0, 0, 111, 236, 177, 61, 47, 183, 150, 62, 0, 0, 0, 0, 117, 131, 205, 61, 84, 62, 150, 62, 0, 0, 0, 0, 121, 137, 187, 61, 140, 197, 148, 62, 0, 0, 0, 0, 101, 63, 216, 61, 21, 72, 147, 62, 0, 0, 0, 0, 95, 125, 197, 61, 109, 12, 146, 62, 0, 0, 0, 0, 138, 209, 226, 61, 18, 168, 143, 62, 0, 0, 0, 0, 18, 155, 207, 61, 186, 151, 142, 62, 0, 0, 0, 0, 191, 77, 237, 61, 84, 100, 139, 62, 0, 0, 0, 0, 179, 206, 217, 61, 134, 115, 138, 62, 0, 0, 0, 0, 129, 189, 247, 61, 192, 133, 134, 62, 0, 0, 0, 0, 199, 14, 228, 61, 110, 172, 133, 62, 0, 0, 0, 0, 219, 18, 1, 62, 129, 23, 129, 62, 0, 0, 0, 0, 107, 86, 238, 61, 244, 79, 128, 62, 0, 0, 0, 0, 133, 68, 6, 62, 73, 77, 118, 62, 0, 0, 0, 0, 234, 162, 248, 61, 71, 217, 116, 62, 0, 0, 0, 0, 139, 116, 11, 62, 156, 131, 105, 62, 0, 0, 0, 0, 91, 121, 1, 62, 58, 36, 104, 62, 0, 0, 0, 0, 100, 163, 16, 62, 234, 241, 91, 62, 0, 0, 0, 0, 110, 162, 6, 62, 5, 162, 90, 62, 0, 0, 0, 0, 92, 209, 21, 62, 101, 186, 77, 62, 0, 0, 0, 0, 96, 204, 11, 62, 187, 117, 76, 62, 0, 0, 0, 0, 163, 254, 26, 62, 14, 1, 63, 62, 0, 0, 0, 0, 5, 247, 16, 62, 249, 195, 61, 62, 0, 0, 0, 0, 85, 43, 32, 62, 82, 235, 47, 62, 0, 0, 0, 0, 63, 34, 22, 62, 142, 178, 46, 62, 0, 0, 0, 0, 128, 87, 37, 62, 172, 159, 32, 62, 0, 0, 0, 0, 254, 77, 27, 62, 38, 104, 31, 62, 0, 0, 0, 0, 42, 131, 42, 62, 44, 69, 17, 62, 0, 0, 0, 0, 64, 122, 32, 62, 230, 11, 16, 62, 0, 0, 0, 0, 77, 174, 47, 62, 41, 3, 2, 62, 0, 0, 0, 0, 9, 167, 37, 62, 11, 197, 0, 62, 0, 0, 0, 0, 213, 216, 52, 62, 155, 1, 230, 61, 0, 0, 0, 0, 107, 212, 42, 62, 11, 117, 227, 61, 0, 0, 0, 0, 166, 2, 58, 62, 123, 201, 200, 61, 0, 0, 0, 0, 134, 2, 48, 62, 29, 37, 198, 61, 0, 0, 0, 0, 141, 43, 63, 62, 110, 169, 172, 61, 0, 0, 0, 0, 139, 49, 53, 62, 131, 228, 169, 61, 0, 0, 0, 0, 53, 83, 68, 62, 134, 234, 145, 61, 0, 0, 0, 0, 205, 97, 58, 62, 100, 250, 142, 61, 0, 0, 0, 0, 30, 121, 73, 62, 156, 165, 113, 61, 0, 0, 0, 0, 208, 147, 63, 62, 235, 83, 107, 61, 0, 0, 0, 0, 107, 156, 78, 62, 179, 73, 67, 61, 0, 0, 0, 0, 111, 200, 68, 62, 38, 99, 60, 61, 0, 0, 0, 0, 159, 187, 83, 62, 20, 63, 25, 61, 0, 0, 0, 0, 37, 1, 74, 62, 88, 147, 17, 61, 0, 0, 0, 0, 4, 212, 88, 62, 177, 248, 231, 60, 0, 0, 0, 0, 172, 64, 79, 62, 237, 141, 214, 60, 0, 0, 0, 0, 66, 224, 93, 62, 154, 228, 167, 60, 0, 0, 0, 0, 90, 140, 84, 62, 246, 156, 147, 60, 0, 0, 0, 0, 2, 213, 98, 62, 129, 59, 102, 60, 0, 0, 0, 0, 132, 239, 89, 62, 19, 142, 53, 60, 0, 0, 0, 0, 64, 152, 103, 62, 42, 253, 20, 60, 0, 0, 0, 0, 50, 132, 95, 62, 97, 40, 177, 59, 0, 0, 0, 0, 23, 237, 107, 62, 190, 217, 186, 59, 0, 0, 0, 0, 71, 135, 101, 62, 41, 90, 133, 58, 0, 0, 0, 0, 156, 104, 111, 62, 214, 37, 121, 59, 0, 0, 0, 0, 172, 99, 108, 62, 123, 44, 253, 186, 0, 0, 0, 0, 76, 34, 114, 62, 26, 74, 65, 59, 0, 0, 0, 0, 232, 1, 116, 62, 26, 74, 65, 187, 0, 0, 0, 0, 214, 93, 117, 62, 203, 158, 71, 59, 0, 0, 0, 0, 74, 30, 123, 62, 169, 104, 251, 186, 0, 0, 0, 0, 120, 135, 121, 62, 64, 236, 149, 59, 0, 0, 0, 0, 73, 166, 128, 62, 32, 232, 46, 58, 0, 0, 0, 0, 3, 55, 126, 62, 248, 194, 252, 59, 0, 0, 0, 0, 120, 122, 131, 62, 52, 96, 150, 59, 0, 0, 0, 0, 105, 145, 129, 62, 49, 84, 75, 60, 0, 0, 0, 0, 135, 48, 134, 62, 103, 5, 33, 60, 0, 0, 0, 0, 84, 21, 132, 62, 58, 44, 152, 60, 0, 0, 0, 0, 146, 216, 136, 62, 228, 33, 134, 60, 0, 0, 0, 0, 88, 160, 134, 62, 102, 247, 213, 60, 0, 0, 0, 0, 132, 121, 139, 62, 9, 43, 198, 60, 0, 0, 0, 0, 68, 47, 137, 62, 28, 35, 15, 61, 0, 0, 0, 0, 142, 22, 142, 62, 213, 16, 8, 61, 0, 0, 0, 0, 127, 192, 139, 62, 131, 35, 56, 61, 0, 0, 0, 0, 73, 177, 144, 62, 169, 176, 49, 61, 0, 0, 0, 0, 44, 83, 142, 62, 14, 140, 101, 61, 0, 0, 0, 0, 144, 74, 147, 62, 119, 146, 95, 61, 0, 0, 0, 0, 208, 230, 144, 62, 167, 113, 139, 61, 0, 0, 0, 0, 226, 226, 149, 62, 28, 163, 136, 61, 0, 0, 0, 0, 33, 123, 147, 62, 188, 211, 165, 61, 0, 0, 0, 0, 135, 122, 152, 62, 45, 40, 163, 61, 0, 0, 0, 0, 239, 15, 150, 62, 145, 167, 193, 61, 0, 0, 0, 0, 175, 17, 155, 62, 213, 21, 191, 61, 0, 0, 0, 0, 31, 165, 152, 62, 29, 165, 222, 61, 0, 0, 0, 0, 117, 168, 157, 62, 122, 37, 220, 61, 0, 0, 0, 0, 158, 58, 155, 62, 176, 129, 252, 61, 0, 0, 0, 0, 236, 62, 160, 62, 84, 13, 250, 61, 0, 0, 0, 0, 98, 208, 157, 62, 72, 120, 13, 62, 0, 0, 0, 0, 28, 213, 162, 62, 156, 64, 12, 62, 0, 0, 0, 0, 104, 102, 160, 62, 226, 209, 28, 62, 0, 0, 0, 0, 12, 107, 165, 62, 181, 153, 27, 62, 0, 0, 0, 0, 176, 252, 162, 62, 100, 38, 44, 62, 0, 0, 0, 0, 186, 0, 168, 62, 171, 234, 42, 62, 0, 0, 0, 0, 64, 147, 165, 62, 179, 78, 59, 62, 0, 0, 0, 0, 32, 150, 170, 62, 60, 12, 58, 62, 0, 0, 0, 0, 36, 42, 168, 62, 61, 36, 74, 62, 0, 0, 0, 0, 50, 43, 173, 62, 126, 215, 72, 62, 0, 0, 0, 0, 113, 193, 170, 62, 99, 129, 88, 62, 0, 0, 0, 0, 217, 191, 175, 62, 71, 38, 87, 62, 0, 0, 0, 0, 74, 89, 173, 62, 223, 65, 102, 62, 0, 0, 0, 0, 246, 83, 178, 62, 132, 211, 100, 62, 0, 0, 0, 0, 228, 241, 175, 62, 58, 67, 115, 62, 0, 0, 0, 0, 82, 231, 180, 62, 135, 187, 113, 62, 0, 0, 0, 0, 152, 139, 178, 62, 51, 101, 127, 62, 0, 0, 0, 0, 148, 121, 183, 62, 74, 188, 125, 62, 0, 0, 0, 0, 251, 38, 181, 62, 34, 69, 133, 62, 0, 0, 0, 0, 39, 10, 186, 62, 201, 90, 132, 62, 0, 0, 0, 0, 26, 197, 183, 62, 29, 76, 138, 62, 0, 0, 0, 0, 254, 151, 188, 62, 130, 68, 137, 62, 0, 0, 0, 0, 243, 103, 186, 62, 125, 188, 142, 62, 0, 0, 0, 0, 25, 33, 191, 62, 240, 140, 141, 62, 0, 0, 0, 0, 163, 19, 189, 62, 197, 141, 146, 62, 0, 0, 0, 0, 95, 161, 193, 62, 62, 38, 145, 62, 0, 0, 0, 0, 77, 209, 191, 62, 183, 186, 149, 62, 0, 0, 0, 0, 171, 15, 196, 62, 181, 2, 148, 62, 0, 0, 0, 0, 119, 182, 194, 62, 203, 64, 152, 62, 0, 0, 0, 0, 119, 86, 198, 62, 106, 21, 150, 62, 0, 0, 0, 0, 254, 240, 197, 62, 18, 23, 154, 62, 0, 0, 0, 0, 230, 71, 200, 62, 138, 91, 151, 62, 0, 0, 0, 0, 131, 165, 201, 62, 122, 14, 155, 62, 0, 0, 0, 0, 87, 191, 201, 62, 51, 252, 151, 62, 0, 0, 0, 0, 87, 97, 205, 62, 108, 240, 154, 62, 0, 0, 0, 0, 119, 47, 203, 62, 234, 41, 152, 62, 0, 0, 0, 0, 52, 165, 208, 62, 209, 235, 153, 62, 0, 0, 0, 0, 144, 23, 205, 62, 155, 181, 151, 62, 0, 0, 0, 0, 28, 143, 211, 62, 191, 49, 152, 62, 0, 0, 0, 0, 158, 89, 207, 62, 244, 113, 150, 62, 0, 0, 0, 0, 227, 78, 214, 62, 221, 202, 149, 62, 0, 0, 0, 0, 205, 197, 209, 62, 245, 93, 148, 62, 0, 0, 0, 0, 146, 251, 216, 62, 201, 183, 146, 62, 0, 0, 0, 0, 20, 69, 212, 62, 118, 132, 145, 62, 0, 0, 0, 0, 240, 158, 219, 62, 188, 251, 142, 62, 0, 0, 0, 0, 172, 205, 214, 62, 101, 241, 141, 62, 0, 0, 0, 0, 87, 61, 222, 62, 70, 157, 138, 62, 0, 0, 0, 0, 57, 91, 217, 62, 230, 176, 137, 62, 0, 0, 0, 0, 229, 216, 224, 62, 179, 165, 133, 62, 0, 0, 0, 0, 161, 235, 219, 62, 184, 207, 132, 62, 0, 0, 0, 0, 180, 114, 227, 62, 136, 32, 128, 62, 0, 0, 0, 0, 200, 125, 222, 62, 9, 183, 126, 62, 0, 0, 0, 0, 97, 11, 230, 62, 54, 54, 116, 62, 0, 0, 0, 0, 17, 17, 225, 62, 21, 198, 114, 62, 0, 0, 0, 0, 71, 163, 232, 62, 154, 72, 103, 62, 0, 0, 0, 0, 33, 165, 227, 62, 39, 236, 101, 62, 0, 0, 0, 0, 159, 58, 235, 62, 148, 152, 89, 62, 0, 0, 0, 0, 191, 57, 230, 62, 217, 74, 88, 62, 0, 0, 0, 0, 138, 209, 237, 62, 170, 72, 75, 62, 0, 0, 0, 0, 200, 206, 232, 62, 133, 5, 74, 62, 0, 0, 0, 0, 32, 104, 240, 62, 36, 125, 60, 62, 0, 0, 0, 0, 40, 100, 235, 62, 2, 65, 59, 62, 0, 0, 0, 0, 110, 254, 242, 62, 161, 91, 45, 62, 0, 0, 0, 0, 208, 249, 237, 62, 72, 35, 44, 62, 0, 0, 0, 0, 121, 148, 245, 62, 188, 10, 30, 62, 0, 0, 0, 0, 187, 143, 240, 62, 32, 211, 28, 62, 0, 0, 0, 0, 67, 42, 248, 62, 155, 177, 14, 62, 0, 0, 0, 0, 231, 37, 243, 62, 189, 119, 13, 62, 0, 0, 0, 0, 200, 191, 250, 62, 35, 239, 254, 61, 0, 0, 0, 0, 88, 188, 245, 62, 165, 112, 252, 61, 0, 0, 0, 0, 253, 84, 253, 62, 118, 7, 225, 61, 0, 0, 0, 0, 23, 83, 248, 62, 114, 119, 222, 61, 0, 0, 0, 0, 212, 233, 255, 62, 52, 249, 195, 61, 0, 0, 0, 0, 54, 234, 250, 62, 4, 80, 193, 61, 0, 0, 0, 0) +}, { +"aabb": AABB(0, 0, -0.005, 0.494949, 0.3, 0.01001), +"format": 34359738369, +"primitive": 4, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 198, +"vertex_data": PackedByteArray(0, 0, 0, 0, 122, 160, 25, 62, 10, 215, 163, 59, 0, 0, 0, 0, 122, 160, 25, 62, 10, 215, 163, 187, 181, 126, 165, 59, 19, 247, 40, 62, 10, 215, 163, 59, 181, 126, 165, 59, 19, 247, 40, 62, 10, 215, 163, 187, 181, 126, 37, 60, 112, 38, 56, 62, 10, 215, 163, 59, 181, 126, 37, 60, 112, 38, 56, 62, 10, 215, 163, 187, 16, 62, 120, 60, 187, 7, 71, 62, 10, 215, 163, 59, 16, 62, 120, 60, 187, 7, 71, 62, 10, 215, 163, 187, 181, 126, 165, 60, 227, 116, 85, 62, 10, 215, 163, 59, 181, 126, 165, 60, 227, 116, 85, 62, 10, 215, 163, 187, 98, 222, 206, 60, 1, 73, 99, 62, 10, 215, 163, 59, 98, 222, 206, 60, 1, 73, 99, 62, 10, 215, 163, 187, 16, 62, 248, 60, 182, 96, 112, 62, 10, 215, 163, 59, 16, 62, 248, 60, 182, 96, 112, 62, 10, 215, 163, 187, 222, 206, 16, 61, 133, 154, 124, 62, 10, 215, 163, 59, 222, 206, 16, 61, 133, 154, 124, 62, 10, 215, 163, 187, 181, 126, 37, 61, 149, 235, 131, 62, 10, 215, 163, 59, 181, 126, 37, 61, 149, 235, 131, 62, 10, 215, 163, 187, 140, 46, 58, 61, 243, 252, 136, 62, 10, 215, 163, 59, 140, 46, 58, 61, 243, 252, 136, 62, 10, 215, 163, 187, 98, 222, 78, 61, 101, 116, 141, 62, 10, 215, 163, 59, 98, 222, 78, 61, 101, 116, 141, 62, 10, 215, 163, 187, 57, 142, 99, 61, 127, 70, 145, 62, 10, 215, 163, 59, 57, 142, 99, 61, 127, 70, 145, 62, 10, 215, 163, 187, 16, 62, 120, 61, 124, 105, 148, 62, 10, 215, 163, 59, 16, 62, 120, 61, 124, 105, 148, 62, 10, 215, 163, 187, 243, 118, 134, 61, 85, 213, 150, 62, 10, 215, 163, 59, 243, 118, 134, 61, 85, 213, 150, 62, 10, 215, 163, 187, 222, 206, 144, 61, 217, 131, 152, 62, 10, 215, 163, 59, 222, 206, 144, 61, 217, 131, 152, 62, 10, 215, 163, 187, 202, 38, 155, 61, 185, 112, 153, 62, 10, 215, 163, 59, 202, 38, 155, 61, 185, 112, 153, 62, 10, 215, 163, 187, 181, 126, 165, 61, 154, 153, 153, 62, 10, 215, 163, 59, 181, 126, 165, 61, 154, 153, 153, 62, 10, 215, 163, 187, 160, 214, 175, 61, 18, 254, 152, 62, 10, 215, 163, 59, 160, 214, 175, 61, 18, 254, 152, 62, 10, 215, 163, 187, 140, 46, 186, 61, 175, 159, 151, 62, 10, 215, 163, 59, 140, 46, 186, 61, 175, 159, 151, 62, 10, 215, 163, 187, 119, 134, 196, 61, 240, 129, 149, 62, 10, 215, 163, 59, 119, 134, 196, 61, 240, 129, 149, 62, 10, 215, 163, 187, 98, 222, 206, 61, 65, 170, 146, 62, 10, 215, 163, 59, 98, 222, 206, 61, 65, 170, 146, 62, 10, 215, 163, 187, 78, 54, 217, 61, 230, 31, 143, 62, 10, 215, 163, 59, 78, 54, 217, 61, 230, 31, 143, 62, 10, 215, 163, 187, 57, 142, 227, 61, 237, 235, 138, 62, 10, 215, 163, 59, 57, 142, 227, 61, 237, 235, 138, 62, 10, 215, 163, 187, 36, 230, 237, 61, 23, 25, 134, 62, 10, 215, 163, 59, 36, 230, 237, 61, 23, 25, 134, 62, 10, 215, 163, 187, 16, 62, 248, 61, 187, 179, 128, 62, 10, 215, 163, 59, 16, 62, 248, 61, 187, 179, 128, 62, 10, 215, 163, 187, 253, 74, 1, 62, 72, 147, 117, 62, 10, 215, 163, 59, 253, 74, 1, 62, 72, 147, 117, 62, 10, 215, 163, 187, 243, 118, 6, 62, 235, 211, 104, 62, 10, 215, 163, 59, 243, 118, 6, 62, 235, 211, 104, 62, 10, 215, 163, 187, 233, 162, 11, 62, 247, 73, 91, 62, 10, 215, 163, 59, 233, 162, 11, 62, 247, 73, 91, 62, 10, 215, 163, 187, 222, 206, 16, 62, 16, 24, 77, 62, 10, 215, 163, 59, 222, 206, 16, 62, 16, 24, 77, 62, 10, 215, 163, 187, 212, 250, 21, 62, 131, 98, 62, 62, 10, 215, 163, 59, 212, 250, 21, 62, 131, 98, 62, 62, 10, 215, 163, 187, 202, 38, 27, 62, 240, 78, 47, 62, 10, 215, 163, 59, 202, 38, 27, 62, 240, 78, 47, 62, 10, 215, 163, 187, 191, 82, 32, 62, 233, 3, 32, 62, 10, 215, 163, 59, 191, 82, 32, 62, 233, 3, 32, 62, 10, 215, 163, 187, 181, 126, 37, 62, 137, 168, 16, 62, 10, 215, 163, 59, 181, 126, 37, 62, 137, 168, 16, 62, 10, 215, 163, 187, 171, 170, 42, 62, 26, 100, 1, 62, 10, 215, 163, 59, 171, 170, 42, 62, 26, 100, 1, 62, 10, 215, 163, 187, 160, 214, 47, 62, 83, 187, 228, 61, 10, 215, 163, 59, 160, 214, 47, 62, 83, 187, 228, 61, 10, 215, 163, 187, 150, 2, 53, 62, 76, 119, 199, 61, 10, 215, 163, 59, 150, 2, 53, 62, 76, 119, 199, 61, 10, 215, 163, 187, 140, 46, 58, 62, 248, 70, 171, 61, 10, 215, 163, 59, 140, 46, 58, 62, 248, 70, 171, 61, 10, 215, 163, 187, 129, 90, 63, 62, 117, 114, 144, 61, 10, 215, 163, 59, 129, 90, 63, 62, 117, 114, 144, 61, 10, 215, 163, 187, 119, 134, 68, 62, 195, 124, 110, 61, 10, 215, 163, 59, 119, 134, 68, 62, 195, 124, 110, 61, 10, 215, 163, 187, 109, 178, 73, 62, 108, 214, 63, 61, 10, 215, 163, 59, 109, 178, 73, 62, 108, 214, 63, 61, 10, 215, 163, 187, 98, 222, 78, 62, 54, 105, 21, 61, 10, 215, 163, 59, 98, 222, 78, 62, 54, 105, 21, 61, 10, 215, 163, 187, 88, 10, 84, 62, 79, 67, 223, 60, 10, 215, 163, 59, 88, 10, 84, 62, 79, 67, 223, 60, 10, 215, 163, 187, 78, 54, 89, 62, 200, 192, 157, 60, 10, 215, 163, 59, 78, 54, 89, 62, 200, 192, 157, 60, 10, 215, 163, 187, 67, 98, 94, 62, 202, 228, 77, 60, 10, 215, 163, 59, 67, 98, 94, 62, 202, 228, 77, 60, 10, 215, 163, 187, 57, 142, 99, 62, 90, 145, 237, 59, 10, 215, 163, 59, 57, 142, 99, 62, 90, 145, 237, 59, 10, 215, 163, 187, 47, 186, 104, 62, 72, 48, 92, 59, 10, 215, 163, 59, 47, 186, 104, 62, 72, 48, 92, 59, 10, 215, 163, 187, 36, 230, 109, 62, 49, 31, 117, 58, 10, 215, 163, 59, 36, 230, 109, 62, 49, 31, 117, 58, 10, 215, 163, 187, 26, 18, 115, 62, 0, 0, 0, 0, 10, 215, 163, 59, 26, 18, 115, 62, 0, 0, 0, 0, 10, 215, 163, 187, 16, 62, 120, 62, 236, 212, 19, 58, 10, 215, 163, 59, 16, 62, 120, 62, 236, 212, 19, 58, 10, 215, 163, 187, 5, 106, 125, 62, 68, 201, 43, 59, 10, 215, 163, 59, 5, 106, 125, 62, 68, 201, 43, 59, 10, 215, 163, 187, 253, 74, 129, 62, 150, 145, 201, 59, 10, 215, 163, 59, 253, 74, 129, 62, 150, 145, 201, 59, 10, 215, 163, 187, 248, 224, 131, 62, 204, 44, 54, 60, 10, 215, 163, 59, 248, 224, 131, 62, 204, 44, 54, 60, 10, 215, 163, 187, 243, 118, 134, 62, 15, 39, 143, 60, 10, 215, 163, 59, 243, 118, 134, 62, 15, 39, 143, 60, 10, 215, 163, 187, 238, 12, 137, 62, 55, 17, 206, 60, 10, 215, 163, 59, 238, 12, 137, 62, 55, 17, 206, 60, 10, 215, 163, 187, 233, 162, 139, 62, 248, 153, 11, 61, 10, 215, 163, 59, 233, 162, 139, 62, 248, 153, 11, 61, 10, 215, 163, 187, 228, 56, 142, 62, 22, 234, 52, 61, 10, 215, 163, 59, 228, 56, 142, 62, 22, 234, 52, 61, 10, 215, 163, 187, 222, 206, 144, 62, 67, 143, 98, 61, 10, 215, 163, 59, 222, 206, 144, 62, 67, 143, 98, 61, 10, 215, 163, 187, 217, 100, 147, 62, 98, 10, 138, 61, 10, 215, 163, 59, 217, 100, 147, 62, 98, 10, 138, 61, 10, 215, 163, 187, 212, 250, 149, 62, 245, 125, 164, 61, 10, 215, 163, 59, 212, 250, 149, 62, 245, 125, 164, 61, 10, 215, 163, 187, 207, 144, 152, 62, 179, 94, 192, 61, 10, 215, 163, 59, 207, 144, 152, 62, 179, 94, 192, 61, 10, 215, 163, 187, 202, 38, 155, 62, 76, 101, 221, 61, 10, 215, 163, 59, 202, 38, 155, 62, 76, 101, 221, 61, 10, 215, 163, 187, 197, 188, 157, 62, 130, 71, 251, 61, 10, 215, 163, 59, 197, 188, 157, 62, 130, 71, 251, 61, 10, 215, 163, 187, 191, 82, 160, 62, 114, 220, 12, 62, 10, 215, 163, 59, 191, 82, 160, 62, 114, 220, 12, 62, 10, 215, 163, 187, 186, 232, 162, 62, 204, 53, 28, 62, 10, 215, 163, 59, 186, 232, 162, 62, 204, 53, 28, 62, 10, 215, 163, 187, 181, 126, 165, 62, 136, 136, 43, 62, 10, 215, 163, 59, 181, 126, 165, 62, 136, 136, 43, 62, 10, 215, 163, 187, 176, 20, 168, 62, 120, 173, 58, 62, 10, 215, 163, 59, 176, 20, 168, 62, 120, 173, 58, 62, 10, 215, 163, 187, 171, 170, 170, 62, 222, 125, 73, 62, 10, 215, 163, 59, 171, 170, 170, 62, 222, 125, 73, 62, 10, 215, 163, 187, 165, 64, 173, 62, 213, 211, 87, 62, 10, 215, 163, 59, 165, 64, 173, 62, 213, 211, 87, 62, 10, 215, 163, 187, 160, 214, 175, 62, 178, 138, 101, 62, 10, 215, 163, 59, 160, 214, 175, 62, 178, 138, 101, 62, 10, 215, 163, 187, 155, 108, 178, 62, 97, 127, 114, 62, 10, 215, 163, 59, 155, 108, 178, 62, 97, 127, 114, 62, 10, 215, 163, 187, 150, 2, 181, 62, 191, 144, 126, 62, 10, 215, 163, 59, 150, 2, 181, 62, 191, 144, 126, 62, 10, 215, 163, 187, 145, 152, 183, 62, 246, 207, 132, 62, 10, 215, 163, 59, 145, 152, 183, 62, 246, 207, 132, 62, 10, 215, 163, 187, 140, 46, 186, 62, 80, 200, 137, 62, 10, 215, 163, 59, 140, 46, 186, 62, 80, 200, 137, 62, 10, 215, 163, 187, 134, 196, 188, 62, 182, 36, 142, 62, 10, 215, 163, 59, 134, 196, 188, 62, 182, 36, 142, 62, 10, 215, 163, 187, 129, 90, 191, 62, 2, 218, 145, 62, 10, 215, 163, 59, 129, 90, 191, 62, 2, 218, 145, 62, 10, 215, 163, 187, 124, 240, 193, 62, 182, 222, 148, 62, 10, 215, 163, 59, 124, 240, 193, 62, 182, 222, 148, 62, 10, 215, 163, 187, 119, 134, 196, 62, 27, 43, 151, 62, 10, 215, 163, 59, 119, 134, 196, 62, 27, 43, 151, 62, 10, 215, 163, 187, 114, 28, 199, 62, 79, 185, 152, 62, 10, 215, 163, 59, 114, 28, 199, 62, 79, 185, 152, 62, 10, 215, 163, 187, 109, 178, 201, 62, 87, 133, 153, 62, 10, 215, 163, 59, 109, 178, 201, 62, 87, 133, 153, 62, 10, 215, 163, 187, 103, 72, 204, 62, 43, 141, 153, 62, 10, 215, 163, 59, 103, 72, 204, 62, 43, 141, 153, 62, 10, 215, 163, 187, 98, 222, 206, 62, 182, 208, 152, 62, 10, 215, 163, 59, 98, 222, 206, 62, 182, 208, 152, 62, 10, 215, 163, 187, 93, 116, 209, 62, 217, 81, 151, 62, 10, 215, 163, 59, 93, 116, 209, 62, 217, 81, 151, 62, 10, 215, 163, 187, 88, 10, 212, 62, 105, 20, 149, 62, 10, 215, 163, 59, 88, 10, 212, 62, 105, 20, 149, 62, 10, 215, 163, 187, 83, 160, 214, 62, 31, 30, 146, 62, 10, 215, 163, 59, 83, 160, 214, 62, 31, 30, 146, 62, 10, 215, 163, 187, 78, 54, 217, 62, 145, 118, 142, 62, 10, 215, 163, 59, 78, 54, 217, 62, 145, 118, 142, 62, 10, 215, 163, 187, 72, 204, 219, 62, 22, 39, 138, 62, 10, 215, 163, 59, 72, 204, 219, 62, 22, 39, 138, 62, 10, 215, 163, 187, 67, 98, 222, 62, 181, 58, 133, 62, 10, 215, 163, 59, 67, 98, 222, 62, 181, 58, 133, 62, 10, 215, 163, 187, 62, 248, 224, 62, 12, 124, 127, 62, 10, 215, 163, 59, 62, 248, 224, 62, 12, 124, 127, 62, 10, 215, 163, 187, 57, 142, 227, 62, 38, 126, 115, 62, 10, 215, 163, 59, 57, 142, 227, 62, 38, 126, 115, 62, 10, 215, 163, 187, 52, 36, 230, 62, 97, 154, 102, 62, 10, 215, 163, 59, 52, 36, 230, 62, 97, 154, 102, 62, 10, 215, 163, 187, 47, 186, 232, 62, 183, 241, 88, 62, 10, 215, 163, 59, 47, 186, 232, 62, 183, 241, 88, 62, 10, 215, 163, 187, 41, 80, 235, 62, 23, 167, 74, 62, 10, 215, 163, 59, 41, 80, 235, 62, 23, 167, 74, 62, 10, 215, 163, 187, 36, 230, 237, 62, 19, 223, 59, 62, 10, 215, 163, 59, 36, 230, 237, 62, 19, 223, 59, 62, 10, 215, 163, 187, 31, 124, 240, 62, 117, 191, 44, 62, 10, 215, 163, 59, 31, 124, 240, 62, 117, 191, 44, 62, 10, 215, 163, 187, 26, 18, 243, 62, 238, 110, 29, 62, 10, 215, 163, 59, 26, 18, 243, 62, 238, 110, 29, 62, 10, 215, 163, 187, 21, 168, 245, 62, 172, 20, 14, 62, 10, 215, 163, 59, 21, 168, 245, 62, 172, 20, 14, 62, 10, 215, 163, 187, 16, 62, 248, 62, 228, 175, 253, 61, 10, 215, 163, 59, 16, 62, 248, 62, 228, 175, 253, 61, 10, 215, 163, 187, 10, 212, 250, 62, 116, 191, 223, 61, 10, 215, 163, 59, 10, 212, 250, 62, 116, 191, 223, 61, 10, 215, 163, 187, 5, 106, 253, 62, 156, 164, 194, 61, 10, 215, 163, 59, 5, 106, 253, 62, 156, 164, 194, 61, 10, 215, 163, 187) +}] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_f7ea3"] +transparency = 1 +cull_mode = 2 +albedo_color = Color(1, 1, 1, 0.164706) + +[sub_resource type="QuadMesh" id="QuadMesh_b7vce"] +size = Vector2(0.5, 0.3) + +[sub_resource type="ViewportTexture" id="ViewportTexture_dwm74"] +viewport_path = NodePath("XAxis/SubViewport") + +[node name="LineChart" type="Node3D"] +script = ExtResource("1_n7fu8") + +[node name="Line" type="MeshInstance3D" parent="."] +material_override = SubResource("StandardMaterial3D_20gpn") +mesh = SubResource("ArrayMesh_2ookd") + +[node name="YAxis" type="MeshInstance3D" parent="."] + +[node name="Plane" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.25, 0.15, -0.001) +material_override = SubResource("StandardMaterial3D_f7ea3") +mesh = SubResource("QuadMesh_b7vce") + +[node name="XAxis" type="Sprite3D" parent="."] +centered = false +offset = Vector2(-400, 0) +pixel_size = 0.0001 +billboard = 2 +texture = SubResource("ViewportTexture_dwm74") + +[node name="SubViewport" type="SubViewport" parent="XAxis"] +transparent_bg = true +size = Vector2i(400, 3000) + +[node name="XAxis" parent="XAxis/SubViewport" instance=ExtResource("2_2ow77")] diff --git a/app/content/ui/components/line_chart/x_axis.gd b/app/content/ui/components/line_chart/x_axis.gd new file mode 100644 index 0000000..7ad8a2c --- /dev/null +++ b/app/content/ui/components/line_chart/x_axis.gd @@ -0,0 +1,10 @@ +@tool +extends Control + +func _draw(): + draw_line(Vector2(380, 0), Vector2(380, 3000), Color(1, 1, 1), 10) + + for i in range(100, 3000, 100): + draw_line(Vector2(350, i), Vector2(380, i), Color(1, 1, 1), 5) + draw_string_outline(get_theme_default_font(), Vector2(240, i + 15), str(i), HORIZONTAL_ALIGNMENT_RIGHT, 100, 40, 10, Color(0, 0, 0)) + draw_string(get_theme_default_font(), Vector2(240, i + 15), str(i), HORIZONTAL_ALIGNMENT_RIGHT, 100, 40, Color(1, 1, 1)) \ No newline at end of file diff --git a/app/content/ui/components/line_chart/x_axis.tscn b/app/content/ui/components/line_chart/x_axis.tscn new file mode 100644 index 0000000..65b2090 --- /dev/null +++ b/app/content/ui/components/line_chart/x_axis.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=2 format=3 uid="uid://bs5wjs1sf67il"] + +[ext_resource type="Script" path="res://content/ui/components/line_chart/x_axis.gd" id="1_5fiu5"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_5fiu5") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 20.0 +theme_override_font_sizes/font_size = 50 +text = "X Axis" diff --git a/app/content/ui/menu/view/view_menu.tscn b/app/content/ui/menu/view/view_menu.tscn index 03cac72..085c2d4 100644 --- a/app/content/ui/menu/view/view_menu.tscn +++ b/app/content/ui/menu/view/view_menu.tscn @@ -62,6 +62,7 @@ horizontal_alignment = 0 [node name="MinSlider" parent="Content" instance=ExtResource("4_d3xhb")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.06, 0.01, 0.2) +value = 0.0 step = 1.0 show_label = true size = Vector3(10, 0.4, 1) @@ -76,6 +77,7 @@ horizontal_alignment = 0 [node name="MaxSlider" parent="Content" instance=ExtResource("4_d3xhb")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.06, 0.01, 0.24) +value = 0.0 step = 1.0 show_label = true size = Vector3(10, 0.4, 1)