Skip to content

Commit

Permalink
Fix animations (#50)
Browse files Browse the repository at this point in the history
* fix animation

* up README.md

* rm logs

* cleanup

* up version

* fix README.md
  • Loading branch information
Miorey authored May 8, 2024
1 parent eba75b1 commit f294d43
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,19 @@ Path | 256 |
Itemvisual | 512 |
Collection | 102 |

# Updates
As this library is based on a minified version of the Wowhead model viewer, regular upgrades of this library may require you to clear your cached data.
If you are using a Docker `bypass-cors-policies` container, you can follow these steps to clean up the cache:

```sh
docker exec -it [container_id_or_name] /bin/sh

# Inside your container
cd storage/
rm -rf *
```
If you are not using this Docker container, please adapt the cleanup process according to your environment.

# Contribute

Each contribution to this lib have to take in account js doc and typescript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wow-model-viewer",
"version": "1.3.4",
"version": "1.3.5",
"description": "Generate World of Warcraft 3D model with body parts customization and items.",
"engines": {
"node": ">=16.0.0 <19.0.0"
Expand Down
10 changes: 5 additions & 5 deletions tests/mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ class ZamModelViewer {
constructor() {
this.renderer = {
models: [{
ap: [{
j: `animation1`
am: [{
l: `animation1`
}, {
j: `animation2`
l: `animation2`
}, {
j: `animation3`
l: `animation3`
}],
setAnimation: function (val) {
if (!this.ap.find(e => e.j === val)) {
if (!this.am.find(e => e.l === val)) {
// nothing
}
},
Expand Down
12 changes: 0 additions & 12 deletions types/character_modeling.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ export function optionsFromModel(model: any, fullOptions: {}): {
* @returns {Promise<Object>}
*/
export function findRaceGenderOptions(race: number, gender: number): Promise<any>;
export const RACES: {
1: string;
2: string;
3: string;
4: string;
5: string;
6: string;
7: string;
8: string;
10: string;
11: string;
};
/**
* Returns a 2-dimensional list the inner list contains on first position the item slot, the second the item
* display-id ex: [[1,1170],[3,4925]]
Expand Down
3 changes: 2 additions & 1 deletion wow_model_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class WowModelViewer extends ZamModelViewer {
* @returns {Array.<string>}
*/
getListAnimations() {
return [...new Set(this.renderer.models[0].ap.map(e => e.j))]
console.log(`getListAnimations`)
return [...new Set(this.renderer.models[0].am.map(e => e.l))]
}

/**
Expand Down

0 comments on commit f294d43

Please sign in to comment.