使用three.js库

时间:2017-04-27 07:07:31

标签: javascript 3d three.js

我实现了使用THREE.texture将纹理应用于我的3D对象,但是我仍然遇到侧面问题(请参阅下面的链接)。我不知道如何选择我的物体的侧面......你对如何解决这个问题有所了解吗?

Salmon Cut

        var manager = new THREE.LoadingManager();
        manager.onProgress = function (item, loaded, total) {
            console.log(item, loaded, total);
        };
        var texture = new THREE.Texture();
        var onProgress = function (xhr) {
            if (xhr.lengthComputable) {
                var percentComplete = xhr.loaded / xhr.total * 100;
                console.log(Math.round(percentComplete, 2) + '% downloaded');
            }
        };
        var onError = function (xhr) {};

        var loader = new THREE.ImageLoader(manager);
        loader.load('/Scan/filet_1kg500-reposition-reduit_material_0.jpg', function (image) {
            texture.image = image;
            texture.needsUpdate = true;
        });

0 个答案:

没有答案