Skip to content

gkjohnson/source-engine-model-loader

Repository files navigation

source-engine-model-loader

build github twitter

Unofficial Three.js loader for parsing Valve's Source Engine models built by referencing the data structures in the ValveSoftware/source-sdk-2013 project and the source engine wiki. Demo models from the Source Filmmaker installation.

Get models from SFMLab or Source Filmmaker.

Demo here!

License Information

Models shown in this repo are not covered by the code license, copyright their respective owners, and are for demo purposes only.

Use

import { SourceModelLoader } from 'source-engine-model-loader';

new SourceModelLoader()
  .load( './folder/model', ( { group } ) => {

    scene.add( group );

  } );

API

SourceModelLoader

constructor

constructor( manager : LoadingManager )

load

load(
	url : string,
	onComplete : ( { group : Group } ) => void
) : void

Loads the set of Source Engine model files at the given path. It is expected that a model with the extensions .mdl, .vvd, and .vtx exist.

Unimplemented Features

See issue #4 for full list of unimplemented features.