# BabylonJS 5 release

**URL:** <https://forum.babylonjs.com/t/babylonjs-5-release/27384>\
**Category:** Off topic\
**Created:** [February 5, 2022, 1:48pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384 "2022-02-05T13:48:54Z")\
**Posts on this page:** 19\
**Page:** 1

<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:** [February 5, 2022, 1:48pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/1 "2022-02-05T13:48:54Z")

</div>

Hey team!  
I can literally feel the stress, the pressure and strain you might have now. I keep my fingers crossed and wish you best luck to release it with minimum issues and in time. I’m trying to support you by helping the newbies on the forum. If there’s anything else I can do, just ping me.

Keep coding!

🖖

---

<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:** [February 7, 2022, 4:47pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/2 "2022-02-07T16:47:43Z")

</div>

Man! You just made my day!!! Thanks for being part of the family!

---

<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:** [February 7, 2022, 5:21pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/3 "2022-02-07T17:21:41Z")

</div>

It’s my pleasure David! 🖖

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [February 7, 2022, 5:37pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/4 "2022-02-07T17:37:53Z")

</div>

[![](https://th.bing.com/th/id/R.0332b491d62a2c7e13d680c64538a322?rik=/kl0H1KppJ9OXw&pid=ImgRaw&r=0https://th.bing.com/th/id/R.0332b491d62a2c7e13d680c64538a322?rik=/kl0H1KppJ9OXw&pid=ImgRaw&r=0) ](https://th.bing.com/th/id/R.0332b491d62a2c7e13d680c64538a322?rik=/kl0H1KppJ9OXw&pid=ImgRaw&r=0https://th.bing.com/th/id/R.0332b491d62a2c7e13d680c64538a322?rik=/kl0H1KppJ9OXw&pid=ImgRaw&r=0)

Thanks for being such a pillar of this community man 😁

---

<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:** [February 7, 2022, 5:44pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/5 "2022-02-07T17:44:49Z")

</div>

Thank you Carol! As I once wrote somewhere on the forum I am living my second childhood thanks to BabylonJS, thanks to all of you! This is an incredible feeling!

---

<div class="post-metadata">

**Author:** ![qqqzhch](https://avatars.discourse-cdn.com/v4/letter/q/e19adc/32.png) [@qqqzhch](https://forum.babylonjs.com/u/qqqzhch)\
**Post date:** [February 8, 2022, 8:29am UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/6 "2022-02-08T08:29:46Z")

</div>

Looking forward to the official release, watch the video introduction, there are many interesting tools

---

<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:** [February 8, 2022, 11:54am UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/7 "2022-02-08T11:54:16Z")

</div>

Yep, I already saw all available BabylonJS videos several times and I try to keep track of all the new stuff released 👍

---

<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:** [February 8, 2022, 12:11pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/8 "2022-02-08T12:11:19Z")

</div>

Hi,  
Yes babylon is a great engine, I myself have done much more than with other engines.

For your trying to keep track of what’s new, I assume you know you have a ‘What’s new’ if this link which lists all the new stuff in version 5:

> <https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview%20release/what's%20new.md>

---

<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:** [February 8, 2022, 12:45pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/10 "2022-02-08T12:45:23Z")

</div>

Hey @Dad72! Thanks! I check this file regularly already 😊 I can recall your nickname, I read a few of your posts earlier and found some interesting stuff in the topics you started or answered! Have a nice day dude!

---

<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:** [February 8, 2022, 12:53pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/11 "2022-02-08T12:53:18Z")

</div>

But you actually didn’t 😊 I bet you have a solid understanding of everything related to code now because you became a coder when you were only in your childhood. Our brains were adapted to code and for the majority of ppl we are magicians 😂😂😂

---

<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:** [February 8, 2022, 12:57pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/12 "2022-02-08T12:57:14Z")

</div>

Regarding the force. Today I have earned the “Jedi Master” badge. 🎉 After 9 months of being in the community. I am happy like a child receiving a badly wanted toy 😂😂😂 and I am proud of myself as well, yeaah LOL I like being a child now despite I am a 45 years old fart already 🤣

---

<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:** [February 8, 2022, 1:14pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/14 "2022-02-08T13:14:51Z")

</div>

> [@nima](#):
>
> Congrats for the badge

Thank you!

> [@nima](#):
>
> I’m not as strong as you and others for sure

Yes you are! I can sense the power! 💪 The Voxel Builder is an amazing piece of software! The design is a real eyecandy. The game I am working on is a hybrid of voxel based stuff and regular meshes and I have plans to try your Voxel Builder to draw some voxelized enemy bosses. It will be much more easier than drawing flat PNG layers by hand and convert them into 3D space on startup or drawing boxes in Blender. (that’s what I am doing now) Thanks for sharing it bro!

---

<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:** [February 8, 2022, 6:26pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/15 "2022-02-08T18:26:27Z")

</div>

You FREAKING can be proud! ;D

---

<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:** [February 8, 2022, 7:46pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/16 "2022-02-08T19:46:53Z")

</div>

Oh, glad you found interesting and useful topics for you with my posts.  
Good day to you too man.

---

<div class="post-metadata">

**Author:** ![PolygonalSun](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/polygonalsun/32/2704_2.png) [@PolygonalSun](https://forum.babylonjs.com/u/PolygonalSun)\
**Post date:** [February 9, 2022, 6:54pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/17 "2022-02-09T18:54:27Z")

</div>

NGL, posts like these really make my day. This community rocks!

---

<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:** [February 11, 2022, 1:48pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/18 "2022-02-11T13:48:10Z")

</div>

Hi @Deltakosh!

I was thinking how could I help to move to BJS5 and I came up with an idea to automatically modify all the existing PGs so we can get rid of the deprecated `BABYLON.Mesh.CreateXXX` functions. I wrote a simple parser using `acorn` JS parser and created a simple node.js script which automatically rewrites the lines in the input string. There are still official examples using the deprecated methods and ton of custom PGs using them. I believe nobody is going to rewrite (I mean the custom ones) them so it would be cool to run this script on all PGs in the database.

The basic setup is:

Define the functions and parameters to be replaced:

```auto
const toReplace = [
  {
    name: "CreateTube",
    oldFunction:
      "name, path, radius, tesselation, radiusFunction, cap, scene, updatable, sideOrientation, instance",
    newFunction:
      "name, { path, radius, tesselation, radiusFunction, cap, updatable, sideOrientation, instance }, scene",
  },
  {
    name: "CreateBox",
    oldFunction: "name, size, scene, updatable, sideOrientation",
    newFunction: "name, { size, updatable, sideOrientation }, scene",
  },
// more to add
];

```

The script can handle `optional` parameters, inlined functions (arrow & classic as well) and pretty much everything thanks to `acorn`. 💪

An example input string:

```auto
const a = 3
BABYLON.Mesh.CreateTube("dd", myPath, 10, 4, function(o,p) {
    if (true) {
        function whatever(input1, input2) {
            return input1 + input2
        }
        return whatever(1, 2)
    } else {
        return dd
    }
}, 0, scene, true)
const y = 1

```

output:

```auto
const a = 3
BABYLON.MeshBuilder.CreateTube("dd", { path: myPath, radius: 10, tesselation: 4, radiusFunction: (o,p) => {
    if (true) {
        function whatever(input1, input2) {
            return input1 + input2
        }
        return whatever(1, 2)
    } else {
        return 10
    }
}, cap: 0, updatable: true }, scene)
const y = 1

```

It is just a quick (under an hour) implementation but if you guys are interested in this stuff I can continue to work on it, test it thoroughly and dedicate it to the community.

🖖

---

<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:** [February 11, 2022, 4:18pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/19 "2022-02-11T16:18:31Z")

</div>

Let me add @RaananW who owns the Playground DB now

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 11, 2022, 5:59pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/20 "2022-02-11T17:59:23Z")

</div>

Yeah!  
I was thinking about adding something like that to the playground snippet loader so that new code will always be modified. This is a great example.

I’ll keep myself assigned to that just to be able to track this, but this would be a great feature for the future versions of the playground. I wouldn’t want to change the actual playground code in the DB, as we treat our DB as an immutable store. But if we are loading old code3 in the playground and the playground adjusts the code, saving it (and running it) will work without an issue.  
Once I have the initial implementation I will be happy to accept PRs! 🙂

---

<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:** [February 11, 2022, 7:29pm UTC](https://forum.babylonjs.com/t/babylonjs-5-release/27384/22 "2022-02-11T19:29:48Z")

</div>

Hello @RaananW!  
I am glad you like the idea and had something similar in your mind 🕶

First I need to finish the YUKA examples I am currently working on. I expect to have my part of the examples (@labris is working on the others) to be ready in a week. Just right after I can start to work on this. I will get back to you asap.

I will create a new topic for this feature so we do not flood the original one.

Thank you!

EDIT: [Replacing deprecated PG code automatically](https://forum.babylonjs.com/t/replacing-deprecated-pg-code-automatically/27585)
