SpriteParticleRenderer

from panda3d.physics import SpriteParticleRenderer
class SpriteParticleRenderer

Bases:

Bases: BaseParticleRenderer

Renders a particle system with high-speed nasty trick sprites.

Inheritance diagram

Inheritance diagram of SpriteParticleRenderer

__init__(copy: SpriteParticleRenderer)

copy constructor

__init__(tex: panda3d.core.Texture)

constructor

add_from_node(node_path: panda3d.core.NodePath, size_from_texels: bool, resize: bool)

This will allow the renderer to randomly choose from more than one texture or sequence at particle birth.

If resize is true, or if there are no textures currently on the renderer, it will force the renderer to use the size information from this node from now on. (Default is false)

add_from_node(node_path: panda3d.core.NodePath, model: str, node: str, size_from_texels: bool, resize: bool)

This will allow the renderer to randomly choose from more than one texture or sequence at particle birth.

If the source type is important, use this one.

model and node should lead to node_path like this: node_path = loader.loadModel(model).find(node)

If resize is true, or if there are no textures currently on the renderer, it will force the renderer to use the size information from this node from now on. (Default is false)

add_texture(tex: panda3d.core.Texture, texels_per_unit: float, resize: bool)

Adds texture to image pool, effectively creating a single frame animation that can be selected at particle birth. This should only be called after a previous call to set_texture().

get_alpha_blend_method() ParticleRendererBlendMethod
get_alpha_disable() bool
get_anim(n: int) SpriteAnim
get_anim_angle_flag() bool
get_animate_frames_enable() bool
get_animate_frames_index() int
get_animate_frames_rate() float
get_anims() list
get_color() panda3d.core.LColor
get_color_interpolation_manager() ColorInterpolationManager
get_final_x_scale() float
get_final_y_scale() float
get_height() float

Returns the height of each particle in world units.

get_initial_x_scale() float
get_initial_y_scale() float
get_last_anim() SpriteAnim
get_ll_uv() panda3d.core.LTexCoord

Returns the UV coordinate of the lower-left corner; see set_ll_uv().

get_ll_uv(anim: int, frame: int) panda3d.core.LTexCoord

Returns the UV coordinate of the lower-left corner; see set_ll_uv().

get_nonanimated_theta() float
get_num_anims() int
get_texture() panda3d.core.Texture
get_texture(anim: int, frame: int) panda3d.core.Texture
get_ur_uv() panda3d.core.LTexCoord

Returns the UV coordinate of the lower-left corner; see set_ur_uv().

get_ur_uv(anim: int, frame: int) panda3d.core.LTexCoord

Returns the UV coordinate of the upper-right corner; see set_ur_uv().

get_width() float

Returns the width of each particle in world units.

get_x_scale_flag() bool
get_y_scale_flag() bool
remove_animation(n: int)

Removes an animation texture set from the renderer.

set_alpha_blend_method(bm: ParticleRendererBlendMethod)
set_alpha_disable(ad: bool)
set_anim_angle_flag(animate_theta: bool)
set_animate_frames_enable(an: bool)
set_animate_frames_index(i: int)
set_animate_frames_rate(r: float)
set_color(color: panda3d.core.LColor)
set_final_x_scale(final_x_scale: float)
set_final_y_scale(final_y_scale: float)
set_from_node(node_path: panda3d.core.NodePath, size_from_texels: bool)

Sets the properties on this renderer from the geometry referenced by the indicated NodePath. This should be a reference to a GeomNode or a SequenceNode; it extracts out the texture and UV range from the node.

This will remove all previously added textures and animations. It will also resize the renderer to match this new geometry.

If node_path refers to a GeomNode(or has one beneath it) the texture, its size, and UV data will be extracted from that.

If node_path references a SequenceNode(or has one beneath it) with multiple GeomNodes beneath it, the size data will correspond only to the first GeomNode found with a valid texture, while the texture and UV information will be stored for each individual node.

If size_from_texels is true, the particle size is based on the number of texels in the source image; otherwise, it is based on the size of the first polygon found in the node.

model and node are the two items used to construct node_path. If the source type is important, use set_from_node(NodePath,string,string,bool) instead.

set_from_node(node_path: panda3d.core.NodePath, model: str, node: str, size_from_texels: bool)

If the source type is important, use this one.

model and node should lead to node_path like this: node_path = loader.loadModel(model).find(node)

This will remove all previously add textures and resize the renderer to match the new geometry.

set_initial_x_scale(initial_x_scale: float)
set_initial_y_scale(initial_y_scale: float)
set_ll_uv(ll_uv: panda3d.core.LTexCoord)

Sets the UV coordinate of the lower-left corner of all the sprites generated by this renderer. Normally this is (0, 0), but it might be set to something else to use only a portion of the texture.

set_ll_uv(ll_uv: panda3d.core.LTexCoord, anim: int, frame: int)

Sets the UV coordinate of the lower-left corner of all the sprites generated by this renderer. Normally this is (0, 0), but it might be set to something else to use only a portion of the texture.

set_nonanimated_theta(theta: float)
set_size(width: float, height: float)

Sets the size of each particle in world units.

set_texture(tex: panda3d.core.Texture, texels_per_unit: float)

Sets the renderer up to render the entire texture image. The scale of each particle is based on the size of the texture in each dimension, modified by texels_per_unit.

Used to set the size of the particles. Will clear all previously loaded textures and animations.

set_ur_uv(ur_uv: panda3d.core.LTexCoord)

Sets the UV coordinate of the upper-right corner of all the sprites generated by this renderer. Normally this is (1, 1), but it might be set to something else to use only a portion of the texture.

set_ur_uv(ur_uv: panda3d.core.LTexCoord, anim: int, frame: int)

Sets the UV coordinate of the upper-right corner of all the sprites generated by this renderer. Normally this is (1, 1), but it might be set to something else to use only a portion of the texture.

set_x_scale_flag(animate_x_ratio: bool)
set_y_scale_flag(animate_y_ratio: bool)