Render material asset type support

This commit is contained in:
Casper Warden
2023-11-09 19:06:55 +00:00
parent 406b3adce5
commit 6c8273ea5e
4 changed files with 14 additions and 4 deletions

View File

@@ -11,8 +11,8 @@ import { Logger } from './Logger';
import { GlobalPosition } from './public/interfaces/GlobalPosition';
import { Quaternion } from './Quaternion';
import { Vector3 } from './Vector3';
import Timeout = NodeJS.Timeout;
import * as crypto from 'crypto';
import Timeout = NodeJS.Timeout;
export class Utils
{
@@ -189,6 +189,8 @@ export class Utils
return 'person';
case InventoryType.Settings:
return 'settings';
case InventoryType.Material:
return 'material';
default:
console.error('Unknown inventory type: ' + InventoryType[type]);
return 'texture';
@@ -233,6 +235,8 @@ export class Utils
return AssetType.Widget;
case HTTPAssets.ASSET_PERSON:
return AssetType.Person;
case HTTPAssets.ASSET_MATERIAL:
return AssetType.Material;
default:
return 0;
}
@@ -276,6 +280,8 @@ export class Utils
return HTTPAssets.ASSET_PERSON;
case AssetType.Widget:
return HTTPAssets.ASSET_WIDGET;
case AssetType.Material:
return HTTPAssets.ASSET_MATERIAL;
default:
return HTTPAssets.ASSET_TEXTURE;
}
@@ -314,6 +320,8 @@ export class Utils
return InventoryType.Wearable;
case HTTPAssets.ASSET_MESH:
return InventoryType.Mesh;
case HTTPAssets.ASSET_MATERIAL:
return InventoryType.Material;
default:
return 0;
}

View File

@@ -28,5 +28,6 @@ export enum AssetType
Widget = 40,
Person = 46,
Mesh = 49,
Settings = 56
Settings = 56,
Material = 57
}

View File

@@ -22,5 +22,6 @@ export enum InventoryType
Mesh = 22,
Widget = 23,
Person = 24,
Settings = 25
Settings = 25,
Material = 26,
}