Initial commit for testing/fixing a deprecated godot-colyseus addon

This commit is contained in:
2026-01-10 11:12:02 -05:00
commit 081a5fcf1a
76 changed files with 3456 additions and 0 deletions

22
scripts/vector_line_3d.gd Normal file
View File

@@ -0,0 +1,22 @@
extends MeshInstance3D
@export var color: Color = Color(0.1, 0.8, 1.0, 0.9)
var _mesh: ImmediateMesh
var _material: StandardMaterial3D
func _ready() -> void:
_mesh = ImmediateMesh.new()
mesh = _mesh
_material = StandardMaterial3D.new()
_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
_material.albedo_color = color
func set_vector(end_point: Vector3) -> void:
if _mesh == null:
return
_mesh.clear_surfaces()
_mesh.surface_begin(Mesh.PRIMITIVE_LINES, _material)
_mesh.surface_add_vertex(Vector3.ZERO)
_mesh.surface_add_vertex(end_point)
_mesh.surface_end()