From e78d399df9d01c7684798df5021b3c7ef5c921e5 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 8 Feb 2024 13:25:53 -0600 Subject: [PATCH] feat(model): add bone flag enum --- src/lib/model/M2Model.ts | 3 ++- src/lib/model/const.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/model/M2Model.ts b/src/lib/model/M2Model.ts index 20072c6..732b440 100644 --- a/src/lib/model/M2Model.ts +++ b/src/lib/model/M2Model.ts @@ -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, @@ -191,5 +191,6 @@ export { M2Sequence, M2TextureWeight, M2TextureTransform, + M2_BONE_FLAG, M2_MODEL_FLAG, }; diff --git a/src/lib/model/const.ts b/src/lib/model/const.ts index 063ac0d..48608ef 100644 --- a/src/lib/model/const.ts +++ b/src/lib/model/const.ts @@ -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, } @@ -103,6 +114,7 @@ enum M2_FRAGMENT_SHADER { } export { + M2_BONE_FLAG, M2_MODEL_FLAG, M2_MATERIAL_BLEND, M2_MATERIAL_FLAG,