Skip to content

Commit

Permalink
Merge pull request #15581 from RaananW/consistencyFTW
Browse files Browse the repository at this point in the history
consistency with the other tests
  • Loading branch information
RaananW authored Sep 16, 2024
2 parents f0f5b31 + 74beba8 commit 05e9f47
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,13 @@ describe("Babylon Scene Loader", function () {
const oldFunction = window.engine!.createShaderProgram;

const ready: { [key: string]: boolean } = {};
window.scene!.whenReadyAsync().then(() => {
const loop = () => {
const enabledMeshes = window.scene!.meshes.filter((mesh) => mesh.material && mesh.isEnabled());
enabledMeshes.forEach((mesh) => {
ready[mesh.name] = mesh.isReady(true);
});
};
window.engine!.runRenderLoop(loop);
});
const loop = () => {
const enabledMeshes = window.scene!.meshes.filter((mesh) => mesh.material && mesh.isEnabled());
enabledMeshes.forEach((mesh) => {
ready[mesh.name] = mesh.isReady(true);
});
};
window.engine!.runRenderLoop(loop);

BABYLON.SceneLoader.OnPluginActivatedObservable.addOnce((loader) => {
(loader as GLTFFileLoader).compileMaterials = true;
Expand Down

0 comments on commit 05e9f47

Please sign in to comment.