AssetChannelMessageType

View source

Labels the reference-count operation carried by an AssetChannelMessage.

AssetChannel writes one of these labels into each queued message. Acquire has the numeric value 0, and Release has the numeric value 1.

Examples

import { AssetChannel, AssetChannelMessageType } from '@wimaengine/asset'

const assetId = 17
const channel = new AssetChannel()
channel.acquire(assetId)
const [message] = channel.flush()
console.log(message.type === AssetChannelMessageType.Acquire) // true

Variants


Acquire

View source

Identifies an acquire operation for one reference.

The numeric value is 0.

Release

View source

Identifies a release operation for one reference.

The numeric value is 1.