# [name]

A loader for Collada files.

## Constructor

### [name]()

Creates a new [name].

## Properties

### [property:Array options]

.[page:Boolean centerGeometry] — Force [page:Geometry] to always be centered at the local origin of the containing [page: Mesh].
.[page:Boolean convertUpAxis] — Axis conversion is done for geometries, animations, and controllers.
.[page:Boolean subdivideFaces] — Force subdivision into multiple [page: Face3].
.[page:String upAxis] — X, Y or Z
.[page:Boolean defaultEnvMap] — Cubemap to use for reflective or refractive materials.

### [property:Object geometries]

Parsed .dae geometries.

## Methods

### [method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress] )

[page:String url] — required
[page:function onLoad] — Will be called when load completes. The argument will be an [page:Object object] containing loaded resources.
[page:function onProgress] — Will be called while load progresses. The argument will be an object containing .[page:Integer total] and .[page:Integer loaded] bytes.
Begin loading from url and call onLoad with the parsed response content.

### [method:Object parse]( [page:Document doc], [page:Function callBack], [page:String url] )

[page:Document doc] — The XML document to parse.
[page:Function callBack] — Will be called when parse completes.
[page:String url] — The base url from which to find subsequent resources.
Parse an XML Document and return an [page:Object object] that contain loaded parts: .[page:Scene scene], .[page:Array morphs], .[page:Array skins], .[page:Array animations], .[page:Object dae]

### [method:null setPreferredShading]( [page:Integer shading] )

[page:Integer shading] — required
Set the .[page:Integer shading] property on the resource's materials.
Options are [page:Materials THREE.SmoothShading], [page:Materials THREE.FlatShading].

### [method:null applySkin]( [page:Geometry geometry], [page:Object instanceCtrl], [page:Integer frame] )

[page:Geometry geometry] — required
[page:Object instanceCtrl] — required. A collada skinController
[page:Integer frame] — optionnal. Default is 40
Apply a skin (vertices, animation, bones) from a collada skin controller, on the given [page:Geometry].

## Example

`// instantiate a loader var loader = new THREE.ColladaLoader(); loader.load( // resource URL 'models/collada/monster/monster.dae', // Function when resource is loaded function ( collada ) { scene.add( collada.scene ); }, // Function called when download progresses function ( xhr ) { console.log( (xhr.loaded / xhr.total * 100) + '% loaded' ); } );` [example:webgl_loader_collada]
[example:webgl_loader_collada_keyframe]
[example:webgl_loader_collada_skinning]
[example:webgl_loader_collada_kinematics]

## Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/ColladaLoader.js examples/js/loaders/ColladaLoader.js]