Hello,
Is there a way to know when the mesh has completed rendering?
This is the [https://courageous-buttercream-a6b0a5.netlify.app/](https://game link)
you can check in this link that ball and the 3 cylinder are rendered first and then the ground is rendered later.
And I’m using this code
CreatePitchMaterial(): StandardMaterial {
const pitchMat = new StandardMaterial("pitchMat", this.scene);
const uvScale = 4;
const texArray: Texture[] = [];
const diffuseTex = new Texture("./textures/pitch/pitch_diff.jpeg", this.scene);
pitchMat.diffuseTexture = diffuseTex;
texArray.push(diffuseTex);
const normalTex = new Texture("./textures/pitch/pitch_nor.jpeg", this.scene);
pitchMat.bumpTexture = normalTex;
texArray.push(normalTex);
const aoTex = new Texture("./textures/pitch/pitch_ao.jpeg", this.scene);
pitchMat.ambientTexture = aoTex;
texArray.push(aoTex);
texArray.forEach((tex) => {
tex.uScale = uvScale
tex.vScale = uvScale
})
return pitchMat
}
this.pitch = MeshBuilder.CreateGround("pitch", { width: gameConfig.playArea.width, height: gameConfig.playArea.dist }, this.scene);
this.pitch.physicsImpostor = new PhysicsImpostor(this.pitch, PhysicsImpostor.BoxImpostor, { mass: 0, restitution: 0, friction: 1 }, this.scene);
this.pitch.material = this.CreatePitchMaterial();
I want to know if the pitch is rendered so that I can add other object or maybe stop loading screen.