Fluid Rendering Demos: Error in demos from official docs

Env: Windows 10 and chromium 120
Source of demos:

Expected: All demos directly linked in docs would work as the screenshot in docs.

Demos that fail:

Actual (all seems the same error):

cc @Evgeni_Popov

cc @RaananW, I think it’s related to the change where enums are now exported as const enum, but I don’t know how to fix the code. Object.keys(BABYLON.FluidRenderingDebug) still works as expected in the browser console log, but not in Monaco.

Not the best behavior from typescript TBH, but yes - exported const enums cannot be iterated (though they can be, since they are exported just the same).

Let me think of a solution here.

1 Like

This PR fixes it - Declarations - const enum to enums by RaananW · Pull Request #15235 · BabylonJS/Babylon.js · GitHub

Babylon.js Playground (babylonjs.com)


Does this affect backward compatibility?

this is a types-only issue. JavaScript users should not be affected by that. es6 users might be if they are iterating over the enum, but this is solvable with a slight types manipulation. I am still working on the es6 solution, but if anyone is affected they should let me know.

1 Like

How can I make the PGs work?
Want to check out the samples.

nightly is running as i write this. It should be working in 30-40 minutes.