Skip to content

Glossary: APIs

ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Jan 10, 2025 · 86 revisions

• assetify.isLoaded - shared

Verifies whether the library's assets are downloaded and loaded.

local bool: state = assetify.isLoaded()

• assetify.isModuleLoaded - shared

Verifies whether the library's modules are downloaded and loaded.

local bool: state = assetify.isModuleLoaded()

• assetify.getSerial - shared

Retrieves Assetify's serial.

local ~: serial = assetify.getSerial()

• assetify.getVersion - shared

Retrieves Assetify's version.

local ~: version = assetify.getVersion()

• assetify.getWebserver - shared

Retrieves Assetify's webserver URL.

local ~: webserver = assetify.getWebserver()

• assetify.getAssets - shared

Fetches list containing valid assets within specified pack.

local table: packAssets = assetify.getAssets(
  string: assetType
)

• assetify.getAsset - shared

Fetches valid asset's datas.

local table: cAsset, table: cData = assetify.getAsset(
  string: assetType,
  string: assetName
)

• assetify.getAssetDep - shared

Fetches loaded asset's dependency.

local ~: cDep = assetify.getAssetDep(
  string: assetType,
  string: assetName,
  string: depType,
  ~: depIndex,
  ~: depSubIndex --(Optional)
)

• assetify.getDownloadProgress - client

Retrieves library/asset's download progress.

--Syntax 1: Retrieves overall library's overall progress
local float: cDownloaded, float: cBandwidth, float: cProgress, float: cETA = assetify.getDownloadProgress()

--Syntax 2: Retrieves specifically an asset's progress
local float: cDownloaded, float: cBandwidth, float: cProgress, float: cETA = assetify.getDownloadProgress(
  string: assetType,
  string: assetName
)

• assetify.isAssetLoaded - client

Fetches valid asset's load state.

local bool: state = assetify.isAssetLoaded(
  string: assetType,
  string: assetName
)

• assetify.getAssetID - client

Fetches loaded asset's model ID.

local int: modelID = assetify.getAssetID(
  string: assetType,
  string: assetName,
  string: assetClump
)

• assetify.loadAsset - client

Loads a valid unloaded asset.

local bool: result = assetify.loadAsset(
  string: assetType,
  string: assetName
)

• assetify.unloadAsset - client

Unloads a valid loaded asset.

local bool: result = assetify.unloadAsset(
  string: assetType,
  string: assetName
)

• assetify.loadModule - shared

Loads modules of a valid asset.

local bool: result = assetify.loadModule(
  string: assetName,
  table: moduleTypes
)

• assetify.loadAnim - client

Loads a valid animation asset on element.

local bool: result = assetify.loadAnim(
  element: element,
  string: assetName
)

• assetify.unloadAnim - client

Unloads a valid animation asset from element.

local bool: result = assetify.unloadAnim(
  element: element,
 string: assetName
)

• assetify.createShader - client

Creates a valid Assetify shader.

local shader: cShader = assetify.createShader(
  element: element, --(Optional)
  string: shaderCategory,
  string: shaderName,
  string: textureName, --Optional: Used only when isStandalone is not enabled
  table: shaderTextures,
  table: shaderInputs,
  table: rwCache,
  table: shaderMaps, --(Optional)
  int: shaderPriority, --(Optional)
  float: shaderDistance, --(Optional)
  bool: isStandalone --Optional: Enabling this prevents shader from being applied on world elements
)

• assetify.clearWorld - client

Clears native environment.

local bool: result = assetify.clearWorld()

• assetify.restoreWorld - client

Restores native environment.

local bool: result = assetify.restoreWorld()

• assetify.toggleOcclusions - client

Toggles native occlusions.

local bool: result = assetify.toggleOcclusions(
  bool: state
)

• assetify.clearModel - client

Clears model's buffer and dict.

local bool: result = assetify.clearModel(
  int: modelID
)

• assetify.restoreModel - client

Restores model's buffer and dict.

local bool: result = assetify.restoreModel(
  int: modelID
)

• assetify.playSound - client

Plays a valid sound asset.

local sound: cSound = assetify.playSound(
  string: assetName,
  string: soundCategory,
  int: soundIndex,
  float: soundVolume,
  bool: isScoped,
  bool: isLooped
)

• assetify.playSound3D - client

Plays a valid sound asset in 3D.

local sound: cSound = assetify.playSound3D(
  string: assetName,
  string: soundCategory,
  int: soundIndex,
  float: soundVolume,
  bool: isScoped,
  float: posX,
  float: posY,
  float: posZ,
  bool: isLooped
)

• assetify.setElementAsset - shared

Updates element's asset.

local bool: result = assetify.setElementAsset(
  element: element,
  string: assetType,
  string: assetName,
  string: assetClump, --(Optional)
  table: clumpMaps --(Optional)
)

• assetify.getElementAsset - shared

Retrieves element's asset.

local string: assetType, string: assetName, string: assetClump, table: clumpMaps = assetify.getElementAsset(
  element: element
)

• assetify.setElementAssetTone - shared

Updates element's asset's tone.
🚨 Applicable only on a valid clumped asset.

local bool: state = assetify.setElementAssetTone(
  element: element,
  string: assetType,
  string: assetName,
  string: textureName,
  table: tone: {
    number: brightness, --Range: 0 - 100
    number: contrast --Range: 0 - 100
  },
  bool: isBumpTone --Optional: Enabling this applies the specified tone on bump map if available
)

• assetify.getElementAssetTone - shared

Retrieves element's asset's tone.
🚨 Applicable only on a valid clumped asset.

local table: tone = assetify.getElementAssetTone(
  element: element,
  string: assetType,
  string: assetName,
  string: textureName,
  bool: isBumpTone --Optional: Enabling this retrieves the tone from bump map if available
)
Clone this wiki locally