Created
November 16, 2018 11:34
-
-
Save madclaws/53b75bef8931398def054b52bc522e59 to your computer and use it in GitHub Desktop.
obj model loading issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private loadAssets(){ | |
console.log("loading assets"); | |
this._assetManager=new AssetsManager(this._Scene); | |
let meshTask=this._assetManager.addMeshTask("gemTask","gem","../Assets/","diamond.obj"); | |
meshTask.onSuccess=(task:MeshAssetTask)=>{ | |
console.log("load success"); | |
task.loadedMeshes[0].position=Vector3.Zero(); | |
} | |
meshTask.onError=(task,message,exception)=>{ | |
console.log(message,exception); | |
} | |
this._assetManager.onFinish=(tasks)=>{ | |
console.log("loading finished"); | |
this.runEngine(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment