Please see the videos linked below:
Link to commits between v7.35.1
and v7.35.2
Link to diff between v7.35.1
and v7.35.2
The code looks something like:
Code
engine.runRenderLoop(async () => {
/* Points Cloud System */
if (this.#pointsCloudSystem !== undefined) {
this.#pointsCloudSystem.dispose();
}
this.#pointsCloudSystem = new BABYLON.PointsCloudSystem('', 5, SCENE);
this.#pointsCloudSystem.addPoints(
//
this.#points.length,
(p: BABYLON.CloudPoint, i: number, s: number) => {
p.color = this.#pointColors[i]!;
p.position = this.#points[i]!;
},
);
const mesh = await this.#pointsCloudSystem.buildMeshAsync();
if (this.#lineSystem !== undefined) {
this.#lineSystem.dispose();
}
/* Line System */
this.#lineSystem = BABYLON.MeshBuilder.CreateLineSystem('', {
lines: this.#lines,
colors: this.#lineColors,
});
});
It definitely has to do with running .dispose()
and recreating both the Line System and Points Cloud System every frame.
Would anyone know what could have caused this? Thank you for your help