Asset manager
The Asset Manager subsystem provides functions to manage Teslasuit assets, such as loading, retrieving, and unloading assets.
Note. Since TsAssetManager is a member of the SDK, it cannot be used independently without an active Teslasuit device.
Class TsAssetManager#
Handles TESLASUIT asset management, including loading assets from paths or binary data, retrieving asset types, and unloading assets.
Class methods#
load_asset_from_path(self, path)#Loads an asset from a specified file path.
Args:
path (str): Path to the asset.
Returns:
TsAssetHandle: Handle to the loaded asset.
load_asset_from_data(self, data, size)#Loads an asset from binary data.
Args:
data (bytes): Binary data of the asset.size (int): Size of the binary data.
Returns:
TsAssetHandle: Handle to the loaded asset.
get_asset_type(self, asset_handle)#Retrieves the type of a loaded asset.
Args:
asset_handle (TsAssetHandle): Handle to the asset.
Returns:
TsAssetType: Type of the asset.
unload_asset(self, asset_handle)#Unloads a previously loaded asset.
Args:
asset_handle (TsAssetHandle): Handle to the asset.
What to read next#
Explore these references and guides to work with loaded haptic assets:
Essential API references#
- API: Python TS API: Access the asset manager through the
asset_managerattribute. - API: Core Data Structures — TsAssetType: Reference for the asset types returned by
get_asset_type(). - API: Haptic Subsystem: Play back the haptic assets you load.
Practical guides & examples#
- Play a haptic touch: See how haptic assets are loaded and played in practice.
Deeper dives & broader concepts#
- Teslasuit Main Concepts: Fundamental articles covering Teslasuit's core technology and how its subsystems interact.
