first commit 🎉

This commit is contained in:
anyreso 2026-02-17 23:36:57 -05:00
commit 6e724f67fe
805 changed files with 62098 additions and 0 deletions

View file

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="98.130043"
height="128"
version="1.1"
viewBox="0 0 25.963247 33.867"
id="svg8"
sodipodi:docname="chevron.svg"
inkscape:version="1.4 (1:1.4+202410161351+e7c3feb100)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12">
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect2"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
radius="0"
unit="px"
method="auto"
mode="F"
chamfer_steps="1"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect1"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
radius="0"
unit="px"
method="auto"
mode="F"
chamfer_steps="1"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
</defs>
<sodipodi:namedview
id="namedview10"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="5.5309912"
inkscape:cx="44.747856"
inkscape:cy="70.692573"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6"
showguides="false" />
<g
transform="matrix(1.0627,0,0,1.0881,-1.0755019,-1.4834)"
id="g6">
<path
d="M 1.0117672,3.5081121 V 15.313192 c 8.5e-6,1.391547 0.4554423,2.744854 1.2967571,3.853273 l 9.6225127,12.678021 c 0.651439,0.858273 1.941968,0.858273 2.593407,0 l 9.622512,-12.678021 c 0.841315,-1.108419 1.296749,-2.461726 1.296758,-3.853273 V 3.5081121 c 0,-1.1845507 -0.960268,-2.1448187 -2.144819,-2.1448183 H 3.1569072 c -1.1845504,0 -2.1448183,0.9602679 -2.1448183,2.1448183 z"
color="#000000"
fill="#fff"
stroke-width="2.26997"
style="fill:#000000;-inkscape-stroke:none"
id="path3867"
sodipodi:nodetypes="cccccccscscc"
inkscape:path-effect="#path-effect2"
inkscape:original-d="M 1.0117672,3.5081121 V 15.313192 c 8.5e-6,1.391547 0.4554423,2.744854 1.2967571,3.853273 l 9.6225127,12.678021 c 0.651439,0.858273 1.941968,0.858273 2.593407,0 l 9.622512,-12.678021 c 0.841315,-1.108419 1.296749,-2.461726 1.296758,-3.853273 V 3.5081121 c 0,-1.1845507 -0.960268,-2.1448187 -2.144819,-2.1448183 H 3.1569072 c -1.1845504,0 -2.1448183,0.9602679 -2.1448183,2.1448183 z" />
<path
d="m 6.146691,5.0107427 c -0.8138172,0 -1.5080753,0.6751882 -1.5080753,1.5080752 h -2.263e-4 v 8.3004451 c 5.9e-6,0.978432 0.3202328,1.929976 0.9117824,2.709333 l 6.7658292,8.914234 c 0.458043,0.603473 1.365446,0.603473 1.823489,0 l 6.765829,-8.914234 c 0.59155,-0.779357 0.911777,-1.730901 0.911783,-2.709333 V 6.5188179 c 0,-0.832887 -0.675188,-1.508075 -1.508075,-1.5080752"
color="#000000"
fill="#ffffff"
stroke-width="1.59608"
style="-inkscape-stroke:none"
id="path2"
sodipodi:nodetypes="cccccccccsc"
inkscape:path-effect="#path-effect1"
inkscape:original-d="m 6.146691,5.0107427 c -0.8138172,0 -1.5080753,0.6751882 -1.5080753,1.5080752 h -2.263e-4 v 8.3004451 c 5.9e-6,0.978432 0.3202328,1.929976 0.9117824,2.709333 l 6.7658292,8.914234 c 0.458043,0.603473 1.365446,0.603473 1.823489,0 l 6.765829,-8.914234 c 0.59155,-0.779357 0.911777,-1.730901 0.911783,-2.709333 V 6.5188179 c 0,-0.832887 -0.675188,-1.508075 -1.508075,-1.5080752" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci75minnfojkg"
path.s3tc="res://.godot/imported/chevron.svg-36dc527b858274e5462330b755617865.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://scenes/interfaces/waypoint/assets/chevron.svg"
dest_files=["res://.godot/imported/chevron.svg-36dc527b858274e5462330b755617865.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="209.33925"
height="137.80237"
version="1.1"
viewBox="0 0 55.385467 36.459604"
id="svg5"
sodipodi:docname="minimal.svg"
inkscape:version="1.4 (1:1.4+202410161351+e7c3feb100)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5" />
<sodipodi:namedview
id="namedview5"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.3765909"
inkscape:cx="166.71619"
inkscape:cy="23.245831"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6" />
<g
transform="matrix(1.0627,0,0,1.0881,102.01074,1.345381)"
id="g5">
<g
transform="translate(-38.352,24.796)"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
id="g4"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1">
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#000"
stroke-width="9.8421"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path3" />
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#fff"
stroke-width="7.8737"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path4" />
</g>
<g
transform="translate(-38.352,24.796)"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
id="g6"
style="fill:#ffffff;stroke:#000000;stroke-width:7.87346;stroke-dasharray:none;stroke-opacity:1">
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#fff"
stroke-width="7.8737"
style="fill:none;stroke:#fffdff;stroke-width:7.87346;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path6"
sodipodi:nodetypes="ccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4i7h27euhnvk"
path.s3tc="res://.godot/imported/minimal.svg-5e977e0f91a54a368b4eeb99ca5927ca.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://scenes/interfaces/waypoint/assets/minimal.svg"
dest_files=["res://.godot/imported/minimal.svg-5e977e0f91a54a368b4eeb99ca5927ca.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1 @@
<svg height="128" viewBox="0 0 33.866666 33.866666" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m2.5 3.6166886h28.8667346l-14.433367 27.0625224z" fill="#fff" stroke="#000" stroke-width="3"/></svg>

After

Width:  |  Height:  |  Size: 209 B

View file

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpb6vpa0c74rl"
path.s3tc="res://.godot/imported/waypoint.svg-2c10a3fe7e895f73ed6a48c0675d4edd.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://scenes/interfaces/waypoint/assets/waypoint.svg"
dest_files=["res://.godot/imported/waypoint.svg-2c10a3fe7e895f73ed6a48c0675d4edd.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,129 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends Control
# Some margin to keep the marker away from the screen's corners.
const MARGIN : float = 8.
# If `true`, the waypoint sticks to the viewport's edges when moving off-screen.
@export var sticky : bool = true
# If `true`, the waypoint fades as the camera get closer.
@export var fade : bool = true
# The waypoint's text.
@export var text : String = "Waypoint":
set(value):
text = value
# The label's text can only be set once the node is ready.
if is_inside_tree():
label.text = value
@onready var camera : Camera3D = get_viewport().get_camera_3d()
@onready var label : Label = $Label
@onready var parent : Node = get_parent()
func _ready() -> void:
self.text = text
if not parent is Node3D:
push_error("The waypoint's parent node must inherit from Node3D.")
if DisplayServer.get_name() == "headless":
parent.queue_free()
func _process(_delta : float) -> void:
if not camera.current:
# If the camera we have isn't the current one, get the current camera.
camera = get_viewport().get_camera_3d()
var parent_position : Vector3 = parent.global_transform.origin
var camera_transform : Transform3D = camera.global_transform
var camera_position : Vector3 = camera_transform.origin
# We would use "camera.is_position_behind(parent_position)", except
# that it also accounts for the near clip plane, which we don't want.
var is_behind : bool = camera_transform.basis.z.dot(parent_position - camera_position) > 0
# Fade the waypoint when the camera gets close.
if fade:
var distance : float = camera_position.distance_to(parent_position)
modulate.a = remap(distance, 0., 256., 0., 1.)
var unprojected_position : Vector2 = camera.unproject_position(parent_position)
var viewport_size : Vector2 = get_viewport_rect().size
if not sticky:
# For non-sticky waypoints, we don't need to clamp and calculate
# the position if the waypoint goes off screen.
position = unprojected_position
visible = not is_behind
return
# We need to handle the axes differently.
# For the screen's X axis, the projected position is useful to us,
# but we need to force it to the side if it's also behind.
if is_behind:
if unprojected_position.x < viewport_size.x / 2.:
unprojected_position.x = viewport_size.x - MARGIN
else:
unprojected_position.x = MARGIN
# For the screen's Y axis, the projected position is NOT useful to us
# because we don't want to indicate to the user that they need to look
# up or down to see something behind them. Instead, here we approximate
# the correct position using difference of the X axis Euler angles
# (up/down rotation) and the ratio of that with the camera's FOV.
# This will be slightly off from the theoretical "ideal" position.
if is_behind or unprojected_position.x < MARGIN or \
unprojected_position.x > viewport_size.x - MARGIN:
var look : Transform3D = camera_transform.looking_at(parent_position, Vector3.UP)
var diff : float = angle_diff(
look.basis.get_euler().x, camera_transform.basis.get_euler().x)
unprojected_position.y = viewport_size.y * (0.5 + (diff / deg_to_rad(camera.fov)))
position = Vector2(
clamp(unprojected_position.x, MARGIN, viewport_size.x - MARGIN),
clamp(unprojected_position.y, MARGIN, viewport_size.y - MARGIN)
)
label.visible = true
rotation = 0
# Used to display a diagonal arrow when the waypoint is displayed in
# one of the screen corners.
var overflow : float = .0
if position.x <= MARGIN:
# Left overflow.
overflow = -TAU / 8.0
label.visible = false
rotation = TAU / 4.0
elif position.x >= viewport_size.x - MARGIN:
# Right overflow.
overflow = TAU / 8.0
label.visible = false
rotation = TAU * 3.0 / 4.0
if position.y <= MARGIN:
# Top overflow.
label.visible = false
rotation = TAU / 2.0 + overflow
elif position.y >= viewport_size.y - MARGIN:
# Bottom overflow.
label.visible = false
rotation = -overflow
static func angle_diff(from : float, to : float) -> float:
var diff : float = fmod(to - from, TAU)
return fmod(2.0 * diff, TAU) - diff

View file

@ -0,0 +1 @@
uid://dyx7ij5ackxml

View file

@ -0,0 +1,30 @@
[gd_scene load_steps=3 format=3 uid="uid://bcgkc5fhhyauv"]
[ext_resource type="Script" uid="uid://dyx7ij5ackxml" path="res://scenes/interfaces/waypoint/waypoint.gd" id="1_gmnl6"]
[ext_resource type="Texture2D" uid="uid://cpb6vpa0c74rl" path="res://scenes/interfaces/waypoint/assets/waypoint.svg" id="2_xby6k"]
[node name="Waypoint" type="Control"]
layout_mode = 3
anchors_preset = 0
size_flags_horizontal = 3
script = ExtResource("1_gmnl6")
fade = false
[node name="Marker" type="TextureRect" parent="."]
visible = false
layout_mode = 0
offset_left = -8.0
offset_top = -16.0
offset_right = 8.0
texture = ExtResource("2_xby6k")
expand_mode = 1
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_left = -128.0
offset_top = -42.0
offset_right = 128.0
offset_bottom = -19.0
theme_override_font_sizes/font_size = 14
horizontal_alignment = 1
vertical_alignment = 2

View file

@ -0,0 +1,45 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
@tool
class_name Waypoint3D extends Node3D
signal text_changed(new_text: String)
# If `true`, the waypoint sticks to the viewport's edges when moving off-screen.
@export var sticky : bool = true
# If `true`, the waypoint fades as the camera get closer.
@export var fade : bool = true
# The waypoint's text.
@export var text : String:
set(value):
text = value
text_changed.emit(value)
## The foreground color to modulate the waypoint color
@export var foreground_color : Color = Color.WHITE
@onready var label : Label3D = $Label3D
@onready var sprite : Sprite3D = $Sprite3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
text_changed.connect(label.set_text)
func _process(_delta : float) -> void:
sprite.modulate = foreground_color
label.modulate = foreground_color
label.outline_modulate.a = foreground_color.a

View file

@ -0,0 +1 @@
uid://do2mhyg6wkxh3

View file

@ -0,0 +1,25 @@
[gd_scene load_steps=3 format=3 uid="uid://2350a3ce4xs8"]
[ext_resource type="Script" uid="uid://do2mhyg6wkxh3" path="res://scenes/interfaces/waypoint/waypoint3d.gd" id="1_kq7bj"]
[ext_resource type="Texture2D" uid="uid://d4i7h27euhnvk" path="res://scenes/interfaces/waypoint/assets/minimal.svg" id="2_yfhan"]
[node name="Waypoint" type="Node3D"]
script = ExtResource("1_kq7bj")
[node name="Label3D" type="Label3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
offset = Vector2(0, 48)
billboard = 1
double_sided = false
no_depth_test = true
fixed_size = true
font_size = 24
line_spacing = 32.025
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(0.05, 0, 0, 0, 0.05, 0, 0, 0, 0.05, 0, 0, 0)
offset = Vector2(0, 64)
billboard = 1
no_depth_test = true
fixed_size = true
texture = ExtResource("2_yfhan")