Backwards compatibility broken in showWorldAxis example

Hi!

Backwards compatibility was broken in the CreateLines function. I know, that it is now deprecated but many of the existing PG’s uses the showWorldAxis example which uses the deprecated Mesh.CreateLines function from the docs as follows:

        const axisX = BABYLON.Mesh.CreateLines("axisX", [
            BABYLON.Vector3.Zero(), new BABYLON.Vector3(size, 0, 0), new BABYLON.Vector3(size * 0.95, 0.05 * size, 0),
            new BABYLON.Vector3(size, 0, 0), new BABYLON.Vector3(size * 0.95, -0.05 * size, 0)
        ], scene);

Now the CreateLines function requires a fourth parameter updatable. Are we going to fix this so the old PG’s are working? I can create a PR. All we need is to default the value of updatable to false/true.

Thank you!

2 Likes

Many of the PGs using showWorldAxis do still work, e.g. Babylon.js Playground

Please given an example of where it is no longer working v5 but was in v4.2.

CreateLines always has had a fourth option of updatable as from v3.1 below

Mesh.CreateLines = function (name, points, scene, updatable, instance) {
            if (scene === void 0) { scene = null; }
            if (updatable === void 0) { updatable = false; }
            if (instance === void 0) { instance = null; }
            var options = {
                points: points,
                updatable: updatable,
                instance: instance
            };
            return BABYLON.MeshBuilder.CreateLines(name, options, scene);
        };

Not sure why it is not working in some cases.

1 Like

This one was definitely working when I created it back in August 2021:

I’ve discovered that it is not working after @necips recommended my PG in this topic. Read two-three messages below as well please:

Thank you!

I understand - it is a Typescript issue, in Javascript all parameters are optional. You get the same problem going back to v3.3 in the playground but the PG did not report what the issue is in the older version. For Typescript you would need to make the updatable parameter optional just using a ? or as you say giving the parameter an explicit default value.

Pinging @sebavan to have a look at your PR idea.

1 Like

Yep, it is a typescript feature of a deprecated function.
I’ll fix that soon

2 Likes

CreateLines updatable is optional by RaananW · Pull Request #11830 · BabylonJS/Babylon.js (github.com)

2 Likes

Thank you! Actually I am trying to achieve the Great Contributor title :stuck_out_tongue: that’s why I proposed that I will make the PR. Never mind, next time :slight_smile:

1 Like

AAAAHHHHHHHH

sorry…

I promise not to fix it next time :slight_smile:

1 Like

No worries! :slight_smile:

Do you guys count contributions to the source code only or to the docs as well?

No idea :slight_smile: maybe @carolhmj who is amazing with the forum config can check ?

Don’t want to look childish, but my boss promised me a raise everytime I get better in BabylonJS (EDIT: outside of work hours) and he said higher reputation on the forum counts as well :stuck_out_tongue: But to be honest I am childish and I’d like a title next to my username :smiley: :smiley: :smiley: And I love to code in BJS as well!

:vulcan_salute:

Thank you!

r.

1 Like

You can tell him to ask in the community and if your raise is on par with the help you provide here you you can book a sabbatical year of vacation without any issues :wink:

1 Like

Your words means a lot to me and I feel in Seventh Heaven now!! Thank you very much!! :smiling_face_with_three_hearts:

1 Like

I can vet you anytime buddy. Simply ask!

1 Like

David thank you very much! :heart_eyes_cat: :heart_eyes_cat: :heart_eyes_cat: I must earn the reputation and respect step by step! It makes me happy to help the lost souls here as much as I can and share the knowledge as you guys do! I appreciate your support a lot!

1 Like

I took a look at the Github plugin, it counts only the main Babylon repo… I wouldn’t be opposed to adding all the other repos on the Babylon organization there :slight_smile: @Deltakosh what do you think?

1 Like

Hi @carolhmj !
Since I added the Edit on GitHub button to every doc page it is very easy to make small changes on the fly and I fixed several typos and small errors in the provided examples/playgrounds while I was reading the docs and I believe those PRs are not worth of earning the Great Contributor title for me nor for anyone else.

Creating new content in the docs is however another story.

Sharing own source code to the community should count as well. Creating PG’s which are liked by the community should count too. Contributing to the assets library, discoverring bugs, helping on the forums, accepted solutions etc. as well. I think these are the signs of a good BabylonJS contributor :vulcan_salute: These ones should raise the contribution count by a smaller factor than contributing to the main source code repository.

Sharing is caring! :slight_smile:

However it’s unlikely that someone is going to write an algorithm which could rightfuly decide when to raise the reputation in these cases.

I was trying to find some issues in the BabylonJS repo which I could solve but they are mostly assigned just right after they are created or are so old that it’s clear that no one is willing to solve them :smiley:

So basically I couldn’t find anything serious (but not too serious :smiley: ) to contribute to so I joined @labris (Hi Dude!) and started to contribute to YUKA (Yuka | A JavaScript library for developing Game AI) and we are creating BabylonJS examples for it.

To be honest we all have much more important things in our lives than this so don’t take my words too seriously :roll_eyes:

If anyone thinks I am doing this for a raise (anyway my boss is counting it only starting this year) he/she is wrong. BabylonJS is amazing and finally I can code software which reminds me of my childhood when I was creating demos just for fun. And coding using BabylonJS is endless fun and joy for me!

Thank you!

r.

1 Like

I’m always glad to hear how enthusiastic you are for Babylon! :heart:

Sharing own source code to the community should count as well. Creating PG’s which are liked by the community should count too. Contributing to the assets library, discoverring bugs, helping on the forums, accepted solutions etc. as well. I think these are the signs of a good BabylonJS contributor :vulcan_salute: These ones should raise the contribution count by a smaller factor than contributing to the main source code repository.

We can also create new badges for the forum (yay collecting shiny stuff!) so maybe a “Sharing is caring” set of badges would be cool! :smiley:

I was trying to find some issues in the BabylonJS repo which I could solve but they are mostly assigned just right after they are created or are so old that it’s clear that no one is willing to solve them

That is a good observation, thank you for that. @PirateJC I think we can be doing a better job of tagging issues with the “good first issue” tag on Github. Maybe some of the improvements on the GUI Editor/Performance Profiler/ACE?

So basically I couldn’t find anything serious (but not too serious :smiley: ) to contribute to so I joined @labris (Hi Dude!) and started to contribute to YUKA (Yuka | A JavaScript library for developing Game AI) and we are creating BabylonJS examples for it.

Woah, this is very cool, I can’t wait to see what you two rockstars make! :smiley:

3 Likes

The first examples are already online - Yuka | Examples with Babylon.js and we continue!

4 Likes