wowserhq / blizzardry

JavaScript library for mastering the wizardry that is Blizzard's game files
MIT License
54 stars 15 forks source link

Add a few additional helpers to M2 parsing #81

Closed fallenoak closed 8 years ago

fallenoak commented 8 years ago

canInstance is a boolean indicating if it's safe to instance a given M2 (ie, the M2 has no bone animation).

M2 bones get isBillboarded to indicate if the bone is to have a billboard effect applied.

timkurvers commented 8 years ago

Looks great! :+1:

Only thing we might need to decide is whether we go with getters compressed, animated, instanced:

const MCLY = Chunk({
  layers: new r.Array(new r.Struct({
    // ...
    compressed: function() {
      return this.flags & 0x200;
    }
  }), 'size', 'bytes')
});

Or whether we go with the isCompressed variants. Apologies, I didn't see this earlier.

timkurvers commented 8 years ago

Awesome! :tada:

fallenoak commented 8 years ago

Just a friendly reminder that master on Wowser won't work with master on Blizzardry until m2-refactor is merged on Wowser.