var BuildCtrl = function (scene) {
    var _inst = this;

    this.init = function () {
    }
    this.loadBuildModel = function (path, name, onProgress, onFinish){
        let allProgress = 0, tempProgress=0;
        BABYLON.SceneLoader.ImportMesh("", path, name, scene, function(meshes){
            for(let i = 0; i < meshes.length; i++) {
                if(meshes[i].name == ("pingmu")){
                    pingmu = meshes[i];

                }
            }

            if(onFinish){
                onFinish();
            }
        },function (progress) {
            if(tempProgress < 1)
                allProgress -= tempProgress;
            allProgress += progress.loaded/progress.total;
            tempProgress = progress.loaded/progress.total;

            if(onProgress){
                onProgress(Math.round(allProgress*50));
            }
        });
    }
    this.init();
}
