@tool

extends Node3D

@export_range(0, 1) var opacity: float = 1

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
	var mesh: MeshInstance3D = get_node("T-Shape2")
	var mat0: Material = mesh.get_active_material(0)
	var mat1: Material = mat0.next_pass

	mat1.albedo_color = Color(1, 1, 1, opacity)
	mat1.transparency = BaseMaterial3D.TRANSPARENCY_DISABLED if opacity >= 1 else BaseMaterial3D.TRANSPARENCY_ALPHA

