immersive-home/app/content/ui/components/container/container3d.gd

18 lines
265 B
GDScript3
Raw Normal View History

2024-04-23 23:11:18 +03:00
@tool
2023-11-07 22:07:34 +02:00
extends Node3D
class_name Container3D
2024-04-23 23:11:18 +03:00
@export var size := Vector3(1.0, 1.0, 1.0):
2023-11-07 22:07:34 +02:00
set(value):
2024-04-23 23:11:18 +03:00
size = Vector3(max(0, value.x), max(0, value.y), max(0, value.z))
2023-11-07 22:07:34 +02:00
2024-04-23 23:11:18 +03:00
if !is_inside_tree(): return
_update()
func _ready():
_update()
2023-11-07 22:07:34 +02:00
2024-04-23 23:11:18 +03:00
func _update():
2023-11-07 22:07:34 +02:00
pass