Instantiate a new instance of DroppedAsset class.
Optional
options: DroppedAssetOptionalInterfaceReturns a new DroppedAsset object.
Drops an asset in a world and returns a new instance of DroppedAsset class with all properties.
Returns a new DroppedAsset object with all properties.
const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
const droppedAssetInstance = await DroppedAsset.get(assetInstance, {
assetScale: 1.5,
flipped: true,
layer0: "",
layer1: "https://pathtoimage.png",
interactivePublicKey,
isInteractive: true,
position: { x: 0, y: 0 },
uniqueName: "exampleUniqueName",
urlSlug,
});
Instantiate a new instance of DroppedAsset class and retrieve all properties.
Optional
options: DroppedAssetOptionalInterfaceReturns a new DroppedAsset object with all properties.
Searches dropped assets within a world by a provide uniqueName
. If a single match is found, a new instance of DroppedAsset class is returned all properties.
Returns a new DroppedAsset object with all properties.
Example