New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

three-m2loader

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-m2loader

three.js loader for importing M2 assets from World of Warcraft.

2.0.0
Version published
Weekly downloads
1
-93.75%
Maintainers
1
Weekly downloads
 
Created

three-m2loader · GitHub license NPM Package

M2 Loader for three.js

three-m2loader allows you to import M2 assets from World of Warcraft into your three.js app.

druidcat2.m27ne_druid_worktable02.m2gilneas_fountain01.m2
imageimageimage

Usage

If you want to load an asset into your three.js app, you have to put all external resources like .blp or .skin files into the same directory like the M2 file. Depending on the M2 version, you have to name resources files with their FileDataID or with their actual file name.

A minimal code example looks like so:

import { M2Loader } from 'three-m2loader';

const loader = new M2Loader();
loader.load( 'models/cat/druidcat2.m2', function ( group ) {

    scene.add( group );

} );

This loader requires three.js in version r144 or higher.

FAQs

Package last updated on 18 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts