NME generated source VectorMerge issue

When I have a VectorMerge in my graph, the generated source has errors in setting swizzles:

// VectorMergerBlock
var VectorMerger = new BABYLON.VectorMergerBlock("VectorMerger");
VectorMerger.visibleInInspector = false;
VectorMerger.visibleOnFrame = false;
VectorMerger.target = 4;
VectorMerger.xSwizzle = x};
VectorMerger.ySwizzle = y};
VectorMerger.zSwizzle = z};
VectorMerger.wSwizzle = w};

I am using Firefox 94.0.1
The console on the NME page says
Babylon.js v5.0.0-alpha.60 - WebGL2

1 Like

Yep this looks like a bug!

Here’s an example NME that I had handy NM with that block and got the same result. Babylon.js Node Material Editor

Let me file an issue and see if we can get a look into it. (I assume it’s supposed to just be x; without the }

Thank you for pointing this out!

1 Like

According to the documents, it should be quoted like this:

VectorMerger.xSwizzle = "x";
VectorMerger.ySwizzle = "y";
VectorMerger.zSwizzle = "z";
VectorMerger.wSwizzle = "w";

Ok I see the fix. Will have PR shortly!

Update: Here we go :slight_smile:

4 Likes