Skip to content

World - Fog Module

anvil.api.world.fog

Fog

Bases: AddonObject

A class representing a Fog.

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__(name, is_vanilla=False)

Initializes a Fog instance.

Parameters:

Name Type Description Default
name str

The name of the fog.

required
is_vanilla bool

Whether the fog is a vanilla fog. Defaults to False.

False

add_distance_location(camera_location=FogCameraLocation.Air)

Adds a distance location to the fog.

Parameters:

Name Type Description Default
camera_location FogCameraLocation

The camera location of the fog. Defaults to FogCameraLocation.Air.

Air

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.

do_not_shorten()

Setter property that disables shortening of dict when exporting.

queue()

Queues the fog to be exported.