Node Material Editor doesn't properly generate code for Trigonometry Blocks

Hi,
I seem to have run afoul of a bug with code generation for trigonometry blocks in the node material editor.

With an example material here: Babylon.js Node Material Editor using the ceiling node, we can see a result in the editor preview which is what we would expect.

If I then “Generate Code” with this material and dump that into a playground we instead get this result Babylon.js Playground

It seems that when code for trigonometry blocks are generated, it doesn’t set the “operation” property for the block.

Looking through the source code it would seem to me that the fix for this is to implement the _dumpPropertiesCode function for the TrigonometryBlock class, something to the tune of:

TrigonometryBlock.prototype._dumpPropertiesCode = function() {
        var codeString = this._codeVariableName + ".operation = " + this.operation + ";\r\n";
        return codeString;
    }

You are totally right! I’ll add this missing code :slight_smile:

Thanks a ton and welcome!