forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Using SketchUp Models
objarni edited this page Jul 7, 2012
·
3 revisions
- Click on the menu item File > Export > 3D Model....
- Choose COLLADA File (.dae) as export type.
- If you want to export the textures, click on Options and make sure that Export Texture Maps is checked.
- Click on Export.
SketchUp will create a Collada file named your-model.dae
and a folder named your-model
that contains the models textures.
Make sure you download ColladaLoader.js (find it somewhere by browsing the source) and load it into your HTML project:
<script type="text/javascript" src="Three.js"></script>
<script type="text/javascript" src="ColladaLoader.js"></script>
Since the Collada loader in r46 has a known bug, you need to use the Collada loader from the dev
branch. Note that Three.js is up at renderer version r49 as of 6th of July 2012 though.
var loader = new THREE.ColladaLoader();
loader.load('path/to/your-model.dae', function (result) {
scene.add(result.scene);
});
Note that this won't work locally, because it loads the Collada file and the textures using AJAX. Therefore you have to serve the files with HTTP or change your browser's security settings as explained in How to run things locally.