Skip to content

Instantly share code, notes, and snippets.

@hardy613
Last active June 7, 2020 01:40
Show Gist options
  • Save hardy613/9679eed0444e64a67463248e2fd38e52 to your computer and use it in GitHub Desktop.
Save hardy613/9679eed0444e64a67463248e2fd38e52 to your computer and use it in GitHub Desktop.
async function loadMeshes() {
const newMeshes = await BABYLON.SceneLoader.ImportMeshAsync(null, "ColladaFiles/", babItem, sceneBAB);
for(const mesh of newMeshes){
mesh.castShadow = true;
mesh.receiveShadows=true;
mesh.parent= renderItemsBAB[currentCab.obj["cabNumber"]];
mesh.id=currentCab.obj["cabNumber"];
shadowGenerator.getShadowMap().renderList.push(mesh);
}
console.log(currentCab.obj["cabNumber"])
//assignMesh(newMeshes,currentCab.obj["cabNumber"]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment