loadCollada

cjcliffe edited this page Oct 15, 2011 · 2 revisions

CubicVR.loadCollada

Usage

loadCollada( url, image_prefix )

Parameters:

  • url : Location of a Collada model (dae XML, JSON support planned).
  • image_prefix : Path prefix for images.

Returns:

A Scene.

Example Usage

From samples/collada/collada_duck.html:

// ...

// load the collada file, specify path for images
var colladaScene = CubicVR.loadCollada("Duck/duck_triangulate.dae","Duck/");

// need to know it's name in the default scene
var duckMesh = colladaScene.getSceneObject("LOD3sp").obj;

// SceneObject container for the mesh
var duckObject = new CubicVR.SceneObject(duckMesh);

// Add SceneObject containing the mesh to the scene
scene.bindSceneObject(duckObject);