5.0 breaking changes


I saw a listed breaking change in 5.0:
dataBuffer.ts and buffer.ts have been moved from Meshes/ to Buffers/

I found 2 more breaking changes from moved imports:
// declared, but not exported in 5.0
import { IFocusableControl } from “@babylonjs/gui/2D/advancedDynamicTexture.js”;
// moved
import { FluentMaterial } from “@babylonjs/gui/3D/materials/fluentMaterial.js”;

I wonder if there is any consideration for having a secondary export in the interests of backwards compatibility. Otherwise, maybe these are considered breaking changes as well?

That is a miss

wanna do a PR to reexport them from their previous location?

Wasn’t fluent material introduced in 5.0? I don’t think this is a breaking change.

About moving the files, maybe @Evgeni_Popov can explain why it was done before reverting it

1 Like

I don’t think it should be reverted - it seems better organized now, especially with the shaders. The question was more about how moving imports are being handled, since the other moves were listed as breaking changes. I know that your team works hard to avoid breaking changes.

1 Like

Importing requires the full path of the file (esm), so in order to get the imports to load correctly we will either need to move the files back or add a placeholder that exports everything from the correct file. A kind of redirect :slight_smile:

If there is a cleaner solution i’d be very happy to know

Yes, that’s why I was originally suggesting placeholders (secondary export) for backwards compatibility. And then also we could remove the listed breaking change as well.

1 Like