Skip to content

World - Particles Module

anvil.api.world.particles

Particle

Bases: AddonObject

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(particle, component)

Create a particle with optional PBR texture set support.

Parameters:

Name Type Description Default
particle str

Name of the particle.

required
component TextureComponents

Texture components configuration for PBR.

required

content(content)

Sets the content of the addon object and returns the object.

Parameters:

Name Type Description Default
content any

The content to be set for the addon object.

required

Returns:

Name Type Description
self 'AddonObject'

The instance of the current AddonObject.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

Usage Example

from anvil.api.world.particles import Particle
from anvil.api.pbr.texture_set import TextureComponents

# Define a particle using a texture from assets/textures/particles
Particle(
    "my_particle",
    TextureComponents(color="my_particle_texture")
).queue()