This is valid:
new TransformNode('node') // no type error, scene arg is omitted
while this makes a type error:
new DirectionalLight('light_directional', direction); // type error, missing scene arg
both of these eventually inherit from Node
, which adds nodes to the last created scene. However the scene
arg for various Node
constructors seems to be arbitrarily optional only for some nodes despite that they all get the default scene treatment from Node
here:
Why is Babylon’s API inconsistent like this? Did someone forget to finish updating all the class types at some point?