# Use of deprecated functions

**URL:** <https://forum.babylonjs.com/t/use-of-deprecated-functions/49433>\
**Category:** Questions\
**Created:** [April 7, 2024, 2:47pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433 "2024-04-07T14:47:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bvaisman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bvaisman/32/20835_2.png) [@bvaisman](https://forum.babylonjs.com/u/bvaisman)\
**Post date:** [April 7, 2024, 2:47pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/1 "2024-04-07T14:47:34Z")

</div>

Hey everybody,

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

Here’s a PG : [https://playground.babylonjs.com/#C77SMH#13](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

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 7, 2024, 2:59pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/2 "2024-04-07T14:59:07Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![bvaisman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bvaisman/32/20835_2.png) [@bvaisman](https://forum.babylonjs.com/u/bvaisman)\
**Post date:** [April 7, 2024, 5:02pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/3 "2024-04-07T17:02:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dad72](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dad72/32/13_2.png) [@Dad72](https://forum.babylonjs.com/u/Dad72)\
**Post date:** [April 7, 2024, 5:34pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/4 "2024-04-07T17:34:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [April 7, 2024, 9:52pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/5 "2024-04-07T21:52:22Z")

</div>

> [@Dad72](#):
>
> I think it would be nice to have an indication in the console that says what is obsolete and the replacement alternative.

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.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 8, 2024, 12:13am UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/6 "2024-04-08T00:13:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bvaisman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bvaisman/32/20835_2.png) [@bvaisman](https://forum.babylonjs.com/u/bvaisman)\
**Post date:** [April 8, 2024, 5:30am UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/7 "2024-04-08T05:30:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 8, 2024, 3:19pm UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/8 "2024-04-08T15:19:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bvaisman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bvaisman/32/20835_2.png) [@bvaisman](https://forum.babylonjs.com/u/bvaisman)\
**Post date:** [April 9, 2024, 9:00am UTC](https://forum.babylonjs.com/t/use-of-deprecated-functions/49433/9 "2024-04-09T09:00:19Z")

</div>

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