Viewing 1 replies (of 1 total)
  • Added a few lines to handle skins. I don’t think they were being supported before. Options.material cannot be null in order to work properly. I specified “images/texture.png”. The images dir is located adjacent to the supporting scripts as recommended by THREEjs. Best use practices applied. Blender export to .obj seems to work well enough for me.

    file: OBJMTLLoader.js:
    function: meshN
    find: geometry.computeBoundingSphere()

    paste below:

    var texture = THREE.ImageUtils.loadTexture(‘images/texture.png’,{},function(texture){
    var material = new THREE.MeshPhongMaterial({map:texture});
    object.add( new THREE.Mesh(geometry, material));
    });

    P.S.: I don’t speak for the owner of the WP3D script and I’m not sure what the update schedule is. Maybe this snip-it can save you some time on your project.

    Edit: I didn’t support for multiple filenames. WYSIWYG – texture.png is applied to all models.

    • This reply was modified 8 years, 1 month ago by richard34761.
    • This reply was modified 8 years, 1 month ago by richard34761.
Viewing 1 replies (of 1 total)
  • The topic ‘Updates’ is closed to new replies.