All Projects → 4eb0da → war3-model

4eb0da / war3-model

Licence: MIT License
TypeScript-based mdl/mdx (Warcraft 3 model formats) converter/renderer

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to war3-model

War3Net
A .NET implementation of Warcraft III related libraries.
Stars: ✭ 76 (+35.71%)
Mutual labels:  warcraft3, blp
react-native-material-design-searchbar
react native material design searchbar
Stars: ✭ 51 (-8.93%)
Mutual labels:  mdl
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (-69.64%)
Mutual labels:  mdx
gatsby-blog-mdx
A ready-to-use, customizable personal blog with minimalist design
Stars: ✭ 61 (+8.93%)
Mutual labels:  mdx
myPortfolio
This is a portfolio application built by using Next.js, ChakraUi, Typescript and Dev.to api.
Stars: ✭ 127 (+126.79%)
Mutual labels:  mdx
personal-website-nextjs-chakra
A series I am making on YouTube where I build a personal website using next.js and chakra-ui. It includes a variety of other features such as mdx-remote blog pages, view counts with Google Firebase database and many more features.
Stars: ✭ 60 (+7.14%)
Mutual labels:  mdx
JMPQ3
Native Java mpq archive library
Stars: ✭ 34 (-39.29%)
Mutual labels:  warcraft3
benjamincarlson.io
My personal website built with Next.js, Chakra UI, Firebase, and next-mdx-remeote.
Stars: ✭ 102 (+82.14%)
Mutual labels:  mdx
mdxpy
A simple, yet elegant MDX library for TM1
Stars: ✭ 19 (-66.07%)
Mutual labels:  mdx
nextjs-typescript-mdx-blog
Next.js blog starter built with Typescript, MDX, and Tailwind CSS.
Stars: ✭ 130 (+132.14%)
Mutual labels:  mdx
thelocalhost
Modern web development guides hints and tips.
Stars: ✭ 21 (-62.5%)
Mutual labels:  mdx
gatsby-starter-specimens
Leverage the wide variety of powerful React components to build your design system. Display colors, typography or any other design tokens with ease. Works seamlessly with MDX.
Stars: ✭ 35 (-37.5%)
Mutual labels:  mdx
medict
medict a cross platform dictionary application,support mdict (*.mdx/*.mdd) dictionary format
Stars: ✭ 154 (+175%)
Mutual labels:  mdx
nextjs-starter-kit
NextJS Starter Kit with Testing Frameworks and CI/CD
Stars: ✭ 30 (-46.43%)
Mutual labels:  mdx
h-vjass
h-vjass.hunzsig.org
Stars: ✭ 23 (-58.93%)
Mutual labels:  warcraft3
portable mdx
A portable mdx music format decoder.
Stars: ✭ 27 (-51.79%)
Mutual labels:  mdx
mdict
node.js mdict (*.mdx, *.mdd) file reader
Stars: ✭ 39 (-30.36%)
Mutual labels:  mdx
zork
Full C++-17 port of the 616-point version of Zork from MIT circa 1978-1981
Stars: ✭ 16 (-71.43%)
Mutual labels:  mdl
Ice-Sickle
ARCHIVED: This project is archived because updates are now being made to the original World Editor (reforged), and because HiveWE is making amazing progress.
Stars: ✭ 13 (-76.79%)
Mutual labels:  warcraft3
embedded-japi-plugin
魔兽地图 内置japi插件文档
Stars: ✭ 29 (-48.21%)
Mutual labels:  warcraft3

war3-model

TypeScript-based mdl/mdx (Warcraft 3 model formats) converter/renderer

Demo

Usage

npm i war3-model --save

MDL parsing/generation

import { parseMDL, generateMDL } from 'war3-model';

let model = parseMDL('...');
let mdl = generateMDL(model);
console.log(mdl);

BLP => PNG node.js cli converter

import * as fs from 'fs';
import { PNG } from 'pngjs';
import { decodeBLP, getBLPImageData } from 'war3-model';

let blp = decode(new Uint8Array(fs.readFileSync(process.argv[2])).buffer);
let imageData = getImageData(blp, 0);
let png = new PNG({width: blp.width, height: blp.height, inputHasAlpha: true});

png.data = Buffer.from(imageData.data.buffer);

fs.writeFileSync('out.png', PNG.sync.write(png));

Is it good enough?

100% of old classic Warcraft 3 models can be parsed.

After conversion mdx binary file -> in-memory structure -> mdx binary file all of them would be byte-to-byte identical.

~98.4% of models (3276/3329) would be identical after mdx -> structure -> mdl -> structure -> mdx (because warcraft contains extraneous data in models and because of unsupported multiple texture chunks in mdl).

What about Reforged?

Nope. Currently not supported, sorry

MDL/MDX support

  • All standart features like Sequences, Bones, Cameras, etc
  • Multiple texture chunks (mdx only)
  • Multiple sequences/nodes with the same name (not quite sure is it feature or not, but War3 actually contains such models)
  • SoundTrack not supported

Renderer support

  • Standart geometry/animation
  • Custom team color setting
  • ReplaceableId 1/2
  • Global sequences
  • Alpha blending and multiple layers
  • TextureAnimation
  • Billboarded/BillboardedLockXYZ, w/o DontInherit/CameraAnchored
  • RibbonEmitter (w/o Gravity and TextureSlot/Color animation)
  • ParticleEmitter2 (with Tail/Head/Both/Squirt(?))
  • No light support (normals, light, Unshaded, etc)
  • No render priority support (PriorityPlane and others)

BLP support

  • BLP1 only (not BLP0 and BLP2 support)
  • Decoder only, no encoder
  • Direct & jpeg data
  • Variable alpha (8/4/1/0 bit, but tested only 8/0)
  • API for getting all mipmap level's data

Thanks

  • Magos (MDX specification, War3 Model Editor app/source)
  • GhostWolf (aka flowtsohg) (MDX specification, BLP decoder code)
  • Алексей (MdlVis app/source)
  • Dr Super Good (BLP specification)

Licence

MIT Licence

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].