Skip to content

Commit

Permalink
feat(model): add bone flag enum
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Feb 8, 2024
1 parent 01f0bd7 commit e78d399
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/model/M2Model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IoMode, IoSource, openStream } from '@wowserhq/io';
import * as io from '@wowserhq/io';
import * as m2Io from './io/m2.js';
import { M2_MODEL_FLAG } from './const.js';
import { M2_BONE_FLAG, M2_MODEL_FLAG } from './const.js';
import {
M2Sequence,
M2Track,
Expand Down Expand Up @@ -191,5 +191,6 @@ export {
M2Sequence,
M2TextureWeight,
M2TextureTransform,
M2_BONE_FLAG,
M2_MODEL_FLAG,
};
12 changes: 12 additions & 0 deletions src/lib/model/const.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
enum M2_BONE_FLAG {
FLAG_SPHERICAL_BILLBOARD = 0x8,
FLAG_CYLINDRICAL_BILLBOARD_X = 0x10,
FLAG_CYLINDRICAL_BILLBOARD_Y = 0x20,
FLAG_CYLINDRICAL_BILLBOARD_Z = 0x40,
FLAG_BILLBOARD = FLAG_SPHERICAL_BILLBOARD |
FLAG_CYLINDRICAL_BILLBOARD_X |
FLAG_CYLINDRICAL_BILLBOARD_Y |
FLAG_CYLINDRICAL_BILLBOARD_Z,
}

enum M2_MODEL_FLAG {
USE_COMBINER_COMBOS = 0x8,
}
Expand Down Expand Up @@ -103,6 +114,7 @@ enum M2_FRAGMENT_SHADER {
}

export {
M2_BONE_FLAG,
M2_MODEL_FLAG,
M2_MATERIAL_BLEND,
M2_MATERIAL_FLAG,
Expand Down

0 comments on commit e78d399

Please sign in to comment.