Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,940 changes: 1,649 additions & 1,291 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@
"main": "index.ts",
"dependencies": {
"bytebuffer": "^5.0.1",
"canvas": "^2.8.0",
"canvas": "^3.2.1",
"chalk": "^4.1.2",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"gifencoder": "^2.0.1",
"node-fetch": "^2.6.1",
"dotenv": "^16.6.1",
"express": "^4.21.2",
"gif-encoder-2": "^1.0.5",
"pako": "^2.0.4"
},
"devDependencies": {
"@types/bytebuffer": "^5.0.42",
"@types/chalk": "^2.2.0",
"@types/express": "^4.17.13",
"@types/gifencoder": "^2.0.1",
"@types/node": "^14.17.12",
"@types/node-fetch": "^2.5.12",
"@types/express": "^4.17.23",
"@types/node": "^20.17.57",
"@types/pako": "^1.0.2",
"ts-node-dev": "^1.1.8",
"typescript": "^4.4.2"
"ts-node-dev": "^2.0.0",
"typescript": "^5.9.2"
},
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion src/app/avatar/EffectAssetDownloadManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ export class EffectAssetDownloadManager

if(!await library.downloadAsset()) return;

this._structure.registerAnimation(library.animation);
if(library.animation) this._structure.registerAnimation(library.animation);
}
}
10 changes: 9 additions & 1 deletion src/app/avatar/animation/AnimationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ export class AnimationManager implements IAnimationManager

public registerAnimation(structure: AvatarStructure, animations: { [index: string]: IAssetAnimation }): boolean
{
const animationData = animations[Object.keys(animations)[0]];
if(!structure || !animations) return false;

const keys = Object.keys(animations);

if(!keys.length) return false;

const animationData = animations[keys[0]];

if(!animationData || !animationData.name) return false;

const animation = new Animation(structure, animationData);

Expand Down
Loading