Use of deprecated functions

Hey everybody,

Related to this post : https://forum.babylonjs.com/t/babylon-10-poll/49361/33

Here’s a PG : https://playground.babylonjs.com/#C77SMH#13

I can’t see the meshes which are still present but not visible. So I assume that the deprecated functions don’t work in the PG. And I can’t see the warning in the code.

Where’s my mistake ?

Thanks,

Boris

This is because you are not using the correct parameters.

The original design of the Mesh.CreateXXX was not using an options object (hence why the creation of the MeshBuilder and the current depreciation)

Ok, you’re right.

And can you tell me where is the warning of the function ? I mean, not in the playground where it is quite visible but anywhere else in my code, in the console I assume.

I also ask myself this question.

I think it would be nice to have an indication in the console that says what is obsolete and the replacement alternative.

Currently I see nothing in the console, nothing in the code. In the PG we just see that it is crossed out, but only in the PG.

Wouldn’t this add some overhead? You have to implement some logic to achieve this. I think deprecated functions have to be marked in the GUI and not checked at runtime.

Yes we actually count on Typescript to provide that warning (or any longer actually)
If you are not using a linter or TS you won’t see the message

1 Like

That’s why I think that would be great if possible to publish a list of deprecated functions for those who are using Javascript. Otherwise, I think we won’t be able to correct our code before the launch of the new version.
But maybe can we already find it in the playground’s asset because it is written in it. That would be a great first step. Please tell me where it is and I will try to do something if you want.

1 Like

Here we are:
https://github.com/search?q=repo%3ABabylonJS%2FBabylon.js%20%40deprecated&type=code

Thanks very much, i will try to make a list.