Gorilla.AssetsManager

Unit Gorilla.AssetsManager.pas

The AssetsManager is the core component in effective media management inside your Gorilla3D application. Models, textures, audio and so on will be cached for faster access and reusage. You can build packages within the AssetsManager for modular media management. For example: you could build a package for the main character and reference to it in every scene package. Scene packages are extremly useful for compact and fast loading of all data of a specific scene.

Classes

Enumerations

  • enum  TGorillaLevelOfDetail  = ( LowQuality, MediumQuality, HighQuality, ExcellentQuality ) ;
  • enum  TGorillaPackageEvent  = ( PackageModified, PackageInitialize, PackageClear, PackageName, PackageLoad, PackageAssign, GroupsModified, GroupAssign, GroupAdd, GroupRemove, GroupClear, AssetsModified, AssetAdd, AssetRemove, AssetClear ) ;

Constants

  • const GORILLA_ASSETS_MODEL : Integer = $0;
  • const GORILLA_ASSETS_TEXTURE : Integer = $1;
  • const GORILLA_ASSETS_AUDIO : Integer = $2;
  • const GORILLA_ASSETS_VIDEO : Integer = $3;
  • const GORILLA_ASSETS_MISC : Integer = $4;
  • const GORILLA_ASSETS_DIALOGUE : Integer = $5;
  • const GORILLA_ASSETS_INVENTORY : Integer = $6;
  • const GORILLA_ASSETS_SCRIPT : Integer = $7;
  • const GORILLA_ASSETS_PREFAB : Integer = $8;
  • const GORILLA_ASSETS_SKILLS : Integer = $9;
  • const GORILLA_ASSETS_MODEL_DESCR : string = "MODEL";
  • const GORILLA_ASSETS_TEXTURE_DESCR : string = "TEXTURE";
  • const GORILLA_ASSETS_AUDIO_DESCR : string = "AUDIO";
  • const GORILLA_ASSETS_VIDEO_DESCR : string = "VIDEO";
  • const GORILLA_ASSETS_MISC_DESCR : string = "MISC";
  • const GORILLA_ASSETS_DIALOGUE_DESCR : string = "DIALOGUE";
  • const GORILLA_ASSETS_INVENTORY_DESCR : string = "INVENTORY";
  • const GORILLA_ASSETS_SCRIPT_DESCR : string = "SCRIPT";
  • const GORILLA_ASSETS_PREFAB_DESCR : string = "PREFAB";
  • const GORILLA_ASSETS_SKILLS_DESCR : string = "SKILLS";
  • const GORILLA_PACKAGE_DEFAULT : string = "default";
  • const GORILLA_PACKAGE_VERSION : string = "1.2";
  • const GORILLA_ASSETCLASS_MAP : array[0..9] of TGorillaAssetClass = ;

Mics. types

  • type TGorillaAssetGroupId = integer;
  • type TGorillaAssetClass = class of TGorillaAsset;

TGorillaLevelOfDetail

enum TGorillaLevelOfDetail = ( LowQuality, MediumQuality, HighQuality, ExcellentQuality ) ;

The level of detail enumerator describes the rendering quality of assets. This could affect textures and models and will increase performance.

Remarks

This enumerator is implemented for future functionality and not operational yet!

TGorillaAsset

Basic asset class. Every texture, model, audio-file, ... is based on this class inside the AssetsManager

Ancestors

Members

Fields

Methods

Properties

TGorillaTextureAsset

Textures are cached as FMX.Graphics.TBitmap.

Remarks

Files with extension *.bmp, *.jpg, *.jpeg, *.dds, *.gif, *.png, *.tif, *.tiff, *.tga are mapped to this assset type.

AssetsManager itself stores all image data as PNG inside of the package.

Ancestors

Members

Fields

Methods

Properties

TGorillaModelAsset

Models are cached as Gorilla.DefTypes.TModelDef structure. When storing packages, models will be saved as G3D models.

Remarks

Files with extension *.obj, *.g3d, *.dae, *.fbx, *.gltf, *.stl, *.x3d, *.x3dvz, *.x3dz, *.babylon, *.ply, *.skp are mapped to this asset type.

AssetsManager stores all model format types as *.g3d format inside of the package when saved. But it keeps the file extension to allow reloading.

Ancestors

Members

Fields

Methods

Properties

TGorillaVideoAsset

Store and load video files to the package archive.

Remarks

Files with extension *.mp4, *.mpg and *.mpeg are mapped to this asset type.

Ancestors

Members

TGorillaMiscAsset

This is multi type asset used for user specific data.

Remarks

Files with extension *.txt, *.json, *.xml, *.pdf are mapped to this asset type.

Ancestors

Members

TGorillaDialogueAsset

Store and load assets containing a dialogue system.

Remarks

Files with extension *.dia or *.dlg are mapped to this asset type.

Ancestors

Members

TGorillaInventoryAsset

Store and load assets containing an inventory declaration.

Remarks

Files with extension *.iff are mapped to this asset type.

Ancestors

Members

TGorillaSkillsAsset

Store and load assets containing an skillsystem declaration.

Remarks

Files with extension *.ssf are mapped to this asset type.

Ancestors

Members

TGorillaScriptAsset

Store and load assets containing a script.

Remarks

Files with extension *.pas are mapped to this asset type.

Ancestors

Members

TGorillaPrefabAsset

Store and load assets containing a prefab.

Remarks

Files with extension *.prefab are mapped to this asset type.

Ancestors

Members

TGorillaAssetsGroup

An assets group is a category for media types, like: textures, models, audio, ...

Ancestors

Members

Fields

Methods

Properties

TGorillaAssetsGroupCollection

Ancestors

Members

Properties

TGorillaArchiveReference

Its difficult to keep an archive opened through design time, because IDE destroys components itself and keeps components for some reason. Therefore we have manage archives globally to prevent from duplicated access, which destroys the archive.

Ancestors

Members

Fields

Methods

Properties

TGorillaAssetsPackage

Defining an asset package which stores media files inside of a zip packed file or stream. A package is very useful to reuse assets and pack assets together for easier rollout.

Ancestors

Members

Fields

Methods

Properties

TGorillaAssetsManager

The AssetsManager is central access point to all of your media data. Use packages and groups to organize your data.

Ancestors

Members

Fields

Methods

Properties