Skip to content

editorGlobalsZipInterface

Class: ZipInterface

Offers functionality to load/save assets from/to .zip (or .kyub) files

Hierarchy

  • ZipInterface

Index

Properties

Methods

Properties

Static Private assemblyFolderRegex

assemblyFolderRegex: RegExp‹› = /assemblies\/(.*)\//

Defined in src/assets/ZipInterface.ts:11

Methods

Static Private _addDbEntry

_addDbEntry(asset: any, zipFile: JsZip): void

Defined in src/assets/ZipInterface.ts:60

Parameters:

Name Type
asset any
zipFile JsZip

Returns: void


Static Private _addMetadata

_addMetadata(asset: any, zipFile: JsZip): void

Defined in src/assets/ZipInterface.ts:191

Parameters:

Name Type
asset any
zipFile JsZip

Returns: void


Static Private _addResource

_addResource(resource: any, zipFile: JsZip): void

Defined in src/assets/ZipInterface.ts:107

Parameters:

Name Type
resource any
zipFile JsZip

Returns: void


Static Private _parseAssemblies

_parseAssemblies(assetBuilder: any, zipFile: JsZip): Promise‹any[]›

Defined in src/assets/ZipInterface.ts:150

This is only needed for legacy files, that use assemblies instead of regular resources.

Parameters:

Name Type Description
assetBuilder any -
zipFile JsZip -

Returns: Promise‹any[]›


Static Private _parseResources

_parseResources(assetBuilder: any, zipFile: JsZip): Promise‹any[]›

Defined in src/assets/ZipInterface.ts:165

Parameters:

Name Type
assetBuilder any
zipFile JsZip

Returns: Promise‹any[]›


Static Private _parseZipFolder

_parseZipFolder(zipFolder: JsZip): Promise‹object›

Defined in src/assets/ZipInterface.ts:119

Parameters:

Name Type
zipFolder JsZip

Returns: Promise‹object›


Static Private _readOutDbEntry

_readOutDbEntry(assetBuilder: any, zipFile: JsZip): Promise‹void›

Defined in src/assets/ZipInterface.ts:65

Parameters:

Name Type
assetBuilder any
zipFile JsZip

Returns: Promise‹void›


Static Private _readOutMetadata

_readOutMetadata(assetBuilder: any, zipFile: JsZip): Promise‹void›

Defined in src/assets/ZipInterface.ts:86

Parameters:

Name Type
assetBuilder any
zipFile JsZip

Returns: Promise‹void›


Static deserialize

deserialize(blob: any): Promise‹any›

Defined in src/assets/ZipInterface.ts:46

Parameters:

Name Type
blob any

Returns: Promise‹any›


Static serialize

serialize(asset: any): Promise‹Blob | Buffer‹››

Defined in src/assets/ZipInterface.ts:17

Parameters:

Name Type Description
asset any asset to be serialized

Returns: Promise‹Blob | Buffer‹››

promise that resolves with a binary blob of the zip file