This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mixed-reality-extension-sdk/packages/sdk/src/internal/payloads/assets.ts
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59 lines (50 sloc)
1.2 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Copyright (c) Microsoft Corporation. All rights reserved. | |
* Licensed under the MIT License. | |
*/ | |
import { CreateActorCommon, Payload } from '.'; | |
import { AssetLike, AssetSource, ColliderType, CollisionLayer, Guid } from '../..'; | |
export type CreateColliderType = ColliderType | 'none'; | |
/** @hidden */ | |
export type AssetPayloadType | |
= 'assets-loaded' | |
| 'asset-update' | |
| 'create-asset' | |
| 'create-from-prefab' | |
| 'load-assets' | |
| 'unload-assets'; | |
/** @hidden */ | |
export type LoadAssets = Payload & { | |
type: 'load-assets'; | |
containerId: Guid; | |
source: AssetSource; | |
colliderType: CreateColliderType; | |
}; | |
/** @hidden */ | |
export type CreateAsset = Payload & { | |
type: 'create-asset'; | |
containerId: Guid; | |
definition: AssetLike; | |
}; | |
/** @hidden */ | |
export type AssetsLoaded = Payload & { | |
type: 'assets-loaded'; | |
assets: AssetLike[]; | |
failureMessage: string; | |
}; | |
/** @hidden */ | |
export type AssetUpdate = Payload & { | |
type: 'asset-update'; | |
asset: Partial<AssetLike>; | |
}; | |
/** @hidden */ | |
export type CreateFromPrefab = CreateActorCommon & { | |
type: 'create-from-prefab'; | |
prefabId: Guid; | |
collisionLayer?: CollisionLayer; | |
}; | |
/** @hidden */ | |
export type UnloadAssets = Payload & { | |
type: 'unload-assets'; | |
containerId: Guid; | |
}; |