SoundItem class

extends BaseItem

Spatial representation of a Sound placed in a Scene.

Sounds that are played with a sound item have a 3D radius which defines the area in which the sound can be heard. The further the active camera is away from the SoundItem, the lower the volume.

Methods

add(self, obj: BaseItem) -> None

Inherited from BaseItem.

Adds a child to this item.

copy(self) -> BaseItem

Inherited from BaseItem.

Creates a copy of this item.

delete(self) -> None

Inherited from BaseItem.

Irreversibly removes this item from the scene.

delete_children(self) -> None

Inherited from BaseItem.

Deletes all children of this item.

get_property(self, key: str) -> str

Inherited from BaseItem.

Gets a custom property from this object. Returns null if the property can not be found.

get_slot(self, name: str) -> Slot

Inherited from BaseItem.

Returns Slot by name.

is_playing(self) -> bool

Returns true if the sound of this SoundItem is currently playing

on_collision_enter(self, handler: Callable[[t: BaseItem], None]) -> None

Inherited from BaseItem.

Handles the start of a collision between this item and another item.

on_collision_exit(self, handler: Callable[[t: BaseItem], None]) -> None

Inherited from BaseItem.

Handles the end of a collision between this item and another item.

on_property_changed(self, id: str, handler: Callable[[t: str], None]) -> None

Inherited from BaseItem.

Handles property value changes in this object.

pause(self) -> None

Pauses playback of the Sound in this item.

play(self) -> None

Plays the Sound of this item.

play(self, looping: bool) -> None

Plays the Sound of this item.

remove_from_parent(self) -> None

Inherited from BaseItem.

Removes this item from its parent-item, disconnecting all inherited Transform settings.

set_property(self, key: str, value: object) -> None

Inherited from BaseItem.

Sets a custom property to this object.

stop(self) -> None

Stops playback of the Sound in this item.

Properties

active bool

Inherited from BaseItem.

Defines this item's active state.

ambient_volume float

Defines distance-independent volume of this SoundItem.

readonly animated bool

Inherited from BaseItem.

Returns true if this item has animation tracks.

readonly center Vector3

Inherited from BaseItem.

Returns the center point of this item.

readonly children ItemCollection

Inherited from BaseItem.

Returns all first-level hierarchy children of this item.

color Color

Inherited from BaseItem.

Defines color of this item.

current_position float

Defines the track position of the Sound in this item.

readonly duration float
readonly id str

Inherited from BaseItem.

The unique id of this item.

inputobject

Inherited from BaseItem.

looping bool

Toggles Sound looping. If true, the sound plays indefinitely.

name str

Inherited from BaseItem.

Name of this item displayed in their name tag and in the item hierarchy.

name_visible bool

Inherited from BaseItem.

Toggles visibility of the item name tag.

opacity float

Inherited from BaseItem.

Normalized opacity of this item.

readonly parent BaseItem

Inherited from BaseItem.

Returns the parent of this item.

physicsobject

Inherited from BaseItem.

radius float

Defines the maximum distance from which the Sound of this item can be heard.

readonly relative_transform Transform

Inherited from BaseItem.

The relative Transform of this item in local space.

speech Union[str, float]

Inherited from BaseItem.

Defines the text in the speech-bubble of this item.

thought Union[str, float]

Inherited from BaseItem.

Defines the text in the thought-bubble of this item.

readonly transform Transform

Inherited from BaseItem.

The Transform of this item in world space.

transitionobject

Inherited from BaseItem.

visible bool

Inherited from BaseItem.

This API is deprecated

volume float

This API is deprecated

Defines the normalized volume of the Sound in this item. Volume value is clamped to range [0,1]