forked from phenom/healer-man
Release Healer Man 0.1.13
This commit is contained in:
1 parent
65e24f644e
commit
67d7a8ebe7
324 files changed
+917
-48
No files matched your search
@@ -138,6 +138,16 @@ test("packages the Power Word: Shield aura as a three-layer static mesh graph",
|
||||
for (const texture of ["ShieldA.BLP", "ShieldB.BLP", "ShieldC.BLP"]) {
|
||||
fs.writeFileSync(path.join(textureRoot, "Spells", texture), Buffer.from(`source-${texture}`));
|
||||
}
|
||||
const scalarTrack = (values, interpolation = 1) => ({
|
||||
interpolation,
|
||||
globalSequence: -1,
|
||||
sequences: [{ timestamps: values.map((_, index) => index * 500), values }],
|
||||
});
|
||||
const colorTrack = (color) => ({
|
||||
interpolation: 0,
|
||||
globalSequence: -1,
|
||||
sequences: [{ timestamps: [0], values: [color] }],
|
||||
});
|
||||
const sourceManifest = {
|
||||
schemaVersion: 1,
|
||||
coverage: { requested: 1, authentic: 1, fallback: 0 },
|
||||
@@ -151,6 +161,12 @@ test("packages the Power Word: Shield aura as a three-layer static mesh graph",
|
||||
}],
|
||||
};
|
||||
const decodedMesh = {
|
||||
globalSequences: [],
|
||||
animations: [
|
||||
{ index: 0, id: 0, variationIndex: 0, durationMs: 700, moveSpeed: 0, flags: 33 },
|
||||
{ index: 1, id: 158, variationIndex: 0, durationMs: 633, moveSpeed: 0, flags: 32 },
|
||||
{ index: 2, id: 159, variationIndex: 0, durationMs: 1_100, moveSpeed: 0, flags: 33 },
|
||||
],
|
||||
bounds: { minimum: [-1, -1, 0], maximum: [1, 1, 0], radius: 1.5 },
|
||||
vertices: [
|
||||
{ position: [0, 0, 0], normal: [1, 0, 0], uv: [0, 0] },
|
||||
@@ -158,9 +174,14 @@ test("packages the Power Word: Shield aura as a three-layer static mesh graph",
|
||||
{ position: [0, 0, 1], normal: [1, 0, 0], uv: [0, 1] },
|
||||
],
|
||||
indices: [0, 1, 2, 0, 1, 2, 0, 1, 2],
|
||||
colors: [0, 1, 2].map((index) => ({
|
||||
color: colorTrack([1, 0.9 - index * 0.1, 0.3]),
|
||||
alpha: scalarTrack([32_767], 0),
|
||||
})),
|
||||
textures: ["ShieldA.BLP", "ShieldB.BLP", "ShieldC.BLP"].map((filename) => ({
|
||||
type: 0, flags: 0, filename: `Spells/${filename}`,
|
||||
})),
|
||||
textureWeights: [0, 1, 2].map(() => scalarTrack([0, 6_553])),
|
||||
materials: [0, 1, 2].map(() => ({ flags: 19, blendMode: 4 })),
|
||||
skin: {
|
||||
textureUnits: [0, 1, 2].map((index) => ({
|
||||
@@ -191,6 +212,7 @@ test("packages the Power Word: Shield aura as a three-layer static mesh graph",
|
||||
|
||||
const asset = manifest.entries[0].phases["aura-start"][0];
|
||||
assert.equal(asset.effectKind, "wow-m2-static-mesh");
|
||||
assert.equal(asset.scale, 0.7);
|
||||
assert.match(asset.effectGraphUrl, /^\/fixture\/priest\/graphs\/holydivineshield-state-base-/);
|
||||
assert.equal(report.readyStaticMeshes, 1);
|
||||
assert.equal(report.readyParticleEmitters, 0);
|
||||
@@ -204,6 +226,18 @@ test("packages the Power Word: Shield aura as a three-layer static mesh graph",
|
||||
indices: [0, 1, 2, 0, 1, 2, 0, 1, 2],
|
||||
});
|
||||
assert.equal(graph.layers.length, 3);
|
||||
assert.deepEqual(graph.animations.map(({ id, durationMs }) => ({ id, durationMs })), [
|
||||
{ id: 0, durationMs: 700 },
|
||||
{ id: 158, durationMs: 633 },
|
||||
{ id: 159, durationMs: 1_100 },
|
||||
]);
|
||||
assert.equal(graph.colors.length, 3);
|
||||
assert.equal(graph.textureWeights.length, 3);
|
||||
assert.deepEqual(graph.textureWeights[0], {
|
||||
interpolation: 1,
|
||||
globalSequence: -1,
|
||||
sequences: [{ timestamps: [0, 500], values: [0, 6_553] }],
|
||||
});
|
||||
assert.deepEqual(graph.layers.map((layer) => ({
|
||||
textureIndex: layer.textureIndex,
|
||||
blendMode: layer.blendMode,
|
||||
|
||||
Reference in new issue
Block a user