World - Particles Module
anvil.api.world.particles
Particle effects, loaded from the project's assets/particles into a typed document.
Documentation reference
Particle
Bases: JsonFile[_ParticleDocument]
identifier
property
The file's identifier.
name
property
The identifier's name, without its namespace.
__init__(particle, *, color, normal=None, height=None, mer=None, mers=None)
A particle of the project, with its texture in assets/particles and its PBR
maps. Each map is the name of an image in the same folder, or a color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particle
|
str
|
Name of the particle. |
required |
color
|
str
|
The texture's file name, without |
required |
normal
|
optional
|
The normal map. Not with |
None
|
height
|
optional
|
The height map. Not with |
None
|
mer
|
optional
|
The metalness, emissive and roughness map. Not with |
None
|
mers
|
optional
|
The MER map with subsurface scattering. Not with |
None
|
__schema__()
classmethod
The JSON Schema (draft 2020-12) of this file: the schema of its _document_type, with
the file's type as title and where it is written under x-anvil-file.
Raises:
| Type | Description |
|---|---|
TypeError
|
When the class is an abstract file base, with no document type. |