Threeejs加载的FBX未显示所有模型部分

时间:2020-03-18 09:05:59

标签: javascript three.js 3d fbx

我需要你的手。我将FBX模型导入到Threejs中,导入代码如下:

import picocli.CommandLine;
import picocli.CommandLine.*;
import picocli.CommandLine.Model.CommandSpec;

@Command(name = "app", mixinStandardHelpOptions = true,
        synopsisHeading = "",
        customSynopsis = {
            "Usage: app [-hV] [-A [-B]]",
            "       app [-hV] [-A [-A1] [-A2] [-A3]]",
        })
public class App implements Runnable {
    static class MyGroup {
        @Option(names = "-A", required = true) boolean a;
        @Option(names = "-B") boolean b;
        @Option(names = "-A1") boolean a1;
        @Option(names = "-A2") boolean a2;
        @Option(names = "-A3") boolean a3;

        boolean isInvalid() {
            return b && (a1 || a2 || a3);
        }
    }

    @ArgGroup(exclusive = false)
    MyGroup myGroup;

    @Spec CommandSpec spec;

    public void run() {
        if (myGroup != null && myGroup.isInvalid()) {
            String msg = "Option -B is mutually exclusive with -A1, -A2 and -A3";
            throw new ParameterException(spec.commandLine(), msg);
        }
        System.out.printf("OK: %s%n", spec.commandLine().getParseResult().originalArgs());
    }

    public static void main(String[] args) {
        //new CommandLine(new App()).usage(System.out);

        //test: these are all valid
        new CommandLine(new App()).execute();
        new CommandLine(new App()).execute("-A -B".split(" "));

        // requires validation in the application to disallow
        new CommandLine(new App()).execute("-A -B -A1".split(" "));

        // picocli validates this, gives: "Error: Missing required argument(s): -A"
        new CommandLine(new App()).execute("-B -A1".split(" "));
    }
}

当前它没有任何导入问题,但是我意识到对于某些型号,存在显示问题,某些零件丢失了。屏幕如下:

Showed Model 但是,在这个项目中,我还安装了OrbitControl来管理摄像头,我发现通过移动摄像头,缩放和其他操作,模型就变得完整了

Model after move

我想知道这是否已经发生在某人身上,以及是否有解决方法。非常感谢大家,祝您有美好的一天!

1 个答案:

答案 0 :(得分:1)

可能与平截锥体剔除有关。具有动画效果的对象通常具有定义不正确的边界框。如果模型仅在其中心点进入摄像机视场时才出现,则表明它可能是边界框问题。