class_name HologramProjectorFloor
extends Node3D

@export var active: bool = false: set = set_glowing

@export_group("Materials")
@export var powered_material: Material = preload("model/glass_powered.tres")
@export var override_surface_index: int = 1
@export var projector_mesh: MeshInstance3D

@onready var glow_mesh: MeshInstance3D = $GlowMesh


func _ready() -> void:
	set_glowing(false)


func set_glowing(value: bool) -> void:
	active = value
	var material: Material = powered_material if value else null
	projector_mesh.set_surface_override_material(override_surface_index, material)
	glow_mesh.visible = value
