mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
18 lines (15 loc) • 345 B
JavaScript
import {quat} from 'gl-matrix';
import {SkeletalNode} from '../../node';
/**
* An M3 node.
*/
export default class M3Node extends SkeletalNode {
/**
* @param {quat} rotation
*/
convertBasis(rotation) {
let halfPI = Math.PI / 2;
quat.rotateZ(rotation, rotation, halfPI);
quat.rotateY(rotation, rotation, -halfPI);
}
}