SubViewport
Hereda: Viewport < Node < Object
Una interfaz a un mundo de juego que no crea una ventana ni dibuja directamente en la pantalla.
Descripción
SubViewport Isolates a rectangular region of a scene to be displayed independently. This can be used, for example, to display UI in 3D space.
Note: SubViewport is a Viewport that isn't a Window, i.e. it doesn't draw anything by itself. To display anything, SubViewport must have a non-zero size and be either put inside a SubViewportContainer or assigned to a ViewportTexture.
Note: InputEvents are not passed to a standalone SubViewport by default. To ensure InputEvent propagation, a SubViewport can be placed inside of a SubViewportContainer.
Tutoriales
Propiedades
|
||
|
||
|
||
|
||
|
Enumeraciones
enum ClearMode: 🔗
ClearMode CLEAR_MODE_ALWAYS = 0
Siempre despeja el objetivo de renderizado antes de dibujar.
ClearMode CLEAR_MODE_NEVER = 1
Nunca despejen el objetivo de renderizado.
ClearMode CLEAR_MODE_ONCE = 2
Limpia el objetivo de renderizado en el siguiente fotograma, luego cambia a CLEAR_MODE_NEVER.
enum UpdateMode: 🔗
UpdateMode UPDATE_DISABLED = 0
No actualiza el objetivo de renderizado.
UpdateMode UPDATE_ONCE = 1
Actualiza el objetivo de render una vez, luego cambia a UPDATE_DISABLED.
UpdateMode UPDATE_WHEN_VISIBLE = 2
Actualice el objetivo de renderizado sólo cuando sea visible. Este es el valor predeterminado.
UpdateMode UPDATE_WHEN_PARENT_VISIBLE = 3
Actualizar el objetivo de renderizado solo cuando su elemento principal esté visible.
UpdateMode UPDATE_ALWAYS = 4
Siempre actualiza el objetivo de renderizado.
Descripciones de Propiedades
ClearMode render_target_clear_mode = 0 🔗
El modo claro cuando el viewport secundario se utiliza como objetivo de renderizado.
Nota: Esta propiedad está diseñada para uso 2D.
UpdateMode render_target_update_mode = 2 🔗
void set_update_mode(value: UpdateMode)
UpdateMode get_update_mode()
El modo de actualización cuando el viewport secundario se utiliza como destino de renderizado.
Vector2i size = Vector2i(512, 512) 🔗
The width and height of the sub-viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed.
Note: If the parent node is a SubViewportContainer and its SubViewportContainer.stretch is true, the viewport size cannot be changed manually.
Vector2i size_2d_override = Vector2i(0, 0) 🔗
The 2D size override of the sub-viewport. If either the width or height is 0, the override is disabled.
bool size_2d_override_stretch = false 🔗
Si es true, la sobrescritura del tamaño 2D también afecta el estiramiento.