wowserhq / blizzardry

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

Additional M2 parsing and helpers #76

Closed fallenoak closed 8 years ago

fallenoak commented 8 years ago

As part of my work on getting M2 animations working in Wowser, I've added several animation helpers to M2s and animation blocks.

I've also added parsing for color and transparency animation blocks in M2s, for eventual integration with Wowser.

Finally, I've added parsing for the texture lookups array in M2s, which is necessary to properly resolve textureIndexes when texturing submeshes with the appropriate texture units.

timkurvers commented 8 years ago

Fantastic! :+1:

Do these changes have a large performance impact? I have previously used Creature\\Illidan\\Illidan.m2 for performance testing as it's a pretty large model.

fallenoak commented 8 years ago

I can't say for sure, but it doesn't feel like M2s are loading much more slowly. Most M2s don't have a ton of animation tracks, and tracks seem to generally be a few dozen keyframes long, rather than, say, hundreds or thousands.

I just tried loading Illidan-- seems to take maybe 3-4 seconds to load with Blizzardry's changes active. Not positive what it took prior to these changes on my laptop, however.

timkurvers commented 8 years ago

Ah that's totally fine, 'twas always a slow bugger! :smile:

timkurvers commented 8 years ago

Awesome! :tada: