LargeScreen/main_perspective.gd
shurongsen b8d780b2a2 3d
接口添加
2025-01-03 14:02:17 +08:00

15 lines
487 B
GDScript

extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
texture = Global.EgoVehicle3D.MainSubGetTexture()
pass # Replace with function body.
func _physics_process(delta: float) -> void:
Global.EgoVehicle3D.main_sub_viewport.size = size
var minSize = Vector2(1,size.y/size.x)
material.set_shader_parameter("size",minSize)
var Magnification = minSize.y / minSize.x
material.set_shader_parameter("round_all",0.05*Magnification)