Methods
# addToRecent(project)
Add project to recent list
Parameters:
Name | Type | Description |
---|---|---|
project |
ProjectConfig
|
Project to add |
# compress(text) → {Uint8Array}
Simple compression using RLE (Run Length Encoding)
Parameters:
Name | Type | Description |
---|---|---|
text |
string
|
Text to compress |
Compressed data
Uint8Array
# createProject(name, options) → {ProjectConfig}
Create new project
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
string
|
New Project | Project name |
options |
Object
|
Project options |
New project
ProjectConfig
# decompress(compressed) → {string}
Decompress RLE data
Parameters:
Name | Type | Description |
---|---|---|
compressed |
Uint8Array
|
Compressed data |
Decompressed text
string
# detectFormat(file) → {string}
Detect file format
Parameters:
Name | Type | Description |
---|---|---|
file |
File
|
File to analyze |
Detected format
string
# async exportCompressed(project) → {Blob}
Export to compressed format
Parameters:
Name | Type | Description |
---|---|---|
project |
ProjectConfig
|
Project to export |
Compressed blob
Blob
# async exportJSON(project) → {Blob}
Export to JSON format
Parameters:
Name | Type | Description |
---|---|---|
project |
ProjectConfig
|
Project to export |
JSON blob
Blob
# async exportLegacy(project) → {Blob}
Export to legacy format
Parameters:
Name | Type | Description |
---|---|---|
project |
ProjectConfig
|
Project to export |
Legacy format blob
Blob
# async exportProject(format, project) → {Blob}
Export project to file
Parameters:
Name | Type | Default | Description |
---|---|---|---|
format |
string
|
json | Export format |
project |
ProjectConfig
|
Project to export |
Exported data
Blob
# async exportTemplate(project) → {Blob}
Export as template
Parameters:
Name | Type | Description |
---|---|---|
project |
ProjectConfig
|
Project to export |
Template blob
Blob
# getAnimationTypeStats(projects) → {Object}
Get animation type statistics
Parameters:
Name | Type | Description |
---|---|---|
projects |
Array
|
Projects array |
Animation type stats
Object
# getProjectInfo(name) → {Object}
Get project info
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Project name |
Project info
Object
# getThemeStats(projects) → {Object}
Get theme statistics
Parameters:
Name | Type | Description |
---|---|---|
projects |
Array
|
Projects array |
Theme stats
Object
# async importCompressed(file) → {ProjectConfig}
Import from compressed format
Parameters:
Name | Type | Description |
---|---|---|
file |
File
|
Blob
|
File to import |
Imported project
ProjectConfig
# async importJSON(file) → {ProjectConfig}
Import from JSON format
Parameters:
Name | Type | Description |
---|---|---|
file |
File
|
Blob
|
File to import |
Imported project
ProjectConfig
# async importLegacy(file) → {ProjectConfig}
Import from legacy format
Parameters:
Name | Type | Description |
---|---|---|
file |
File
|
Blob
|
File to import |
Imported project
ProjectConfig
# async importProject(file, format) → {ProjectConfig}
Import project from file
Parameters:
Name | Type | Default | Description |
---|---|---|---|
file |
File
|
Blob
|
File to import |
|
format |
string
|
null | Import format (auto-detected if not provided) |
Imported project
ProjectConfig
# async importTemplate(file) → {ProjectConfig}
Import template
Parameters:
Name | Type | Description |
---|---|---|
file |
File
|
Blob
|
File to import |
Imported project
ProjectConfig
# initializeFormats()
Initialize export/import formats
# loadProject(name) → {ProjectConfig}
Load project
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Project name |
Loaded project
ProjectConfig
# saveProjectAs(newName)
Save project as new name
Parameters:
Name | Type | Description |
---|---|---|
newName |
string
|
New project name |
# searchProjects(query) → {Array}
Search projects
Parameters:
Name | Type | Description |
---|---|---|
query |
string
|
Search query |
Matching projects
Array