The source code for the threejs editor is available here , you can just download it from it here, add your code to display the default model at appropriate place and host it.
Update 1: Adding a custom model in the Editor's Scene
After reviewing the code of the Editor.js
I found that you can add custom objects in the scene
variable defined in the Editor
using the addObject()
function
I am assuming that you need to add an object which is exported out of blender in .obj
format, but using this addObject()
function you can add any object/mesh into the editor.
So in index.html add the following lines of code to add a model manually.
var manager = new THREE.LoadingManager();
var loader = new THREE.OBJLoader( manager );
loader.load( '../obj/male02/male02.obj', function ( object ) {
object.position.y =0;
editor.addObject( object );// THIS WAY YOU CAN MANUALLY ADD ANY MESH/OBJECT3D IN THE EDITOR
});
I have made and hosted an example here you can visit it and look around line 123 to see the custom code.