:github_url: hide .. _class_CPUParticles2D: CPUParticles2D ============== **Hereda:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Un emisor de partículas 2D basado en la CPU. .. rst-class:: classref-introduction-group Descripción ---------------------- Nodo de partículas 2D basado en CPU que se utiliza para crear diversos sistemas y efectos de partículas. Véase también :ref:`GPUParticles2D`, que ofrece la misma funcionalidad con aceleración por hardware, pero podría no funcionar en dispositivos más antiguos. .. rst-class:: classref-introduction-group Tutoriales -------------------- - :doc:`Sistemas de partículas (2D) <../tutorials/2d/particle_systems_2d>` .. rst-class:: classref-reftable-group Propiedades ---------------------- .. table:: :widths: auto +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`amount` | ``8`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`angle_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angle_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angle_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`angular_velocity_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`anim_offset_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`anim_speed_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Gradient` | :ref:`color_initial_ramp` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Gradient` | :ref:`color_ramp` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`damping_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`damping_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`damping_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`direction` | ``Vector2(1, 0)`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PackedColorArray` | :ref:`emission_colors` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`emission_normals` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`emission_points` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`emission_rect_extents` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`emission_ring_inner_radius` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`emission_ring_radius` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`emission_sphere_radius` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`emitting` | ``true`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`explosiveness` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`fixed_fps` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`fract_delta` | ``true`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 980)`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`hue_variation_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`linear_accel_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`local_coords` | ``false`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`one_shot` | ``false`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`orbit_velocity_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`preprocess` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`radial_accel_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`randomness` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`scale_amount_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`scale_amount_max` | ``1.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`scale_amount_min` | ``1.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`scale_curve_x` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`scale_curve_y` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`seed` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`speed_scale` | ``1.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`split_scale` | ``false`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`spread` | ``45.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`tangential_accel_curve` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`texture` | | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`use_fixed_seed` | ``false`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Métodos -------------- .. table:: :widths: auto +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`convert_from_particles`\ (\ particles\: :ref:`Node`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Curve` | :ref:`get_param_curve`\ (\ param\: :ref:`Parameter`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_param_max`\ (\ param\: :ref:`Parameter`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_param_min`\ (\ param\: :ref:`Parameter`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`request_particles_process`\ (\ process_time\: :ref:`float`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`restart`\ (\ keep_seed\: :ref:`bool` = false\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_param_curve`\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_param_max`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_param_min`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Señales -------------- .. _class_CPUParticles2D_signal_finished: .. rst-class:: classref-signal **finished**\ (\ ) :ref:`🔗` Emitida cuando todas las partículas activas han terminado de procesarse. Cuando :ref:`one_shot` está desactivado, las partículas se procesarán continuamente, por lo que esto nunca se emite. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumeraciones -------------------------- .. _enum_CPUParticles2D_DrawOrder: .. rst-class:: classref-enumeration enum **DrawOrder**: :ref:`🔗` .. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX: .. rst-class:: classref-enumeration-constant :ref:`DrawOrder` **DRAW_ORDER_INDEX** = ``0`` Las partículas se dibujan en el orden en que se emiten. .. _class_CPUParticles2D_constant_DRAW_ORDER_LIFETIME: .. rst-class:: classref-enumeration-constant :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` Las partículas se dibujan en orden de vida útil restante. En otras palabras, la partícula con la vida útil más alta se dibuja al frente. .. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_Parameter: .. rst-class:: classref-enumeration enum **Parameter**: :ref:`🔗` .. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` Utilizar con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de la velocidad inicial. .. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` Utilizar con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de la velocidad angular. .. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` Utilizar con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de la velocidad orbital. .. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` Utilizar con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de la aceleración lineal. .. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` Utilizar con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de la aceleración radial. .. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer propiedades de aceleración tangencial. .. _class_CPUParticles2D_constant_PARAM_DAMPING: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_DAMPING** = ``6`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer propiedades de amortiguación. .. _class_CPUParticles2D_constant_PARAM_ANGLE: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_ANGLE** = ``7`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer propiedades de ángulo. .. _class_CPUParticles2D_constant_PARAM_SCALE: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_SCALE** = ``8`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer propiedades de escala. .. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer propiedades de variación de tono. .. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de velocidad de la animación. .. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` Utilízalo con :ref:`set_param_min()`, :ref:`set_param_max()` y :ref:`set_param_curve()` para establecer las propiedades de desplazamiento de la animación. .. _class_CPUParticles2D_constant_PARAM_MAX: .. rst-class:: classref-enumeration-constant :ref:`Parameter` **PARAM_MAX** = ``12`` Representa el tamaño del enumerado :ref:`Parameter`. .. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_ParticleFlags: .. rst-class:: classref-enumeration enum **ParticleFlags**: :ref:`🔗` .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: .. rst-class:: classref-enumeration-constant :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` Utilizar con :ref:`set_particle_flag()` para establecer :ref:`particle_flag_align_y`. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y: .. rst-class:: classref-enumeration-constant :ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` Presente por coherencia con los nodos de partículas en 3D, no usado en 2D. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_DISABLE_Z: .. rst-class:: classref-enumeration-constant :ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` Presente por coherencia con los nodos de partículas en 3D, no usado en 2D. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_MAX: .. rst-class:: classref-enumeration-constant :ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``3`` Representa el tamaño del enum :ref:`ParticleFlags`. .. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_EmissionShape: .. rst-class:: classref-enumeration enum **EmissionShape**: :ref:`🔗` .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_POINT** = ``0`` Todas las partículas serán emitidas desde un único punto. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_SPHERE** = ``1`` Las partículas se emitirán en el volumen de una esfera aplanada en dos dimensiones. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE_SURFACE: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_SPHERE_SURFACE** = ``2`` Se emitirán partículas en la superficie de una esfera aplanada en dos dimensiones. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_RECTANGLE** = ``3`` Se emitirán partículas en el área de un rectángulo. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_POINTS** = ``4`` Las partículas se emitirán en una posición elegida al azar entre :ref:`emission_points`. El color de las partículas será modulado por :ref:`emission_colors`. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_DIRECTED_POINTS** = ``5`` Las partículas se emitirán en una posición elegida al azar entre :ref:`emission_points`. La velocidad y rotación de las partículas se fijarán en base a :ref:`emission_normals`. El color de las partículas será modulado por :ref:`emission_colors`. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RING: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_RING** = ``6`` Particles will be emitted in the area of a ring parameterized by its outer and inner radius. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_MAX: .. rst-class:: classref-enumeration-constant :ref:`EmissionShape` **EMISSION_SHAPE_MAX** = ``7`` Representa el tamaño del enum :ref:`EmissionShape`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descripciones de Propiedades -------------------------------------------------------- .. _class_CPUParticles2D_property_amount: .. rst-class:: classref-property :ref:`int` **amount** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_amount**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_amount**\ (\ ) Número de partículas emitidas en un ciclo de emisión. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angle_curve: .. rst-class:: classref-property :ref:`Curve` **angle_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La rotación de cada partícula se animará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angle_max: .. rst-class:: classref-property :ref:`float` **angle_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Rotación inicial máxima aplicada a cada partícula, en grados. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angle_min: .. rst-class:: classref-property :ref:`float` **angle_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`angle_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angular_velocity_curve: .. rst-class:: classref-property :ref:`Curve` **angular_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La velocidad angular de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angular_velocity_max: .. rst-class:: classref-property :ref:`float` **angular_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Velocidad angular inicial máxima (velocidad de rotación) aplicada a cada partícula en *grados* por segundo. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_angular_velocity_min: .. rst-class:: classref-property :ref:`float` **angular_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`angular_velocity_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_offset_curve: .. rst-class:: classref-property :ref:`Curve` **anim_offset_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| El desplazamiento de animación de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_offset_max: .. rst-class:: classref-property :ref:`float` **anim_offset_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Desplazamiento máximo de animación correspondiente al índice de fotograma en la textura. ``0`` es el primer fotograma, ``1`` es el último. Véase :ref:`CanvasItemMaterial.particles_animation`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_offset_min: .. rst-class:: classref-property :ref:`float` **anim_offset_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`anim_offset_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_speed_curve: .. rst-class:: classref-property :ref:`Curve` **anim_speed_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La velocidad de animación de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_speed_max: .. rst-class:: classref-property :ref:`float` **anim_speed_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Velocidad máxima de animación de partículas. Una velocidad de animación de ``1`` significa que las partículas completarán un ciclo completo de ``0`` a ``1`` durante su vida útil; ``2`` significa ``2`` ciclos, etc. Si la velocidad de animación es superior a ``1``, recuerda habilitar la propiedad :ref:`CanvasItemMaterial.particles_anim_loop` si deseas que la animación se repita. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_anim_speed_min: .. rst-class:: classref-property :ref:`float` **anim_speed_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`anim_speed_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_color: .. rst-class:: classref-property :ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_color**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_color**\ (\ ) El color inicial de cada partícula. Si se define :ref:`texture`, se multiplicará por este color. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_color_initial_ramp: .. rst-class:: classref-property :ref:`Gradient` **color_initial_ramp** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_color_initial_ramp**\ (\ value\: :ref:`Gradient`\ ) - :ref:`Gradient` **get_color_initial_ramp**\ (\ ) El color inicial de cada partícula variará a lo largo de este :ref:`Gradient` (multiplicado por :ref:`color`). .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_color_ramp: .. rst-class:: classref-property :ref:`Gradient` **color_ramp** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_color_ramp**\ (\ value\: :ref:`Gradient`\ ) - :ref:`Gradient` **get_color_ramp**\ (\ ) El color de cada partícula variará a lo largo de este :ref:`Gradient` durante su vida útil (multiplicado por :ref:`color`). .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_damping_curve: .. rst-class:: classref-property :ref:`Curve` **damping_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La amortiguación variará a lo largo de esta :ref:`Curve`. Debe ser una unidad :ref:`Curve`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_damping_max: .. rst-class:: classref-property :ref:`float` **damping_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| La velocidad máxima a la que las partículas pierden velocidad. Por ejemplo, un valor de ``100`` significa que la partícula pasará de ``100`` de velocidad a ``0`` en ``1`` segundo. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_damping_min: .. rst-class:: classref-property :ref:`float` **damping_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`damping_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_direction: .. rst-class:: classref-property :ref:`Vector2` **direction** = ``Vector2(1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_direction**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_direction**\ (\ ) Vector unitario que especifica la dirección de emisión de las partículas. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_draw_order: .. rst-class:: classref-property :ref:`DrawOrder` **draw_order** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) - :ref:`DrawOrder` **get_draw_order**\ (\ ) Orden de dibujado de partículas. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_colors: .. rst-class:: classref-property :ref:`PackedColorArray` **emission_colors** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_colors**\ (\ value\: :ref:`PackedColorArray`\ ) - :ref:`PackedColorArray` **get_emission_colors**\ (\ ) Establece los :ref:`Color`\ s para modular las partículas al usar :ref:`EMISSION_SHAPE_POINTS` o :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_normals: .. rst-class:: classref-property :ref:`PackedVector2Array` **emission_normals** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_normals**\ (\ value\: :ref:`PackedVector2Array`\ ) - :ref:`PackedVector2Array` **get_emission_normals**\ (\ ) Establece la dirección en la que las partículas serán emitidas cuando se use :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_points: .. rst-class:: classref-property :ref:`PackedVector2Array` **emission_points** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_points**\ (\ value\: :ref:`PackedVector2Array`\ ) - :ref:`PackedVector2Array` **get_emission_points**\ (\ ) Establece las posiciones iniciales para generar partículas cuando se utiliza :ref:`EMISSION_SHAPE_POINTS` o :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_rect_extents: .. rst-class:: classref-property :ref:`Vector2` **emission_rect_extents** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_rect_extents**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_emission_rect_extents**\ (\ ) La extensión del rectángulo si :ref:`emission_shape` se fija en :ref:`EMISSION_SHAPE_RECTANGLE`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_ring_inner_radius: .. rst-class:: classref-property :ref:`float` **emission_ring_inner_radius** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_ring_inner_radius**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_emission_ring_inner_radius**\ (\ ) The ring's inner radius if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_RING`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_ring_radius: .. rst-class:: classref-property :ref:`float` **emission_ring_radius** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_ring_radius**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_emission_ring_radius**\ (\ ) The ring's outer radius if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_RING`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_shape: .. rst-class:: classref-property :ref:`EmissionShape` **emission_shape** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_shape**\ (\ value\: :ref:`EmissionShape`\ ) - :ref:`EmissionShape` **get_emission_shape**\ (\ ) Se emitirán partículas dentro de esta región. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emission_sphere_radius: .. rst-class:: classref-property :ref:`float` **emission_sphere_radius** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission_sphere_radius**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_emission_sphere_radius**\ (\ ) El radio de la esfera si :ref:`emission_shape` se fija en :ref:`EMISSION_SHAPE_SPHERE`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_emitting: .. rst-class:: classref-property :ref:`bool` **emitting** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emitting**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_emitting**\ (\ ) Si es ``true``, se están emitiendo partículas. :ref:`emitting` se puede usar para iniciar y detener la emisión de partículas. Sin embargo, si :ref:`one_shot` es ``true``, establecer :ref:`emitting` como ``true`` no reiniciará el ciclo de emisión hasta que todas las partículas activas terminen de procesarse. Puedes usar la señal :ref:`finished` para recibir una notificación cuando todas las partículas activas terminen de procesarse. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_explosiveness: .. rst-class:: classref-property :ref:`float` **explosiveness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_explosiveness_ratio**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_explosiveness_ratio**\ (\ ) La rapidez con la que se emiten las partículas en un ciclo de emisión. Si es mayor que ``0``, habrá una espacio de tiempo en las emisiones antes de que comience el siguiente ciclo. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_fixed_fps: .. rst-class:: classref-property :ref:`int` **fixed_fps** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fixed_fps**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_fixed_fps**\ (\ ) La velocidad de fotogramas del sistema de partículas se fija a un valor. Por ejemplo, cambiar el valor a 2 hará que las partículas se rendericen a 2 fotogramas por segundo. Ten en cuenta que esto no ralentiza la simulación del sistema de partículas en sí. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_fract_delta: .. rst-class:: classref-property :ref:`bool` **fract_delta** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fractional_delta**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_fractional_delta**\ (\ ) Si es ``true``, resulta en un cálculo delta fraccionario que tiene un efecto de visualización de partículas más suave. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_gravity: .. rst-class:: classref-property :ref:`Vector2` **gravity** = ``Vector2(0, 980)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_gravity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_gravity**\ (\ ) La gravedad aplicada a cada partícula. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_hue_variation_curve: .. rst-class:: classref-property :ref:`Curve` **hue_variation_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| El tono de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_hue_variation_max: .. rst-class:: classref-property :ref:`float` **hue_variation_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Variación máxima inicial de tono aplicada a cada partícula. Desplazará el tono del color de la partícula. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_hue_variation_min: .. rst-class:: classref-property :ref:`float` **hue_variation_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`hue_variation_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_initial_velocity_max: .. rst-class:: classref-property :ref:`float` **initial_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Magnitud máxima de la velocidad inicial para cada partícula. La dirección viene de :ref:`direction` y :ref:`spread`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_initial_velocity_min: .. rst-class:: classref-property :ref:`float` **initial_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`initial_velocity_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_lifetime: .. rst-class:: classref-property :ref:`float` **lifetime** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_lifetime**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_lifetime**\ (\ ) Cantidad de tiempo que cada partícula existirá. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_lifetime_randomness: .. rst-class:: classref-property :ref:`float` **lifetime_randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_lifetime_randomness**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_lifetime_randomness**\ (\ ) El ratio de aleatoriedad del tiempo de vida de las partículas. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_linear_accel_curve: .. rst-class:: classref-property :ref:`Curve` **linear_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La aceleración lineal de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_linear_accel_max: .. rst-class:: classref-property :ref:`float` **linear_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Aceleración lineal máxima aplicada a cada partícula en la dirección del movimiento. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_linear_accel_min: .. rst-class:: classref-property :ref:`float` **linear_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`linear_accel_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_local_coords: .. rst-class:: classref-property :ref:`bool` **local_coords** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_local_coordinates**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_local_coordinates**\ (\ ) Si es ``true``, las partículas usan el espacio de coordenadas del nodo padre (conocido como coordenadas locales). Esto hará que las partículas se muevan y giren junto con el nodo **CPUParticles2D** (y sus padres) cuando este se mueva o gire. Si es ``false``, las partículas usan coordenadas globales; no se moverán ni girarán junto con el nodo **CPUParticles2D** (y sus padres) cuando este se mueva o gire. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_one_shot: .. rst-class:: classref-property :ref:`bool` **one_shot** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_one_shot**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_one_shot**\ (\ ) Si es ``true``, sólo se produce un ciclo de emisión. Si se establece ``true`` durante un ciclo, la emisión se detendrá al final del ciclo. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_orbit_velocity_curve: .. rst-class:: classref-property :ref:`Curve` **orbit_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La velocidad orbital de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_orbit_velocity_max: .. rst-class:: classref-property :ref:`float` **orbit_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Velocidad orbital máxima aplicada a cada partícula. Hace que las partículas giren alrededor del origen. Se especifica en número de rotaciones completas alrededor del origen por segundo. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_orbit_velocity_min: .. rst-class:: classref-property :ref:`float` **orbit_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`orbit_velocity_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_particle_flag_align_y: .. rst-class:: classref-property :ref:`bool` **particle_flag_align_y** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) - :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| Alinea el eje Y de la partícula con la dirección de su velocidad. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_preprocess: .. rst-class:: classref-property :ref:`float` **preprocess** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_pre_process_time**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_pre_process_time**\ (\ ) El sistema de partículas se inicia como si ya hubiera funcionado durante este número de segundos. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_radial_accel_curve: .. rst-class:: classref-property :ref:`Curve` **radial_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La aceleración radial de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_radial_accel_max: .. rst-class:: classref-property :ref:`float` **radial_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Aceleración radial máxima aplicada a cada partícula. Hace que la partícula se acelere alejándose del origen o hacia él si es negativa. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_radial_accel_min: .. rst-class:: classref-property :ref:`float` **radial_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`radial_accel_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_randomness: .. rst-class:: classref-property :ref:`float` **randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_randomness_ratio**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_randomness_ratio**\ (\ ) Proporción de aleatoriedad de la vida útil de las emisiones. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_scale_amount_curve: .. rst-class:: classref-property :ref:`Curve` **scale_amount_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La escala de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_scale_amount_max: .. rst-class:: classref-property :ref:`float` **scale_amount_max** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Escala inicial máxima aplicada a cada partícula. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_scale_amount_min: .. rst-class:: classref-property :ref:`float` **scale_amount_min** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`scale_amount_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_scale_curve_x: .. rst-class:: classref-property :ref:`Curve` **scale_curve_x** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_scale_curve_x**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_scale_curve_x**\ (\ ) La escala horizontal de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. \ :ref:`split_scale` debe estar habilitado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_scale_curve_y: .. rst-class:: classref-property :ref:`Curve` **scale_curve_y** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_scale_curve_y**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_scale_curve_y**\ (\ ) La escala vertical de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. \ :ref:`split_scale` debe estar habilitado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_seed: .. rst-class:: classref-property :ref:`int` **seed** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_seed**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_seed**\ (\ ) Establece la semilla aleatoria utilizada por el sistema de partículas. Solo es efectivo si :ref:`use_fixed_seed` es ``true``. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_speed_scale: .. rst-class:: classref-property :ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_speed_scale**\ (\ ) El sistema de partículas está funcionando a una velocidad de escalada. Un valor de ``0`` puede ser usado para pausar las partículas. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_split_scale: .. rst-class:: classref-property :ref:`bool` **split_scale** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_split_scale**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_split_scale**\ (\ ) Si es ``true``, la curva de escala se dividirá en componentes x e y. Véase :ref:`scale_curve_x` y :ref:`scale_curve_y`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_spread: .. rst-class:: classref-property :ref:`float` **spread** = ``45.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_spread**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_spread**\ (\ ) La dirección inicial de cada partícula va desde ``+spread`` hasta ``-spread`` grados. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_tangential_accel_curve: .. rst-class:: classref-property :ref:`Curve` **tangential_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| La aceleración tangencial de cada partícula variará a lo largo de esta :ref:`Curve`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_tangential_accel_max: .. rst-class:: classref-property :ref:`float` **tangential_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Aceleración tangencial máxima aplicada a cada partícula. La aceleración tangencial es perpendicular a la velocidad de la partícula, lo que les da a las partículas un movimiento de remolino. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_tangential_accel_min: .. rst-class:: classref-property :ref:`float` **tangential_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) - :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Equivalente mínimo de :ref:`tangential_accel_max`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_texture: .. rst-class:: classref-property :ref:`Texture2D` **texture** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_texture**\ (\ ) La textura de las partículas. Si ``null``, las partículas serán cuadradas. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_use_fixed_seed: .. rst-class:: classref-property :ref:`bool` **use_fixed_seed** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_fixed_seed**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_fixed_seed**\ (\ ) Si es ``true``, las partículas usarán la misma semilla para cada simulación utilizando la semilla definida en :ref:`seed`. Esto es útil para situaciones en las que el resultado visual debe ser consistente en las repeticiones, por ejemplo, cuando se utiliza el modo Movie Maker. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descripciones de Métodos ------------------------------------------------ .. _class_CPUParticles2D_method_convert_from_particles: .. rst-class:: classref-method |void| **convert_from_particles**\ (\ particles\: :ref:`Node`\ ) :ref:`🔗` Establece las propiedades de este nodo para que coincidan con un nodo :ref:`GPUParticles2D` determinado con un :ref:`ParticleProcessMaterial` asignado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_get_param_curve: .. rst-class:: classref-method :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Devuelve la :ref:`Curve` del parámetro especificado por :ref:`Parameter`. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_get_param_max: .. rst-class:: classref-method :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Devuelve el rango de valores máximo para el parámetro dado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_get_param_min: .. rst-class:: classref-method :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Devuelve el rango de valores mínimo para el parámetro dado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_get_particle_flag: .. rst-class:: classref-method :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` Devuelve el estado habilitado de la bandera de partícula dada. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_request_particles_process: .. rst-class:: classref-method |void| **request_particles_process**\ (\ process_time\: :ref:`float`\ ) :ref:`🔗` Solicita a las partículas que se procesen durante un tiempo adicional durante un solo fotograma. Útil para la reproducción de partículas si se usa en combinación con :ref:`use_fixed_seed` o al llamar a :ref:`restart()` con el parámetro ``keep_seed`` establecido en ``true``. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_restart: .. rst-class:: classref-method |void| **restart**\ (\ keep_seed\: :ref:`bool` = false\ ) :ref:`🔗` Reinicia el emisor de partículas. Si ``keep_seed`` es ``true``, se conservará la semilla aleatoria actual. Útil para búsquedas y reproducción. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_set_param_curve: .. rst-class:: classref-method |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) :ref:`🔗` Establece la :ref:`Curve` del parámetro especificado por :ref:`Parameter`. Debe ser una :ref:`Curve` unitaria. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_set_param_max: .. rst-class:: classref-method |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Establece el valor máximo para el parámetro dado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_set_param_min: .. rst-class:: classref-method |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Establece el valor mínimo para el parámetro dado. .. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_method_set_particle_flag: .. rst-class:: classref-method |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` Habilita o deshabilita la bandera dada. .. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)` .. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)` .. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)` .. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)` .. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)` .. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)` .. |void| replace:: :abbr:`void (Sin valor de retorno.)`